SUB

From GbdevWiki
Revision as of 09:13, 25 May 2012 by Beannaich (Talk | contribs) (Created page with 'The operand is subtracted from the contents of the Accumulator, and the result is stored in the Accumulator. == Instructions == SUB B - $90 - 1 Machine Cycle SUB C - $9…')

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

The operand is subtracted from the contents of the Accumulator, and the result is stored in the Accumulator.

Instructions

SUB B    - $90 - 1 Machine Cycle
SUB C    - $91 - 1 Machine Cycle
SUB D    - $92 - 1 Machine Cycle
SUB E    - $93 - 1 Machine Cycle
SUB H    - $94 - 1 Machine Cycle
SUB L    - $95 - 1 Machine Cycle
SUB (HL) - $96 - 2 Machine Cycle
SUB A    - $97 - 1 Machine Cycle
SUB $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