registers: IP VM instruction pointer SP VM stack pointer (top down) LP VM local variables base pointer EP VM exception catch block pointer TOP VM top stack register (void, int, long, float, address) note: a LP is not strictly necessary. if the compiler keeps track of the temporary arguments on the stack, then the SP can be used to access local variables. call proc: 1st arg is in TOP (void, int, long, float, address) 2nd++ args are on stack (rtl) push IP on stack load IP with proc address start of proc: push EP on stack push LP on stack load LP with current SP push TOP on stack (void, int, long, float, address) lower SP to make room for local variables end of proc: load SP with current LP pop LP pop EP pop IP try: push "IP": address of catch block push EP push LP load EP with current SP try end: load SP with current EP (or drop) pop LP (or drop) pop EP drop "IP" throw: load TOP with exception (object) load SP with current EP pop LP pop EP pop IP catch: LSET or push TOP (exception object)