1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-27 20:51:17 +00:00

We need to account for the P register on the stack

This commit is contained in:
Peter Evans 2017-12-09 14:52:55 -06:00
parent f44b029083
commit a720246e26

View File

@ -47,6 +47,8 @@ Test(mos6502_exec, nop)
Test(mos6502_exec, rti) Test(mos6502_exec, rti)
{ {
mos6502_push_stack(cpu, 222); mos6502_push_stack(cpu, 222);
mos6502_push_stack(cpu, cpu->P);
mos6502_handle_rti(cpu, 0); mos6502_handle_rti(cpu, 0);
cr_assert_eq(cpu->PC, 222); cr_assert_eq(cpu->PC, 222);