as now supports assembly using Intel assembler syntax.
.intel_syntax selects Intel mode, and
back to the usual AT&T mode for compatibility with the output of
gcc. Either of these directives may have an optional
noprefix specifying whether registers
% prefix. AT&T System V/386 assembler syntax is quite
different from Intel syntax. We mention these differences because
almost all 80386 documents use Intel syntax. Notable differences
between the two syntaxes are:
$; Intel immediate operands are undelimited (Intel
push 4is AT&T
pushl $4). AT&T register operands are preceded by
%; Intel register operands are undelimited. AT&T absolute (as opposed to PC relative) jump/call operands are prefixed by
*; they are undelimited in Intel syntax.
add eax, 4is
addl $4, %eax. The
source, destconvention is maintained for compatibility with previous Unix assemblers. Note that instructions with more than one source operand, such as the
enterinstruction, do not have reversed order. i386-Bugs.
qspecify byte (8-bit), word (16-bit), long (32-bit) and quadruple word (64-bit) memory references. Intel syntax accomplishes this by prefixing memory operands (not the instruction mnemonics) with
qword ptr. Thus, Intel
mov al, byte ptrfoo
, %alin AT&T syntax.
in AT&T syntax; the Intel syntax is
. Also, the far return instruction is
in AT&T syntax; Intel syntax is