Difference between revisions of "Addi"
From Unofficial QEdit Wiki Guide
Line 11: | Line 11: | ||
<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'>leti </span>R1, '00000001' <span style='color:orange'>//Set R1 to 1</span> | <span style='color:blue'>100: </span><span style='color:green'>leti </span>R1, '00000001' <span style='color:orange'>//Set R1 to 1</span> | ||
− | <span style='color:green'> window_msg </span>'Register 1 = < | + | <span style='color:green'> window_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the value of R1 in a window message (1)</span> |
<span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | <span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | ||
− | <span style='color:green'> add_msg </span>'Register 1 = < | + | <span style='color:green'> add_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the new value of R1 in a window message (2)</span> |
<span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | <span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | ||
− | <span style='color:green'> add_msg </span>'Register 1 = < | + | <span style='color:green'> add_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the new value of R1 in a window message (3)</span> |
<span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | <span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | ||
− | <span style='color:green'> add_msg </span>'Register 1 = < | + | <span style='color:green'> add_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the new value of R1 in a window message (4)</span> |
<span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | <span style='color:green'> addi </span>R1, '00000001' <span style='color:orange'>//Add 1 to R1</span> | ||
<span style='color:green'> winend </span> <span style='color:orange'>//Close window message</span> | <span style='color:green'> winend </span> <span style='color:orange'>//Close window message</span> |
Latest revision as of 13:09, 12 April 2011
Contents
Syntax
Syntax: addi register1, xxxxxxxx
- register1 = Register to add to
- xxxxxxxx = Integer value to add
Use
Used to add a integer value to a register. For adding registers to registers see add
Example
100: leti R1, '00000001' //Set R1 to 1
window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message (1)
addi R1, '00000001' //Add 1 to R1
add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (2)
addi R1, '00000001' //Add 1 to R1
add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (3)
addi R1, '00000001' //Add 1 to R1
add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (4)
addi R1, '00000001' //Add 1 to R1
winend //Close window message
ret
Also see
leti, window_msg, add_msg, winend, ret