irdcat/wasm-invaders

DAA instruction works improperly when both flags are set

Closed this issue · 0 comments

PC: 05BD AF: 1013 BC: FFFF DE: 3333 HL: DDDD SP: 07BD Flags: { C: 1 P: 0 AC: 1 Z: 0 S: 0} Cycles: 3854    

DAA

PC: 05BE AF: 7707 BC: FFFF DE: 3333 HL: DDDD SP: 07BD Flags: { C: 1 P: 1 AC: 0 Z: 0 S: 0} Cycles: 3858    

CPI 76

PC: 05C0 AF: 7712 BC: FFFF DE: 3333 HL: DDDD SP: 07BD Flags: { C: 0 P: 0 AC: 1 Z: 0 S: 0} Cycles: 3865    

CNZ 6A0

PC: 06A0 AF: 7712 BC: FFFF DE: 3333 HL: DDDD SP: 07BB Flags: { C: 0 P: 0 AC: 1 Z: 0 S: 0} Cycles: 3882

ASM code

        DAA
        CPI 076H
        CNZ CPUER   ;TEST "DAA"