mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 08:30:55 +00:00
Add test to ensure decimal mode is respected for SBC
This commit is contained in:
parent
0333e308e7
commit
724dbb1577
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user