From 522905b39c1e461fca7ae0a3d421215733a30542 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Tue, 23 Jan 2018 16:24:46 -0600 Subject: [PATCH] Carry must be unset in this test --- tests/mos6502.addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mos6502.addr.c b/tests/mos6502.addr.c index 1d3ce7f..dfab728 100644 --- a/tests/mos6502.addr.c +++ b/tests/mos6502.addr.c @@ -52,6 +52,7 @@ Test(mos6502_addr, addr_mode_aby_carry0) SET_PC_BYTE(cpu, 1, 0x30); SET_PC_BYTE(cpu, 2, 0x12); cpu->Y = 4; + cpu->P = cpu->P & ~MOS_CARRY; cr_assert_eq(mos6502_resolve_aby(cpu), 111); } @@ -61,7 +62,6 @@ Test(mos6502_addr, addr_mode_aby_carry1) SET_PC_BYTE(cpu, 1, 0x30); SET_PC_BYTE(cpu, 2, 0x12); cpu->Y = 3; - cpu->P = cpu->P | MOS_CARRY; cr_assert_eq(mos6502_resolve_aby(cpu), 111); }