Opcode syntax: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
m (dead link removal)
No edit summary
Line 35:
The AT&T syntax format for macros:
 
<source lang="asm">
<code>
.macro <name> <args>
<operations>
.endm
</codesource>
 
Example:
 
<source lang="asm">
<pre>
.macro write string
movw string, %si
call printstr
.endm
</presource>
 
This would be equivalent to the NASM macro:
 
<source lang="asm">
<pre>
%macro write 1
mov si, %1
call printstr
%endmacro
</presource>
 
Additionally, the cpp and m4[[M4]] macro preprocessors are often used for macro handling.
 
== Converting small snippets of code from Intel syntax to AT&T ==
Anonymous user