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

Register set

Small and simple; each VM context (judge or bot) gets its own copies.

register mask description size
R0 - R7 0x00 - 0x07 General-purpose registers 8 bits
SP 0x0D Stack pointer; PUSH / POP move it upward 8 bits
PC 0x0E Program counter; steps by 2 bytes per instruction 12 bits
F 0x0F Flags register (Z/N/C) 8 bits

Notes:

  • F is overwritten by arithmetic/logic/shift ops. Jumps read it, but most other ops leave it untouched.
  • Context switches keep register sets separate: judge and each bot maintain their own registers (PC, SP, R0-R7).
  • Masks 0x08 - 0x0C are reserved for future expansion.