mirror of
https://github.com/pevans/erc-c.git
synced 2025-08-10 17:24:58 +00:00
This form needs two RORs to work
That's because the first ROR pushes the 1 in bit0 into the carry bit; the second moves the carry bit into the bit7 position, which will match 128.
This commit is contained in:
@@ -106,6 +106,7 @@ Test(mos6502_bits, ror)
|
|||||||
cr_assert_eq(cpu->A, 160);
|
cr_assert_eq(cpu->A, 160);
|
||||||
|
|
||||||
cpu->eff_addr = 123;
|
cpu->eff_addr = 123;
|
||||||
|
mos6502_handle_ror(cpu, 1);
|
||||||
mos6502_handle_ror(cpu, 0);
|
mos6502_handle_ror(cpu, 0);
|
||||||
cr_assert_eq(mos6502_get(cpu, 123), 128);
|
cr_assert_eq(mos6502_get(cpu, 123), 128);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user