User's Manual

THE
80286
INSTRUCTION SET
LEAVE-High
Level
Procedure
Exit
Opcode Instruction Clocks
Description
C9
LEAVE
5
Set SP to BP, then
POP
8P
FLAGS MODIFIED
None
FLAGS UNDEFINED
None
OPERATION
LEAVE
is
the complementary operation
to
ENTER; it reverses the effects of that instruction.
By
copying BP to SP, LEAVE releases the stack space used by a procedure for its dynamics and display.
The old frame pointer
is
now
popped into BP, restoring the caller's frame, and a subsequent RET
nn
instruction
will
follow
the back-link and remove any arguments pushed
on
the stack for the exiting
procedure.
PROTECTED MODE EXCEPTIONS
#S~(O)
if BP does not point to a location within the current stack segment.
REAL ADDRESS MODE EXCEPTIONS
Interrupt
13
for a word operand at offset OFFFFH.
8-64