Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Call and Ret in assembly

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
ernie
Expert Cheater
Reputation: 0

Joined: 05 Oct 2007
Posts: 123

PostPosted: Sun Apr 27, 2008 4:14 am    Post subject: Call and Ret in assembly Reply with quote

Do calls process all the instructions at the specifed location until they hit a ret and THEN go back to where it was first "Called"? Or does it just perform the single instruction and then bounce back?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Apr 27, 2008 4:50 am    Post subject: Reply with quote

When the call instruction is executed, the address of the instruction immediately follwing the call (known as return address) is pushed onto the stack and execution jumps to the function received as an argument (copies address of the procedure into EIP). When RET is reached, the return address is taken from the stack and execution jumps there instead (top of stack popped into EIP).
Back to top
View user's profile Send private message
me
Grandmaster Cheater
Reputation: 2

Joined: 24 Jun 2004
Posts: 733
Location: location location

PostPosted: Sun Apr 27, 2008 5:40 am    Post subject: Re: Call and Ret in assembly Reply with quote

ernie wrote:
Do calls process all the instructions at the specifed location until they hit a ret and THEN go back to where it was first "Called"? Or does it just perform the single instruction and then bounce back?



yes it processes all the intructions at the specified location until a return is hit,

then like slugsnack says it returns to the next instruction after the call,

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites