Difference between revisions of "Ret"
From Unofficial QEdit Wiki Guide
Line 9: | Line 9: | ||
==Example== | ==Example== | ||
<span style='font-size:12px;font-family:courier'> | <span style='font-size:12px;font-family:courier'> | ||
− | <span style='color:blue'>100: </span><span style='color:green'>window_msg </span> 'You have seen this <R1> time(s)'<span style='color:orange'>\\Display message that prints the value of | + | <span style='color:blue'>100: </span><span style='color:green'>window_msg </span> 'You have seen this <R1> time(s)'<span style='color:orange'>\\Display message that prints the value of R1</span> |
<span style='color:green'> call </span>101 <span style='color:orange'>\\Call function 101</span> | <span style='color:green'> call </span>101 <span style='color:orange'>\\Call function 101</span> | ||
<span style='color:green'> msg_add </span> 'You have seen this <R1> time(s)'<span style='color:orange'>\\Display message with the new value of R1</span> | <span style='color:green'> msg_add </span> 'You have seen this <R1> time(s)'<span style='color:orange'>\\Display message with the new value of R1</span> |
Revision as of 09:05, 24 March 2011
Syntax: ret
Format
- None
Use
Used to return function back to caller
Example
100: window_msg 'You have seen this <R1> time(s)'\\Display message that prints the value of R1
call 101 \\Call function 101
msg_add 'You have seen this <R1> time(s)'\\Display message with the new value of R1
mesend
ret
101: leti R1, '00000001'\\Set R1 to 1
ret\\Function will now return to caller. Function 100