From 3c7002c6c7cad2102af3034dfee771d5e4583d57 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 23 Jan 2018 16:29:08 -0600 Subject: [PATCH] Carry is only unset if the operand >= A --- tests/mos6502.arith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mos6502.arith.c b/tests/mos6502.arith.c index 7b8e143..867b4aa 100644 --- a/tests/mos6502.arith.c +++ b/tests/mos6502.arith.c @@ -26,7 +26,7 @@ Test(mos6502_arith, cmp) cr_assert_eq(cpu->P & MOS_ZERO, 0); cpu->A = 3; - mos6502_handle_cmp(cpu, 3); + mos6502_handle_cmp(cpu, 4); cr_assert_eq(cpu->P & MOS_CARRY, 0); cr_assert_eq(cpu->P & MOS_NEGATIVE, 0); cr_assert_eq(cpu->P & MOS_ZERO, MOS_ZERO);