1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-09-28 20:55:28 +00:00

Account for carry being set by default

This commit is contained in:
Peter Evans 2018-01-23 16:28:39 -06:00
parent b02679f6a0
commit dc97a6996e

View File

@ -10,9 +10,9 @@ Test(mos6502_arith, adc)
{
cpu->A = 5;
mos6502_handle_adc(cpu, 3);
cr_assert_eq(cpu->A, 8);
cr_assert_eq(cpu->A, 9);
cpu->P |= MOS_CARRY;
cpu->P &= ~MOS_CARRY;
mos6502_handle_adc(cpu, 64);
cr_assert_eq(cpu->A, 73);
}