Write Sign in

Intel / AMD 64-bit ecosystem

x86-64

The dominant desktop and server ISA for operating systems, compilers, debuggers, hypervisors, game engines, binary tools, exploit research, and performance work.

Windows PE/COFFLinux ELFmacOS Mach-O

ABI notes

System V AMD64 on Linux/macOS/BSD, Microsoft x64 on Windows, with different argument registers, shadow space, red zone, unwind metadata, and object formats.

Privilege model

Rings, long mode, paging, interrupts, exceptions, MSRs, syscall/sysret, virtualization extensions.

Registers

NameAliasesClassRole
RAXEAX, AX, ALGeneralReturn value, accumulator, syscall number on Linux
RBXEBX, BX, BLGeneralCallee-saved base register
RCXECX, CX, CLGeneralCounter, shifts, Windows first integer argument
RDXEDX, DX, DLGeneralData register, returns, arguments
RSI/RDIESI/EDIGeneralString operations, SysV arguments
RSP/RBPESP/EBPStackStack pointer and frame pointer
RIP/RFLAGSEIP/EFLAGSControlInstruction pointer and condition state
XMM/YMM/ZMMSIMD viewsVectorFloating point, SIMD, AVX/AVX-512

Instruction groups

Data movement
MOV, LEA, PUSH, POP, XCHG, MOVSX, MOVZX, addressing forms

Arithmetic and logic
ADD, SUB, IMUL, IDIV, AND, OR, XOR, SHL, SHR, SAR

Control flow
CALL, RET, JMP, Jcc, CMP, TEST, SETcc, CMOVcc

System and privileged
SYSCALL, SYSRET, CPUID, RDMSR, WRMSR, LGDT, LIDT

SIMD and atomics
SSE, AVX, AVX-512, LOCK operations, fences

Starter code

global _start
section .text
_start:
    mov rax, 1
    mov rdi, 1
    lea rsi, [rel msg]
    mov rdx, msg_len
    syscall

    mov rax, 60
    xor rdi, rdi
    syscall
section .rodata
msg: db "hello x86-64", 10
msg_len: equ $ - msg