// FROM THE METAL //
Programming explained through the machine.
What does a loop cost? When does a smaller program run more slowly? These essays use vintage machines to examine how programs work and why familiar advice sometimes helps — and sometimes does not. Each explanation connects a concrete example to the choices we make when programming today.
Performance · 6502
Why "unroll your loops" is real advice
Read →ARITHMETIC · 6502
When 255 + 1 = 0
Read →ARITHMETIC · Z80
Why everything is a power of two
Read →ARCHITECTURE · 68000
"Stack overflow" is a real place
Read →GRAPHICS · NES (6502)
Racing the beam
Read →TABLES · 68000
The fastest function is the one you already ran
Read →HARDWARE · Z80
The register is the bitfield
Read →ARITHMETIC · NES (6502)
Mario moves in fractions of a pixel
Read →MEMORY · 68000
Why your structs have holes in them
Read →MEMORY · 6502 vs 68000
Why the bytes come out backwards
Read →MEMORY · 6502
A pointer is just an address you stored somewhere
Read →// 3 more in the series — a new one every week //