mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-22 18:36:48 +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`
|
This macro makes the correct CRT call and leaves the address of `errno`
|
||||||
in `x0`.
|
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
|
cmp \src_a, \src_b
|
||||||
csel \dest, \src_a, \src_b, GT
|
csel \dest, \src_a, \src_b, GT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro AASCIZ label, string
|
||||||
|
.p2align 2
|
||||||
|
\label: .asciz "\string"
|
||||||
|
.endm
|
||||||
|
|
|
||||||
|
|
@ -86,11 +86,8 @@ PrintLegend:
|
||||||
ret
|
ret
|
||||||
END_PROC
|
END_PROC
|
||||||
|
|
||||||
.p2align 2
|
AASCIZ fmt, "Values to compare: %d and %d\n"
|
||||||
fmt: .asciz "Values to compare: %d and %d\n"
|
AASCIZ fmtgt, "Greater value is: %d\n"
|
||||||
.p2align 2
|
AASCIZ fmtls, "Lesser value is: %d\n"
|
||||||
fmtgt: .asciz "Greater value is: %d\n"
|
|
||||||
.p2align 2
|
|
||||||
fmtls: .asciz "Lesser value is: %d\n"
|
|
||||||
|
|
||||||
.end
|
.end
|
||||||
|
|
|
||||||
|
|
@ -144,3 +144,8 @@ main:
|
||||||
cmp \src_a, \src_b
|
cmp \src_a, \src_b
|
||||||
csel \dest, \src_a, \src_b, GT
|
csel \dest, \src_a, \src_b, GT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro AASCIZ label, string
|
||||||
|
.p2align 2
|
||||||
|
\label: .asciz "\string"
|
||||||
|
.endm
|
||||||
|
|
|
||||||
|
|
@ -144,3 +144,8 @@ main:
|
||||||
cmp \src_a, \src_b
|
cmp \src_a, \src_b
|
||||||
csel \dest, \src_a, \src_b, GT
|
csel \dest, \src_a, \src_b, GT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro AASCIZ label, string
|
||||||
|
.p2align 2
|
||||||
|
\label: .asciz "\string"
|
||||||
|
.endm
|
||||||
|
|
|
||||||
|
|
@ -144,3 +144,8 @@ main:
|
||||||
cmp \src_a, \src_b
|
cmp \src_a, \src_b
|
||||||
csel \dest, \src_a, \src_b, GT
|
csel \dest, \src_a, \src_b, GT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro AASCIZ label, string
|
||||||
|
.p2align 2
|
||||||
|
\label: .asciz "\string"
|
||||||
|
.endm
|
||||||
|
|
|
||||||
|
|
@ -144,3 +144,8 @@ main:
|
||||||
cmp \src_a, \src_b
|
cmp \src_a, \src_b
|
||||||
csel \dest, \src_a, \src_b, GT
|
csel \dest, \src_a, \src_b, GT
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro AASCIZ label, string
|
||||||
|
.p2align 2
|
||||||
|
\label: .asciz "\string"
|
||||||
|
.endm
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue