9.2 The Target Language

We are going to use x86 assembly language for our project in Chapter 12. Here, we use simple subset of that language.

9.2.1 x86 Assembly Language in GAS Syntax

We use the AT&T assembly syntax used in GNU assembler as, also known as, GAS. The assembly code output from the gcc compiler uses this syntax and is compatible with the GCC in-line assembly syntax. However, this is not the only syntax that is used to represent x86 operations. For example, Net-Assembler NASM uses a different syntax to represent assembly mnemonics, operands and addressing modes, as do some High Level assemblers. The AT&T syntax is the standard on Unix-like systems but some assemblers use the Intel syntax used in MASM. GAS itself can accept both the ...

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.