This command adds a number to the value stored in register Mi, where Mi is M0 - M15.
Mi registers are 4-bits wide and can store numbers from 0 to 15.
There are sixteen 4-bit registers.
Addition can be performed on 8-bit registers using Xi, where Xi is X0 - X7.
Xi registers are 8-bits wide and can store numbers from 0 to 255.
There is a maximum of eight 8-bit registers.
|
Code Example |
Meaning |
|
M2=M2+3 |
Add the integer number 2 to the value stored in 4-bit register M2. |
|
M2=M2+0011b |
Add the binary number 0011 to the value stored in 4-bit register M2. |
|
M2=M2+0Ah |
Add the hex number A to the value stored in 4-bit register M2. |
|
X4=X4+127 |
Add the integer number 127 to the value stored in 8-bit register X4. |
|
X4=X4+01111111b |
Add the binary number 01111111 to the value stored in 8-bit register X4. |
|
X4=X4+07Fh |
Add the hex number 7F to the value stored in 8-bit register X4. |