<<< Parameter Declarations     Index     The RET Instruction >>>

15. ENTER and LEAVE commands


  • Command ENTER at the starting point of the procedure,

        ENTER N, O
    

    translates to

        push ebp
        mov ebp, esp
        sub esp, N
    
  • Its corresponding counterpart, the LEAVE command, translates to

        mov esp, ebp
        pop ebp
    
  •   stack before and after the procedure call


<<< Parameter Declarations     Index     The RET Instruction >>>