12.11 Difference Between AT&T and Intel Assembly Syntax

The syntax for assembly language used by us is known as the AT&T syntax. It is the one supported by the GNU tool chain that comes as a standard with every Linux distribution. However, the official syntax for x86 assembly language (known as the Intel syntax) is different. It is the same assembly language for the same platform, but it looks different. Some of the major differences between the two syntaxes are as follows. In Intel syntax:

  • Registers are not prefixed with the percent sign (%).
  • A dollar sign ($) is not required to do immediate-mode addressing. Instead, non-immediate addressing is accomplished by surrounding the address with brackets ([]).
  • The instruction name does not include ...

Get Compilers: Principles and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.