Jump to content
  • Advertisement
Sign in to follow this  
luca-deltodesco

x86 unusual code sequence

This topic is 2950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!