First page Back Continue Last page Overview Graphics
Storing Local Variables in the Stack
Local storage space within the stack should be allocated immediately upon entering a subroutine and deallocated on exiting.
To access to local variables, indexed addressing is used.
At the start of the subroutine, the stack pointer is copied to an index register. This value, and consequently the index register containing it, is then referred to as the frame pointer.