1
0
mirror of https://github.com/pevans/erc-c.git synced 2025-02-11 14:30:40 +00:00

Account for carry being set by default

This commit is contained in:
Peter Evans 2018-01-23 16:30:52 -06:00
parent 746e2246b3
commit 5656b271ee

View File

@ -113,10 +113,10 @@ Test(mos6502_arith, sbc)
{ {
cpu->A = 5; cpu->A = 5;
mos6502_handle_sbc(cpu, 3); 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; cpu->A = 16;
mos6502_handle_sbc(cpu, 8); mos6502_handle_sbc(cpu, 8);
cr_assert_eq(cpu->A, 7); cr_assert_eq(cpu->A, 8);
} }