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:
parent
746e2246b3
commit
5656b271ee
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user