Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>leave high level procedure exit flags: not altered</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LEAVE           High Level Procedure Exit            Flags: Not altered

LEAVE                                                CPU: 186+

        Logic   MOV eSP,eBP
                POP eBP

    LEAVE reverses the action of a previous ENTER. 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 stack frame. A
    subsequent RET nn instruction removes any arguments pushed onto
    the stack of the exiting procedure.


    Note
    Some assemblers support LEAVE extensions that force the use of
    SP,BP (LEAVEW) or ESP,EBP (LEAVED) regardless of the segment's
    size attribute (80386+).


    Opcode      Format
    C9          LEAVE


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    -             1      -       8       5       4       5       3   NP

See Also: ENTER RET CALL

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson