Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CPU

Note

This page is currently a stub and needs more detail. Information on cycles, stack, reset, the main loop, etc. are completely missing.

Registers

RegisterSizeNotes
General purpose (16)8 bits eachNumbered 0 to F, so a register fits in one nybble
Program counter24 bitsAddress of the next byte to read
Stack pointer24 bitsPushed big-endian
Flags8 bitsSee below

Flags

BitFlag
0Zero
1Carry
2Negative
3Overflow

Bits 4 to 7 are currently unused.

Reset State

The CPU starts with everything at 0, with the SP at 0x400000 with a pre-decrement