Difference between revisions of "Leti"
From Unofficial QEdit Wiki Guide
(2 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
==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'> | + | <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'> | + | <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'> | + | <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'> mesend </span> | <span style='color:green'> mesend </span> | ||
<span style='color:green'> ret</span> | <span style='color:green'> ret</span> | ||
− | <span style='color:blue'>101: </span><span style='color:green'>leti </span> R1, '00000001' <span style='color:orange'> | + | <span style='color:blue'>101: </span><span style='color:green'>leti </span> R1, '00000001' <span style='color:orange'>//Set R1 to 1</span> |
− | <span style='color:green'> ret </span><span style='color:orange'> | + | <span style='color:green'> ret </span><span style='color:orange'>//Function will now return to caller. Function 100</span> |
</span> | </span> | ||
− | == | + | ==Also see== |
− | [[add_msg]], [[mesend]], [[call]], [[window_msg]], [[ret]] | + | [[add_msg]], [[mesend]], [[call]], [[window_msg]], [[ret]], [[let]] |
Latest revision as of 07:16, 28 March 2011
Contents
Syntax
Syntax: leti register, xxxxxxxx
- register = Register to set value
- xxxxxxxx = Hex value to set register to
Use
Used to set a register to specific integer value
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