VM Stack Machine Simulator
Step bytecode; watch what each op does to the stack. Companion worksheet →
What this is for
The VM is defined by what each op does to the stack. Every op has exactly one stack-state delta. Predict, then Step. The eight segments are named windows into the host RAM; seed any segment cell below and watch push local 0 read it, pop local 0 write it. Arithmetic ops (add sub neg eq gt lt and or not) pop their operands and push the result. This is the abstract machine your Ch 7 translator must faithfully realize.
Stack
Program
Operand inspector
Last op: —
popped y: —
popped x: —
pushed: —