AngoLinux |
80386 Programmer's Reference Manual -- Opcode LEAVE |
LEAVE -- High Level Procedure Exit
OperationIF StackAddrSize = 16 THEN SP := BP; ELSE (* StackAddrSize = 32 *) ESP := EBP; FI; IF OperandSize = 16 THEN BP := Pop(); ELSE (* OperandSize = 32 *) EBP := Pop(); FI; DescriptionLEAVE reverses the actions of the ENTER instruction. By copying the frame pointer to the stack pointer, LEAVE releases the stack space used by a procedure for its local variables. The old frame pointer is popped into BP or EBP, restoring the caller's frame. A subsequent RET instruction removes any arguments pushed onto the stack of the exiting procedure.Flags AffectedNoneProtected Mode Exceptions#SS(0) if BP does not point to a location within the limits of the current stack segmentReal Address Mode ExceptionsInterrupt 13 if any part of the operand would lie outside of the effective address space from 0 to 0FFFFHVirtual 8086 Mode ExceptionsSame exceptions as in Real Address Mode
[Home Page dell'ITIS "Fermi"] [80386 Programmer's Reference Manual Index] [Previous] [Next] |