1
0
mirror of https://github.com/pevans/erc-c.git synced 2025-08-07 14:25:08 +00:00

Carry is only unset if the operand >= A

This commit is contained in:
Peter Evans
2018-01-23 16:29:08 -06:00
parent dc97a6996e
commit 3c7002c6c7

View File

@@ -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);