VM Program-Flow Visualizer

Branching, calls, and the 5-word saved frame, step by step. Companion worksheet →

What this is for

The 5-word saved frame (return-address / saved LCL / saved ARG / saved THIS / saved THAT) is the bookkeeping that lets return restore the caller's environment exactly. Predict, then Step. Each call pushes the saved frame onto the stack and a frame card appears; each return pops the saved frame and the card disappears. Watch the LCL/ARG/THIS/THAT pills move at each cycle.

Stack

Frame visualizer

Program

Press Step to begin.