Chapter 1 Further Reading: Why Assembly Language?

Essential References


1. Intel 64 and IA-32 Architectures Software Developer's Manual Intel Corporation. Available at intel.com/sdm (free download)

The definitive reference for x86-64. Volume 1 covers the architecture overview; Volume 2 (parts A, B, C, D) is the complete instruction set reference; Volume 3 covers system programming. You don't need to read it cover to cover — use it as a reference. When you see an instruction and want to know exactly what flags it sets, what the encoding is, and any exceptions, this is the source. The PDF is several thousand pages; search by instruction mnemonic. The instruction latency and throughput data is elsewhere (see Agner Fog below), but this is the authoritative behavioral specification.


2. AMD64 Architecture Programmer's Manual AMD Corporation. Available at developer.amd.com (free download)

The architectural specification from AMD's perspective, who designed the 64-bit extensions. Volumes 1-5 cover general purpose programming, system programming, and the instruction set. Useful for anything x86-64-specific (as opposed to 32-bit legacy): long mode operation, the canonical address requirement, how the 64-bit register file works, and the REX prefix encoding. Often clearer than Intel's documentation on the 64-bit extensions specifically.


3. Computer Systems: A Programmer's Perspective (CS:APP) Randal E. Bryant and David R. O'Hallaron, Pearson, 3rd Edition

The textbook used in Carnegie Mellon's systems course and widely adopted elsewhere. Chapter 3 covers machine-level programming in depth, using GCC-generated x86-64 assembly. The book connects C code to assembly in a systematic way, covers all the calling convention details, and explains the bomb lab and buffer overflow attack lab that have taught assembly to a generation of students. If you want a complementary text with a more academic framing, CS:APP is the canonical choice.


4. The Art of Assembly Language Randall Hyde, No Starch Press, 2nd Edition

One of the most comprehensive assembly language textbooks available. Hyde uses HLA (High Level Assembly) in places to introduce concepts before raw assembly, which some readers find helpful and others find annoying. The underlying material on data representations, procedure calls, and assembly patterns is excellent. Strong on the conceptual foundations, less strong on modern x86-64 specifics (the book predates the 64-bit era in its most updated editions).


Online Tools and Resources


5. Compiler Explorer (godbolt.org) Matt Godbolt. Free online tool at godbolt.org

The single most useful online tool for assembly programmers. Paste C, C++, Rust, Go, or dozens of other languages and see the compiler's assembly output in real time. Supports GCC, Clang, MSVC, and compiler versions going back years. You can diff the output of different optimization levels side by side, annotate source lines with the corresponding assembly, and share permalinks. The chapter examples in this book can all be reproduced on godbolt.org without any local setup. If you use only one online tool, use this one.


6. OSDev Wiki (wiki.osdev.org) Community-maintained. Free at wiki.osdev.org

The primary reference for OS development topics. Covers x86 boot process, protected mode, long mode, GDT/IDT setup, paging, interrupt handling, and dozens of other topics required for the MinOS kernel project in this book. The "Bare Bones" tutorial is a classic starting point for kernel development. The forum archives contain solutions to essentially every problem that beginners encounter when writing OS kernel code. Essential resource for Chapters 32-40.


7. Agner Fog's Optimization Manuals Agner Fog, Technical University of Denmark. Free at agner.org/optimize

A set of five manuals covering instruction set optimization from a practical perspective. Most relevant for this book: "Instruction Tables" (latency and throughput data for every instruction on every recent CPU microarchitecture) and "Optimizing Subroutines in Assembly Language" (practical optimization techniques for x86 and x86-64). These are the reference you reach for when you need to know how many clock cycles an instruction takes. Maintained and updated regularly.


8. x86 and amd64 Instruction Reference (felixcloutier.com/x86) Felix Cloutier. Free at felixcloutier.com/x86

An unofficial but extremely well-formatted HTML version of the Intel instruction set reference. When you need to look up a specific instruction's behavior, flag effects, and encoding, this is faster to search than the Intel PDF. Covers all instruction forms including SIMD extensions. Highly recommended as a quick reference during daily work.


Books for Deeper Study


9. Low-Level Programming: C, Assembly, and Program Execution Igor Zhirkov, Apress, 2017

One of the few recent books that covers C, x86-64 assembly, and system programming together. Covers NASM syntax (like this book), the System V AMD64 ABI, writing and calling C functions from assembly, and implementing basic OS concepts. A practical complement to this textbook with more emphasis on the C/assembly interface.


10. Hacking: The Art of Exploitation Jon Erickson, No Starch Press, 2nd Edition

The classic introduction to security research through the assembly lens. Covers buffer overflows, shellcode writing, format string attacks, and network exploitation — all grounded in x86 assembly. Written for 32-bit Linux, but the concepts transfer directly to x86-64. The CD-ROM included a LiveCD boot environment for exercises; modern replacements include Docker images. Required reading for anyone interested in the security applications of assembly.


11. The Linux Programming Interface Michael Kerrisk, No Starch Press, 2010

While not an assembly book, this is the comprehensive reference for Linux system calls and the kernel interface — essential context for the system call interface introduced in Chapters 5-7. When you write mov rax, 1; syscall for sys_write, you're invoking the kernel interface described in exhaustive detail here. Every system call covered in this book is documented in Kerrisk's reference. The online man pages are a free partial alternative.


12. What Every Programmer Should Know About Memory Ulrich Drepper, 2007. Free at people.redhat.com/drepper/cpumemory.pdf

A technical paper (not a book, but long enough to count as one) that explains the memory hierarchy from the CPU's perspective: DRAM, caches (L1/L2/L3), TLB, NUMA, and their performance implications. Essential background for understanding why assembly code that looks efficient can be slow due to cache misses, and why memory alignment (Chapter 4) matters. Drepper was a key glibc maintainer and wrote this from practical experience with performance-critical systems code.