mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-27 20:51:17 +00:00
We should be pushing and popping status
This commit is contained in:
parent
ccf16dd970
commit
b0aa6d400a
@ -16,6 +16,7 @@ DEFINE_INST(brk)
|
||||
{
|
||||
cpu->P |= INTERRUPT;
|
||||
mos6502_push_stack(cpu, cpu->PC);
|
||||
mos6502_push_stack(cpu, cpu->P);
|
||||
cpu->PC += 2;
|
||||
}
|
||||
|
||||
@ -54,6 +55,7 @@ DEFINE_INST(nop)
|
||||
*/
|
||||
DEFINE_INST(rti)
|
||||
{
|
||||
cpu->P = mos6502_pop_stack(cpu);
|
||||
cpu->PC = mos6502_pop_stack(cpu);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user