I wrote this course for developers who already program in C99 and want to see what the compiler turns their code into. Rather than treating x86-64 as an abstract list of mnemonics to memorize, I approach it as a working tool: reading gcc -S output, inspecting registers and memory dumps in GDB, tracing syscalls with strace, and measuring instruction costs on real hardware.
Each lesson focuses on a single core idea, comes with a small, reproducible testbed and is verified against real terminal output. All source code, C99 tests, and the CI matrix live in the asm-course repository: github.com/b1sted/asm-course.
For the full list of lessons with links to articles and source directories, environment requirements, and build commands, see the repository README.
Course Roadmap
The course is split into four stages, ramping up in complexity gradually. In stage one, you run a ready-made _start template, read registers, and pause the process in GDB. Memory, the stack, and calling conventions only appear once the terminal, nasm, and gdb -batch have become second nature—so the early lessons don’t require holding all of x86-64 in your head at once.
-
Orientation, basic instructions, and your first GDB session (00–05). Lessons 00–02 focus primarily on tooling: the path from C99 to a binary, how an object file differs from an ELF executable, and how to inspect ELF files using six utilities. To avoid testing tools on contrived dummy files, real instructions and directives appear in the examples right away, though you don’t need to memorize them yet—just pay attention to how the tools work. Registers, your first
syscall, and step-by-step debugging in GDB start systematically in lessons 03–05. -
Data, memory, addressing, branching, and the stack (06–11). This stage introduces bytes in
.dataand.bss,little-endianbyte order,RFLAGS, conditional jumps, the stack,rbpstack frames, and array addressing. Understanding memory and the stack is the foundation for everything that follows, so this stage spans six lessons. -
The OS boundary, system calls, and register-level algorithms (12–16). Programs step outside their own sections: opening files, reading command-line arguments, converting strings and numbers, and handling 128-bit arithmetic and floating-point math.
-
Bridging to C99, ABI conventions, the compiler, hardware, and diagnostics (17–28). Dynamic linking and PLT/GOT, the System V ABI, reading
gcc -O0/-O2output, the CPU pipeline and SIMD, allocators built onmmap, atomic operations, reference tables, and debugging common crashes.
Version 2. This course grew out of my NASM articles published in 2025. Back then, they were standalone practical guides that gradually accumulated new drafts, C99 testbeds, gcc output breakdowns, and hardware benchmarks. Version 2 pulls all of that material into a single end-to-end track from CLI tools down to the CPU pipeline, verified in CI, with all previous post URLs preserved and redirected to the corresponding lessons.