From 5656b271ee8a6c794399234cd2c0f2545ece4b9d Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 23 Jan 2018 16:30:52 -0600 Subject: [PATCH] Account for carry being set by default --- tests/mos6502.arith.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/mos6502.arith.c b/tests/mos6502.arith.c index 4e654fc..0ad85c2 100644 --- a/tests/mos6502.arith.c +++ b/tests/mos6502.arith.c @@ -113,10 +113,10 @@ Test(mos6502_arith, sbc) { cpu->A = 5; mos6502_handle_sbc(cpu, 3); - cr_assert_eq(cpu->A, 2); + cr_assert_eq(cpu->A, 1); - cpu->P |= MOS_CARRY; + cpu->P &= ~MOS_CARRY; cpu->A = 16; mos6502_handle_sbc(cpu, 8); - cr_assert_eq(cpu->A, 7); + cr_assert_eq(cpu->A, 8); }