
Instruction Set
4-135
LEAVE* Leave High-Level Procedure
LEAVE
What It Does
LEAVE removes the storage for the local variables of a procedure from the stack.
Syntax
Description
LEAVE destroys the stack frame created by ENTER. LEAVE releases the portion of the
stack allocated for the procedure’s local variables by copying BP to SP, and then restores
the calling procedure’s frame by popping its frame pointer into BP.
Operation It Performs
Flag Settings After Instruction
* – This instruction was not available on the original 8086/8088 systems.
Form
Opcode
Description
Clocks
Am186 Am188
LEAVE
C9
Destroy procedure stack frame
8
8
LEAVE
/* update stack and base pointers */
SP = BP;
BP = pop();
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
–
–
–
– res – res – res –
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...