microZEUS
The whole stack, hand-drawn.

◄ Wiki / OS

PC (program counter)

The CPU register holding the address of the instruction currently being executed.

The program counter (also called instruction pointer) tracks where in the code the processor is, advancing each step and jumping on branches and calls. When a program crashes, the faulting PC records exactly which instruction failed, which — with debug info — maps back to a specific line of source code. In microZeus that mapping turns a fault into a source location.

See also

  • page faultThe interrupt that fires when a program touches memory that isn't currently mapped in.
  • per-CPU stateData kept in a separate copy for each processor core, so cores don't step on each other.
  • MMUThe hardware unit that translates the addresses a program uses into real physical memory locations.