ä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
Original BP value placed on
stack by PUSH BP
Offset of return address pushed
by CALL
Segment of return address
pushed by call (FAR call)
Address of second parameter
Address of first parameter