mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 23:29:16 +00:00
Fix incorrect stack info
(The previous behavior of RTS/JSR was not right.)
This commit is contained in:
parent
2e334e2ee1
commit
c946eb3f69
@ -36,7 +36,7 @@ Test(mos6502_exec, jsr)
|
|||||||
|
|
||||||
cr_assert_eq(cpu->PC, 235);
|
cr_assert_eq(cpu->PC, 235);
|
||||||
|
|
||||||
cr_assert_eq(mos6502_pop_stack(cpu), 126);
|
cr_assert_eq(mos6502_pop_stack(cpu), 125);
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(mos6502_exec, nop)
|
Test(mos6502_exec, nop)
|
||||||
@ -57,8 +57,8 @@ Test(mos6502_exec, rti)
|
|||||||
|
|
||||||
Test(mos6502_exec, rts)
|
Test(mos6502_exec, rts)
|
||||||
{
|
{
|
||||||
mos6502_push_stack(cpu, 333);
|
mos6502_push_stack(cpu, 233);
|
||||||
mos6502_handle_rts(cpu, 0);
|
mos6502_handle_rts(cpu, 0);
|
||||||
|
|
||||||
cr_assert_eq(cpu->PC, 333);
|
cr_assert_eq(cpu->PC, 234);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user