From CPU anatomy to a 512-byte bootable operating system. Every program runs, every chapter has answers, and the whole thing is free.
Six programs, zero libraries.
Reads two integers and an operator, prints the answer. No C library, just syscalls and the digit tricks that make numbers printable.
A working clone of xxd: 16 bytes per line, offsets, and an ASCII sidebar. Then it inspects its own binary and finds the ELF magic.
fork, execve, wait. The three syscalls behind every shell on your machine, in a working prompt-to-prompt loop.
Serves a live HTML page with a visitor counter over HTTP, written entirely in assembly. Verified with a real curl session.
Your own memory allocator with block headers, splitting, and free-list reuse. The layer underneath every malloc you've ever called.
The final chapter. A 512-byte boot sector that paints the screen and reads your keystrokes with no operating system underneath at all.
55+ original diagrams. Every program verified.
The programs in this book were assembled and run on real Linux. The debugger sessions, HTTP exchanges, and the boot screenshot are real captures, not mockups.
6 parts. 30 chapters.
Read it online, print it, share it, remix it. The text is CC BY 4.0 and the code is MIT. Errata go straight to GitHub.
377 pages · 30 chapters · every program verified · free, forever