mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-21 00:26:46 +08:00
added AASCIZ
This commit is contained in:
parent
60c56840dd
commit
0813ced99a
8 changed files with 36 additions and 6 deletions
|
|
@ -209,3 +209,11 @@ on Mac versus Linux. To get the address of `errno` use:
|
|||
|
||||
This macro makes the correct CRT call and leaves the address of `errno`
|
||||
in `x0`.
|
||||
|
||||
## AASCIZ
|
||||
|
||||
`AASCIZ label, string`
|
||||
|
||||
This macro invokes `.asciz` with the string set to `string` and the
|
||||
label set to `label`. In addition, this macro ensures that the string
|
||||
begins on a 4-byte-aligned boundary.
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -144,3 +144,8 @@ main:
|
|||
cmp \src_a, \src_b
|
||||
csel \dest, \src_a, \src_b, GT
|
||||
.endm
|
||||
|
||||
.macro AASCIZ label, string
|
||||
.p2align 2
|
||||
\label: .asciz "\string"
|
||||
.endm
|
||||
|
|
|
|||
|
|
@ -86,11 +86,8 @@ PrintLegend:
|
|||
ret
|
||||
END_PROC
|
||||
|
||||
.p2align 2
|
||||
fmt: .asciz "Values to compare: %d and %d\n"
|
||||
.p2align 2
|
||||
fmtgt: .asciz "Greater value is: %d\n"
|
||||
.p2align 2
|
||||
fmtls: .asciz "Lesser value is: %d\n"
|
||||
AASCIZ fmt, "Values to compare: %d and %d\n"
|
||||
AASCIZ fmtgt, "Greater value is: %d\n"
|
||||
AASCIZ fmtls, "Lesser value is: %d\n"
|
||||
|
||||
.end
|
||||
|
|
|
|||
|
|
@ -144,3 +144,8 @@ main:
|
|||
cmp \src_a, \src_b
|
||||
csel \dest, \src_a, \src_b, GT
|
||||
.endm
|
||||
|
||||
.macro AASCIZ label, string
|
||||
.p2align 2
|
||||
\label: .asciz "\string"
|
||||
.endm
|
||||
|
|
|
|||
|
|
@ -144,3 +144,8 @@ main:
|
|||
cmp \src_a, \src_b
|
||||
csel \dest, \src_a, \src_b, GT
|
||||
.endm
|
||||
|
||||
.macro AASCIZ label, string
|
||||
.p2align 2
|
||||
\label: .asciz "\string"
|
||||
.endm
|
||||
|
|
|
|||
|
|
@ -144,3 +144,8 @@ main:
|
|||
cmp \src_a, \src_b
|
||||
csel \dest, \src_a, \src_b, GT
|
||||
.endm
|
||||
|
||||
.macro AASCIZ label, string
|
||||
.p2align 2
|
||||
\label: .asciz "\string"
|
||||
.endm
|
||||
|
|
|
|||
|
|
@ -144,3 +144,8 @@ main:
|
|||
cmp \src_a, \src_b
|
||||
csel \dest, \src_a, \src_b, GT
|
||||
.endm
|
||||
|
||||
.macro AASCIZ label, string
|
||||
.p2align 2
|
||||
\label: .asciz "\string"
|
||||
.endm
|
||||
|
|
|
|||
Loading…
Reference in a new issue