Administrator
|
When the call code jumps to the function, SP and LCL should be pointing immediately after the saved THAT pointer. if the function requires n local variables, it needs to do the equivalent of n "push 0" commands to reserve and initialize the local segment.
In the case of "function foo 0", n = 0 so there are no "push 0"s. LCL and SP will still have the same value.
--Mark
|