Sign in to follow this  
luca-deltodesco

x86 unusual code sequence

Recommended Posts

This is a question in a past paper, i'm hoping i can get a response in the next two hours before my test on the same module! because we're undecided on what the answer is (there are no solutions available) call next next: pop eax obviously eax will store the instruction pointer, but is it of the instruction 'call next' or 'pop eax'. I'm inclined to say that it will be the 'pop eax' but i'd like to be sure

Share this post


Link to post
Share on other sites
You're right.

The return address is what's pushed onto the stack, and it would be silly for a function to return back to the call instruction - you'd end up in an infinite loop any time you called a function.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this