mirror of
https://github.com/pevans/erc-c.git
synced 2024-10-15 15:24:24 +00:00
Carry must also be factored in
This commit is contained in:
parent
5656b271ee
commit
0b03fd24f5
@ -74,8 +74,8 @@ Test(mos6502_bits, lsr)
|
||||
cr_assert_eq(cpu->P & MOS_CARRY, MOS_CARRY);
|
||||
|
||||
cpu->eff_addr = 123;
|
||||
mos6502_handle_lsr(cpu, 22);
|
||||
cr_assert_eq(mos6502_get(cpu, 123), 11);
|
||||
mos6502_handle_lsr(cpu, 11);
|
||||
cr_assert_eq(mos6502_get(cpu, 123), 5);
|
||||
cr_assert_eq(cpu->P & MOS_CARRY, MOS_CARRY);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ Test(mos6502_bits, ora)
|
||||
Test(mos6502_bits, rol)
|
||||
{
|
||||
mos6502_handle_rol(cpu, 8);
|
||||
cr_assert_eq(cpu->A, 16);
|
||||
cr_assert_eq(cpu->A, 17);
|
||||
|
||||
cpu->eff_addr = 234;
|
||||
mos6502_handle_rol(cpu, 128);
|
||||
@ -103,7 +103,7 @@ Test(mos6502_bits, rol)
|
||||
Test(mos6502_bits, ror)
|
||||
{
|
||||
mos6502_handle_ror(cpu, 64);
|
||||
cr_assert_eq(cpu->A, 32);
|
||||
cr_assert_eq(cpu->A, 160);
|
||||
|
||||
cpu->eff_addr = 123;
|
||||
mos6502_handle_ror(cpu, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user