SBC

From GbdevWiki
Revision as of 08:15, 25 May 2012 by Beannaich (Talk | contribs) (Created page with 'The operand, along with the Carry flag (C in the F register) is subtracted from the contents of the Accumulator, and the result is stored in the Accumulator. == Instructions == …')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The operand, along with the Carry flag (C in the F register) is subtracted from the contents of the Accumulator, and the result is stored in the Accumulator.

Instructions

SBC B    - $98 - 1 Machine Cycle
SBC C    - $99 - 1 Machine Cycle
SBC D    - $9A - 1 Machine Cycle
SBC E    - $9B - 1 Machine Cycle
SBC H    - $9C - 1 Machine Cycle
SBC L    - $9D - 1 Machine Cycle
SBC (HL) - $9E - 2 Machine Cycle
SBC A    - $9F - 1 Machine Cycle
SBC $NN  - $D6 - 2 Machine Cycle

Flags

Z: 1 if result is zero; 0 otherwise
N: 1
H: 1 if borrow from bit 4; 0 otherwise
C: 1 if borrow; 0 otherwise