DAA

From GbdevWiki
Revision as of 08:31, 25 May 2012 by Beannaich (Talk | contribs) (Created page with ' +---+---+---+--------------+--------------+--------------+---------+ | N | H | C | Upper Nybble | Lower Nybble | Number Added | C After | +---+---+---+--------------+---------…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
+---+---+---+--------------+--------------+--------------+---------+
| N | H | C | Upper Nybble | Lower Nybble | Number Added | C After |
+---+---+---+--------------+--------------+--------------+---------+
| 0 | 0 | 0 | 9-0          | 0-9          | 00           | 0       |
| 0 | 0 | 0 | 0-8          | A-F          | 06           | 0       |
| 0 | 1 | 0 | 0-9          | 0-3          | 06           | 0       |
| 0 | 0 | 0 | A-F          | 0-9          | 60           | 1       |
| 0 | 0 | 0 | 9-F          | A-F          | 66           | 1       |
| 0 | 1 | 0 | A-F          | 0-3          | 66           | 1       |
| 0 | 0 | 1 | 0-2          | 0-9          | 60           | 1       |
| 0 | 0 | 1 | 0-2          | A-F          | 66           | 1       |
| 0 | 1 | 1 | 0-3          | 0-3          | 66           | 1       |
+---+---+---+--------------+--------------+--------------+---------+
| 1 | 0 | 0 | 0-9          | 0-9          | 00           | 0       |
| 1 | 1 | 0 | 0-8          | 6-F          | FA           | 0       |
| 1 | 0 | 1 | 7-F          | 0-9          | A0           | 1       |
+---+---+---+--------------+--------------+--------------+---------+

Instructions

DAA - $27 - 1 Machine Cycle

Flags

Z: 1 if Accumulator is zero after operation; 0 otherwise
N: not affected
H: see instruction
C: see instruction