972
edits
[unchecked revision] | [unchecked revision] |
m (dead link removal) |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 35:
The AT&T syntax format for macros:
<syntaxhighlight lang="asm">
.macro <name> <args>
<operations>
.endm
</syntaxhighlight>
Example:
<syntaxhighlight lang="asm">
.macro write string
movw string, %si
call printstr
.endm
</syntaxhighlight>
This would be equivalent to the NASM macro:
<syntaxhighlight lang="asm">
%macro write 1
mov si, %1
call printstr
%endmacro
</syntaxhighlight>
Additionally, the cpp and
== Converting small snippets of code from Intel syntax to AT&T ==
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 ==
|