mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 08:30:55 +00:00
Test that ASL sets carry
This commit is contained in:
parent
724dbb1577
commit
26e2abe745
@ -22,6 +22,12 @@ Test(mos6502_bits, asl)
|
||||
mos6502_handle_asl(cpu, 5);
|
||||
cr_assert_eq(cpu->A, 10);
|
||||
|
||||
// Test if carry is set properly
|
||||
cpu->P &= ~MOS_CARRY;
|
||||
mos6502_handle_asl(cpu, 150);
|
||||
cr_assert_eq(cpu->A, 44);
|
||||
cr_assert_eq(cpu->P & MOS_CARRY, MOS_CARRY);
|
||||
|
||||
cpu->eff_addr = 123;
|
||||
mos6502_handle_asl(cpu, 22);
|
||||
cr_assert_eq(mos6502_get(cpu, 123), 44);
|
||||
|
Loading…
Reference in New Issue
Block a user