Figure a6. stack frame for procedure c at level 3 – Intel 80C188XL User Manual
Page 314

A-7
80C186 INSTRUCTION SET ADDITIONS AND EXTENSIONS
Figure A-6. Stack Frame for Procedure C at Level 3 Called from B
LEAVE
LEAVE reverses the action of the most recent ENTER instruction. It collapses the last stack
frame created. First, LEAVE copies the current BP to the Stack Pointer, releasing the stack space
allocated to the current procedure. Second, LEAVE pops the old value of BP from the stack, to
return to the calling procedure's stack frame. A RET instruction will remove arguments stacked
by the calling procedure for use by the called procedure.
Old BP
BP
SP
15
0
BPM
BPM
BPM
BPA
BPM
BPA
BPA
BPB
BPB
BPM
BPA
BPC
Display C
Dynamic
Storage C
A1005-0A
This manual is related to the following products: