View Source Chip8.Interpreter.Instruction.SUBN (chip8 v1.0.0)
Subtracts the second operand with the first 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 |
---|---|---|
8xy7 | SUBN Vx, Vy | Set Vx = Vy - Vx and VF = NOT borrow . |