Assembly & Related Notes
These notes are focused on assembly language and related tooling (linkers, loaders, etc).
Speficially, those used on the following machines:
- Modern personal computers (MS Windows, Linux, or Mac)
- Video Game Consoles (fourth gen and up)
Significant Authorship
These are in alphabetical order by author.
Brian Robert Callahan
Demystifying programs that create programs
- Part 1: A disassembler
- Part 2: Starting an assembler
- Part 3: Globals, passes, and error handling
- Part 4: Parsing
- Part 5: Processing our first opcode
- Part 6: Processing more opcodes
- Part 7: Further opcode processing
- Part 8: Finishing opcode processing
- Source
Brian R. Hall
Assembly Programming and Computer Architecture for Software Engineers
Casey Muratori
Performance-Aware Programming Series
- Part 1: Reading ASM
- Instruction Decoding on the 8086
- Decoding Multiple Instructions and Suffixes
- Opcode Patterns in 8086 Arithmetic
- 8086 Decoder Code Review
- Using the Reference Decoder as a Shared Library
- Simulating Non-memory MOVs
- Simulating ADD, SUB, and CMP
- Simulating Conditional Jumps
- Simulating Memory
- Simulating Real Programs
- Other Common Instructions
- The Stack
- From 8086 to x64
- 8086 Simulation Code Review
David Salomon
Edson Borin
An Introduction to Assembly Programming with RISC-V
Ian Lance Taylor
John R. Levine
https://www.johnlevine.com/index.phtml
Jo Van Hoey
Beginning x64 Assembly Programming: From Novice to AVX Professional
Michael Abrash
nicebyte
- Part 0 - Setup and First Steps
- Part 1 - Metaprogramming in Flat Assembler
- Part 2 - We're Writing a Virtual Machine
- Part 3 - Arithmetic and Logic
Ryan Fluery
Demystifying Debuggers, Part 2: The Anatomy Of A Running Program
Goes over OS exectuable format, loaders, etc.
Tools
Order by interest. My preference was on simple tools written in a C-like, data-oriented, or procedural way. I don't want to deal with low level tooling marred by dense language abstractions.
YASM (Rewrite (on some) of Netwide in C)
Assemblers below are just noted to exist but I don't care for.
Exectuable Formats
Misc
SBCL: the ultimate assembly code breadboard
CppCon 2018: Matt Godbolt “The Bits Between the Bits: How We Get to main()”