1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-10 14:29:30 +00:00

Add test to ensure decimal mode is respected for SBC

This commit is contained in:
Peter Evans 2018-02-26 20:33:33 -06:00
parent 0333e308e7
commit 724dbb1577

View File

@ -141,6 +141,11 @@ Test(mos6502_arith, sbc)
cpu->A = 16;
mos6502_handle_sbc(cpu, 8);
cr_assert_eq(cpu->A, 7);
cpu->P |= MOS_DECIMAL;
cpu->A = 0x12;
mos6502_handle_sbc(cpu, 0x3);
cr_assert_eq(cpu->A, 0x9);
}
Test(mos6502_arith, sbc_dec)