Setup
We use NASM (Netwide Assembler) with the x86-64 Linux ABI. You need a Linux environment — WSL2 works fine on Windows.
Lessons
1
How CPUs Actually Work
Before writing a single line, you need a mental model of what the CPU is doing. …
→
2
Hello, World!
In Python, `print('Hello')` is one line that hides a function call, a string obj…
→
3
Registers & Data Movement
`mov` is the most common instruction. It moves data between registers, and betwe…
→
4
Arithmetic & Logic
The CPU can add, subtract, multiply, divide, and do bitwise operations. Every re…
→
5
Control Flow & Loops
Assembly has no if/else, no for loops. It has unconditional jumps (`jmp`) and co…
→
6
The Stack & Functions
The stack is how functions store local variables and return addresses. `push` an…
→
7
System Calls
A syscall is the gate between user space and the kernel. Reading files, writing …
→
8
Calling C Functions from ASM
You don't have to do everything in raw assembly. Linking against libc gives you …
→
9
Mini Project: String Operations
Let's write a small library of string utilities in pure assembly — strlen, strcp…
→
10
x86-64 Assembly Cheatsheet
Registers, instructions, and calling convention on one page.
→