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 


[Help] The 'Call' and 'Ret' Functions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Wed Jun 06, 2007 11:52 pm    Post subject: [Help] The 'Call' and 'Ret' Functions Reply with quote

Ok, I posted a script earlier on in the AA Tutorials section, whose sole purpose was to help me understand the 'Call' and 'Ret' functions, however no one has seemed to answer me.

Here is my script (it's of no real use) for Minesweeper, and I was wondering if I was correctly using the 'Call' and 'Ret' functions. If not, could someone help me with how my script SHOULD be, and possibly write a short script that could explain the two functions? Any help is deeply appreciated.

Code:

[enable]
alloc(Time,256) //Blah blah blah
alloc(Chicken,256)
label(Time)
label(Chicken)

01002FF5: //The address of the time
jmp Time
nop

Time:
mov [0100579C],10 //Move 10 into the value of Time
cmp [0100579C],0 //Compare it to 0
call Chicken //Call Chicken (I'm trying to learn about this function
jmp 01002FF5 //Which is the whole point of this script, I don't know
                     //If I used it right here
Chicken:
dec [0100579C] //Decrease the time
cmp [0100579C],0 //Compare it to 0
jne Chicken //If it's not equal, then jmp back to the beggining of Chicken
ret //Otherwise, return to where you were in the last script, after
    //call Chicken
[disable]
dealloc(Time) //Blah blah blah
dealloc(Chicken)

01002FF5:
inc [0100579C] //Original opcode


Edit:

Unfortunately, I don't have Adobe Reader, and therefore don't have access to many great resources that are provided on this forum. If this has already been answered in one of the .PDF files, then I'm sorry, and maybe you could just quote it or something. Once again, any help is deeply appreciated. =)
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Thu Jun 07, 2007 12:10 am    Post subject: Reply with quote

correct
_________________
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Thu Jun 07, 2007 8:13 am    Post subject: Reply with quote

Alright, thanks. =)

Edit: I coulda swore I put this in the Cheat Engine Tutorial's section... o.o;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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