mirror of
https://github.com/pevans/erc-c.git
synced 2025-02-26 06:29:15 +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;
|
cpu->P |= INTERRUPT;
|
||||||
mos6502_push_stack(cpu, cpu->PC);
|
mos6502_push_stack(cpu, cpu->PC);
|
||||||
|
mos6502_push_stack(cpu, cpu->P);
|
||||||
cpu->PC += 2;
|
cpu->PC += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +55,7 @@ DEFINE_INST(nop)
|
|||||||
*/
|
*/
|
||||||
DEFINE_INST(rti)
|
DEFINE_INST(rti)
|
||||||
{
|
{
|
||||||
|
cpu->P = mos6502_pop_stack(cpu);
|
||||||
cpu->PC = mos6502_pop_stack(cpu);
|
cpu->PC = mos6502_pop_stack(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user