assembly - Finding out how many bytes separate esp and the stored return address on the program's stack -


i'm having trouble finding out answer. i've read %ebp has 32-bits, moving %esp %ebp you'll still have 32-bits, subtract 70 32, , don't understand rest. new i'm not proficient. please give detailed explanation. thank you!

below question having trouble with.

at end of sequence of instructions, how many bytes separate esp , stored return address on program's stack? assume called function using standard 32-bit x86 calling conventions.

804847c functioname: 804847c: push %ebp 804847d: mov %esp,%ebp 804847f: sub $0x70,%esp 8048482: movl $0x0,0x4(%esp) 804848a: movl $0x8048580,(%esp) 

sub $0x70,%esp : reserve 0x70 bytes on stack.

movl $0x0,0x4(%esp) : place 0 32-bit value argument.

movl $0x8048580,(%esp) : place address. next ret jump it.

by standard calling convention, named cdecl, arguments placed on stack followed address callee should return to.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -