80286
BASE
ARCHITECTURE
BP
IS
A CONSTANT POINTER TO
STACK
BASED VARIABLES AND WORK SPACE,
ALL
REFERENCES
USE
BP
AND
ARE
INDEPENDENT OF SP, WHICH MAY VARY
DURING
A ROUTINE EXECUTION,
PROC
N
PUSH AX
PUSH ARRA
LSIZE
CALL
PROC_N+1
-----
.....
~
PROC_N+1:
PUSH
BP
PUSH
CX
MOV BP,
SP
SUB SP, WORK_SPACE
"PROCEDURE
BODY"
MOF
BOTTO
S
TACK
t
I
1"'--'
I BP
L
__
..I
--
'['
.-
---
MOV SP,
BP
POP
CX
POP
BP
RET
PARAMETERS
RETURN
ADDR
REGISTERS
WORK_SPACE
PARAMETERS
RETURN
ADDR
REGISTERS
WORK_SPACE
r
PROCEDURE N STACK FRAME
PROCEDURE
N+
1
STACK
FRAME
I
DYNAMICALLY ALLOCATED
ON
DEMAND RATHER THAN STATICALLY
TOP OF
STACK
STACK SEGMENT BASE
Figure 2-9.
BP
Usage
as
a Stack Frame Base Pointer
2-13
G30108