mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 08:30:55 +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:
parent
d590a809d8
commit
2318b1917a
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user