gas
Frequently used directives
-
.byte,.2byte,.4byte,.8byteto define a N byte value.byte 0xaa .2byte 0xaabb .2byte 0xaa, 0xbb .4byte 0xaabbccdd .8byte 0xaabbccdd11223344 -
.asciito define an ascii string.ascii "foo" ; allocates 3 bytes -
.ascizto define an ascii string with'\0'terminator.asciz "foo" ; allocates 4 bytes (str + \0) -
.macroto define assembler macros. Arguments are accessed with the\argsyntax..macro defstr name str \name: .ascii "\str" \name\()_len: .8byte . - \name .endm ; use as defstr foo, "foobar"Use
\()to concatenate macro argument and literal.