samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Jun 06, 2007 11:52 pm Post subject: [Help] The 'Call' and 'Ret' Functions |
|
|
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. =)
|
|