Assembly syntax varies slightly depending on the assembler. Two commonly used assembly syntaxes are:
mov eax, 10 ; Move 10 into register eax add eax, 5 ; Add 5 to eax
movl $10, %eax ; Move 10 into register eax addl $5, %eax ; Add 5 to eax
Registers are small storage units in the CPU. Common x86-64 registers include:
rax
: General-purpose register (accumulator).rbx
: Base register.rcx
: Counter register.rdx
: Data register.