|
|
|
|
|
|
|
|
|
|
|
|
|
|
ä |
Values
and references on the stack can’t just be popped off
|
|
because
the SP must remain pointed at the return address
|
|
|
ä |
Solution
|
|
|
|
ä |
Load
the SP into the base pointer BP and access the
|
|
|
parameters
through the BP
|
|
|
|
ä |
Note:
BP is used by many subprograms, so it must be saved
|
|
|
first!
Where? Programmer saves it on the stack.
|
|
|
|
ä |
DS,
SS, BP are also saved/restored to original status (by the
|
|
|
programmer)
if changed by a subprogram (more calling
|
|
|
|
conventions)
|
|
|
ä |
BP is
said to point to a stack frame
|
|