mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-23 23:32:45 +00:00
Test decimal mode with ADC
This commit is contained in:
parent
30c07df9cb
commit
0333e308e7
@ -15,6 +15,12 @@ Test(mos6502_arith, adc)
|
||||
cpu->P &= ~MOS_CARRY;
|
||||
mos6502_handle_adc(cpu, 64);
|
||||
cr_assert_eq(cpu->A, 73);
|
||||
|
||||
// This should handle decimal mode without complaint
|
||||
cpu->P |= MOS_DECIMAL;
|
||||
cpu->A = 0x18;
|
||||
mos6502_handle_adc(cpu, 0x3);
|
||||
cr_assert_eq(cpu->A, 0x21);
|
||||
}
|
||||
|
||||
Test(mos6502_arith, adc_dec)
|
||||
|
Loading…
Reference in New Issue
Block a user