1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-28 01:29:37 +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;
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);
}