Intel x86 Assembly Language & Microarchitecture AT&T assembler - as


Example

Although the 8086 was most used in IBM PCs along with Microsoft, there were a number of other computers and Operating Systems that used it too: most notably Unix. That was a product of AT&T, and it already had Unix running on a number of other architectures. Those architectures used more conventional assembly syntax - especially that two-operand instructions specified them in source, dest order.

So AT&T assembler conventions overrode the conventions dictated by Intel, and a whole new dialect was introduced for the x86 range:

  • Register names were prefixed by %:
    %al, %bx etc.
  • Immediate values were prefied by $:
    $4
  • Operands were in source, dest order
  • Opcodes included their operand sizes:
    movw $4, %ax ; Move word 4 into AX