syntax

Assembly Language Syntax

Assembly Language Syntax

Assembly syntax varies slightly depending on the assembler. Two commonly used assembly syntaxes are:

Intel Syntax Example

mov eax, 10     ; Move 10 into register eax
add eax, 5      ; Add 5 to eax
    

AT&T Syntax Example

movl $10, %eax  ; Move 10 into register eax
addl $5, %eax   ; Add 5 to eax
    

Registers

Registers are small storage units in the CPU. Common x86-64 registers include: