From dc97a6996e2c6ebb7ad2c7eef6c00ad08912c9d4 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 23 Jan 2018 16:28:39 -0600 Subject: [PATCH] Account for carry being set by default --- tests/mos6502.arith.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mos6502.arith.c b/tests/mos6502.arith.c index d7a6228..7b8e143 100644 --- a/tests/mos6502.arith.c +++ b/tests/mos6502.arith.c @@ -10,9 +10,9 @@ Test(mos6502_arith, adc) { cpu->A = 5; mos6502_handle_adc(cpu, 3); - cr_assert_eq(cpu->A, 8); + cr_assert_eq(cpu->A, 9); - cpu->P |= MOS_CARRY; + cpu->P &= ~MOS_CARRY; mos6502_handle_adc(cpu, 64); cr_assert_eq(cpu->A, 73); }