Difference between revisions of "Call"
From Unofficial QEdit Wiki Guide
Line 13: | Line 13: | ||
<span style='color:green'> winend </span> | <span style='color:green'> winend </span> | ||
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
− | <span style='color:blue'>101 | + | <span style='color:blue'>101: </span><span style='color:green'>sync </span><span style='color:orange'>//Pause for 1 frame</span> |
− | + | <span style='color:green'> addi </span>R1, 00000001 <span style='color:orange'>//Add 1 to register R1</span> | |
− | + | <span style='color:green'> jmpi_<= </span>R1, 0000001E, 101 <span style='color:orange'>//If R1 is less then or equal to 30 jump to 101</span> | |
− | + | <span style='color:green'> clear </span>R1 <span style='color:orange'>//Set R1 to 0</span> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | <span style='color:green'> | + | |
− | <span style='color:green'> | + | |
− | + | ||
− | <span style='color:green'> | + | |
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
</span> | </span> | ||
− | == | + | ==Also see== |
− | [[ret]], [[sync]], [[window_msg]], [[winend]] | + | [[ret]], [[sync]], [[window_msg]], [[winend]], [[addi]], [[jmpiule|jmp_<=]], [[clear]] |
Latest revision as of 07:18, 28 March 2011
Contents
Syntax
Syntax: call Function
- Function = Function number to call up
Use
Used to call a function and then return to the function that called it.
Example
100: call 101 //Call function 101
window_msg 'Okay. I've waited 1 second. Now what?'
winend
ret
101: sync //Pause for 1 frame
addi R1, 00000001 //Add 1 to register R1
jmpi_<= R1, 0000001E, 101 //If R1 is less then or equal to 30 jump to 101
clear R1 //Set R1 to 0
ret