وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

LEAVE

LEAVE 

Usage:  LEAVE                                        Modifies flags: None

Releases the local variables created by the previous ENTER instruction by restoring ESP and EBP to their condition before the procedure stack frame was initialized.

Destroy Stack Frame


LEAVE                         ; C9                   [186]


LEAVE destroys a stack frame of the form created by the ENTER instruction. It is functionally equivalent to 


> MOV ESP,EBP ; followed by 

> POP EBP


The old frame pointer (the frame pointer for the calling procedure that was saved by the ENTER instruction) is then popped from the stack into the EBP register, restoring the calling procedure's stack frame. A RET instruction is commonly executed following a LEAVE instruction to return program control to the calling procedure.


Example:

leave

ret