Difference between revisions of "Add"
From Unofficial QEdit Wiki Guide
Line 6: | Line 6: | ||
==Use== | ==Use== | ||
− | Used to add the value of one register to another. | + | Used to add the value of one register to another. For adding integers to registers see [[addi]] |
==Example== | ==Example== |
Revision as of 12:21, 28 March 2011
Contents
Syntax
Syntax: add register1, register2
- register1 = Register to add to
- register2 = Register to add from
Use
Used to add the value of one register to another. For adding integers to registers see addi
Example
100: leti R1, '00000004' //Set R1 to 4
leti R2, '00000006' //Set R2 to 6
window_msg 'Register 1 = <R1>' //Display the value of R1 in a window message
add R1, R2 //Add R2 to R1
add_msg 'Register 1 = <R1>' //Display the new value of R1 in a window message
winend //Close window message
ret
Also see
leti, window_msg, add_msg, winend, ret