972
edits
[unchecked revision] | [unchecked revision] |
No edit summary |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
(One intermediate revision by the same user not shown) | |||
Line 35:
The AT&T syntax format for macros:
<
.macro <name> <args>
<operations>
.endm
</syntaxhighlight>
Example:
<
.macro write string
movw string, %si
call printstr
.endm
</syntaxhighlight>
This would be equivalent to the NASM macro:
<
%macro write 1
mov si, %1
call printstr
%endmacro
</syntaxhighlight>
Additionally, the cpp and [[M4]] macro preprocessors are often used for macro handling.
Line 64:
You can use the following script to convert short snippets of code (one liners) from Intel syntax to AT&T syntax:
<
set -e
Line 100:
tail -n +$lineno "$objdump"
</syntaxhighlight>
== See Also ==
|