]> Joshua Wise's Git repositories - fpgaboy.git/commitdiff
daa.txt
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Sun, 11 May 2008 06:56:14 +0000 (02:56 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Sun, 11 May 2008 06:56:14 +0000 (02:56 -0400)
daa.txt [new file with mode: 0644]

diff --git a/daa.txt b/daa.txt
new file mode 100644 (file)
index 0000000..74c374f
--- /dev/null
+++ b/daa.txt
@@ -0,0 +1,29 @@
+
+--------------------------------------------------------------------------------
+|           | C Flag | HEX value in | H Flag | HEX value in | Number  | C flag |
+| Operation | Before | upper digit  | Before | lower digit  | added   | After  |
+|           | DAA    | (bit 7-4)    | DAA    | (bit 3-0)    | to byte | DAA    |
+|------------------------------------------------------------------------------|
+|           |   0    |     0-9      |   0    |     0-9      |   00    |   0    |
+|   ADD     |   0    |     0-8      |   0    |     A-F      |   06    |   0    |
+|           |   0    |     0-9      |   1    |     0-3      |   06    |   0    |
+|   ADC     |   0    |     A-F      |   0    |     0-9      |   60    |   1    |
+|           |   0    |     9-F      |   0    |     A-F      |   66    |   1    |
+|   INC     |   0    |     A-F      |   1    |     0-3      |   66    |   1    |
+|           |   1    |     0-2      |   0    |     0-9      |   60    |   1    |
+|           |   1    |     0-2      |   0    |     A-F      |   66    |   1    |
+|           |   1    |     0-3      |   1    |     0-3      |   66    |   1    |
+|------------------------------------------------------------------------------|
+|       SUB |   0    |     0-9      |   0    |     0-9      |   00    |   0    |
+|       SBC |   0    |     0-8      |   1    |     6-F      |   FA    |   0    |
+|       DEC |   1    |     7-F      |   0    |     0-9      |   A0    |   1    |
+|       NEG |   1    |     6-F      |   1    |     6-F      |   9A    |   1    |
+|------------------------------------------------------------------------------|
+
+Flags:
+C: See instruction.
+N: Unaffected.
+P/V: Set if Acc. is even parity after operation, reset otherwise.
+H: See instruction.
+Z: Set if Acc. is Zero after operation, reset otherwise.
+S: Set if most significant bit of Acc. is 1 after operation, reset otherwise.
This page took 0.024407 seconds and 4 git commands to generate.