View Source Chip8.Interpreter.Instruction.ADD (chip8 v1.1.0)
Adds the first operand with the second operand.
This operation always returns an 8-bit number, that is stored in the first operand. When an _overflow happens, the result is always wrapped to fit into the specified size.
In some variants a carry bit is also returned, when an overflow happens
the carry bit will be 1, and 0 otherwise.
variants
Variants
| Opcode | Mnemonic | Description |
|---|---|---|
7xkk | ADD Vx, byte | Set Vx = Vx + byte. |
8xy4 | ADD Vx, Vy | Set Vx = Vx + Vy and VF = carry. |
Fx1E | ADD I, Vx | Set I = I + Vx. |