-------------------------------------------------------------------------------- | | 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.