September 2017
Beginner to intermediate
290 pages
6h 58m
English
According to the Intel manual for developers, these instructions provide machine-language support for procedure calls in block-structured languages; however, they are very useful for Assembly developers as well.
When we implement a procedure, we have to take care of the creation of the stack frame where we store the procedure's variables, storing the value of ESP and then restoring all that before we leave a procedure. These two instructions can do all that work for us:
; Do something herecall my_proc; Do something else heremy_proc: enter 0x10, 0 ; Save EBP register on stack, ; save ESP to EBP and ; allocate 16 bytes on stack for procedure variables ; ; procedure body ; leave ; Restore ESP and EBP registers (this automatically ...
Read now
Unlock full access