Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Assembly

Notes on x86/x86-64 assembly language, covering both AT&T and Intel syntax.

Directory map

Summary

These notes cover x86 assembly from first principles. Topics include the two main syntaxes (Intel and AT&T), all register types (data, index, pointer, control, segment, EFLAGS), register sub-divisions, all addressing modes using the disp(base, index, scale) form, program sections, data directives, the full instruction set with AT&T size suffixes, stack mechanics and the standard prologue/epilogue, Linux int 0x80 syscall interface, GAS and NASM assembler/linker commands, and the cdecl calling convention with caller/callee-saved register table.

Example programs referenced in the notes:

  • program1.s / program1.o — basic GAS example
  • program2.asm — NASM example
  • stack.asm / stack.s / stack.o — stack frame examples