Presentation is loading. Please wait.

Presentation is loading. Please wait.

ESP Calling sequence. caller Parameters (in reverse order) ESP Calling sequence.

Similar presentations


Presentation on theme: "ESP Calling sequence. caller Parameters (in reverse order) ESP Calling sequence."— Presentation transcript:

1 ESP Calling sequence

2 caller Parameters (in reverse order) ESP Calling sequence

3 caller Parameters (in reverse order) ESP Calling sequence Return address (next instruction)

4 caller callee new EBP parameters old EBP ESP Calling sequence Return address (next instruction)

5 caller callee saved registers parameters old EBP new EBP ESP Calling sequence Return address (next instruction)

6 caller saved registers parameters old EBP local variables callee new EBP ESP Calling sequence Return address (next instruction)

7 caller saved registers parameters old EBP local variables temporary storage callee new EBP ESP Stack frame of current subprogram Calling sequence Return address (next instruction)

8 caller saved registers parameters old EBP local variables temporary storage Working callee new EBP ESP Return address (next instruction) Stack frame of current subprogram

9 caller saved registers parameters old EBP local variables temporary storage Working callee new EBP ESP Return address (next instruction) Stack frame of current subprogram

10 caller saved registers parameters old EBP local variables temporary storage Working callee new EBP ESP Stack frame of current subprogram Return address (next instruction)

11 caller saved registers parameters old EBP local variables temporary storage Working callee new EBP ESP Stack frame of current subprogram Return address (next instruction)

12 caller saved registers parameters old EBP callee new EBP ESP Return sequence return value (if any) stored in EAX Return address (next instruction)

13 caller parameters old EBP callee new EBP ESP Return sequence Registers restored return value (if any) stored in EAX Return address (next instruction)

14 caller parameters ESP Return sequence Registers restored EBP restored return value (if any) stored in EAX Return address (next instruction)

15 caller parameters ESP return value (if any) stored in EAX control back to caller – at return address

16 caller ESP Return sequence return value (if any) stored in EAX

17 caller ESP Working

18 caller ESP Working

19 caller ESP Working


Download ppt "ESP Calling sequence. caller Parameters (in reverse order) ESP Calling sequence."

Similar presentations


Ads by Google