Chip8.Interpreter.Instruction.SUB (chip8 v0.1.0)
Subtracts the first operand with the second operand.
This operation always returns an 8-bit number, that is stored in the first operand. When an underflow happens, the result is always wrapped to fit into the specified size.
In some variants a borrow bit is also returned, when an underflow happens
the borrow bit will be 1
, and 0
otherwise.
variants
Variants
Opcode | Mnemonic | Description |
---|---|---|
8xy5 | SUB Vx, Vy | Set Vx = Vx - Vy and VF = NOT borrow . |