Assembly 101
Assembly is the layer underneath the C you already write. When you compile int x = a + b;, the compiler emits a handful of instructions — mov, add, mov — that operate directly on the CPU's registers and memory. This course is about reading and writing those instructions yourself. There is no abstraction left below this: assembly is the program, one step removed from the raw bytes the processor executes.
Knowing it changes how you see everything else. A C bug becomes obvious once you can read the three instructions it compiled to; a stripped binary with no source is just assembly you have not read yet. This is the course the Reverse Engineering and Binary Exploitation tracks lean on constantly — every gadget, every patched byte, every crash is assembly.
gdb and objdump default to it.Course Layout
The course builds from "how do I even run this" up to reading what an optimizing compiler produced:
- Getting Started — the two syntaxes, assembling and linking a program with
nasmandld, and debugging it undergdb. Everything you need to get code running and watch it execute. - Basics — the machine model: binary and hex, the registers, how memory is addressed, and the shape of an instruction.
- Operations — doing work: arithmetic, bitwise logic, control flow (jumps and comparisons), the stack and function calls, and talking to the kernel with system calls.
- Challenges — write real programs from scratch: Hello, World, a function call, summing an array, and reversing bytes.
- 32-bit x86 — the i386 differences you will meet in older binaries and CTF challenges.
- Advanced — idioms the compiler loves, how instructions are encoded into bytes, and reading optimized code.
Work the first two sections in order; after that you can jump to whatever you need.
Toolchain
Three tools, all standard on Linux: nasm to assemble, ld to link, and gdb to debug (plus objdump to disassemble). The build is always the same two steps, which we chain into one line:
nasm -f elf64 hello.asm -o hello.o && ld hello.o -o hello && ./helloHello, world!The Assembling & Linking lesson breaks that line down, and the Debugging Assembly lesson covers stepping through a program instruction by instruction. If gdb is new to you, start with the GDB Guide.
for loop compiles to," "this is where a local variable lives." You do not need to be an expert, but you should know what a pointer is, how the stack holds local variables, and what a function call does. If that is shaky, work through C Programming first.