Doh, have to MMR1 record JSR stackpush
This commit is contained in:
parent
b9b60faea5
commit
797ccc3273
1 changed files with 1 additions and 0 deletions
1
op00.py
1
op00.py
|
@ -53,6 +53,7 @@ def op00_4_jsr(cpu, inst):
|
||||||
# NOTE: no condition code modifications
|
# NOTE: no condition code modifications
|
||||||
|
|
||||||
# cpu.logger.debug(f"JSR to {oct(tmp)} from {oct(cpu.r[cpu.PC])}")
|
# cpu.logger.debug(f"JSR to {oct(tmp)} from {oct(cpu.r[cpu.PC])}")
|
||||||
|
cpu.mmu.MMR1mod(0o366) # the encoding for -2 on sp
|
||||||
cpu.stackpush(cpu.r[Rn])
|
cpu.stackpush(cpu.r[Rn])
|
||||||
cpu.r[Rn] = cpu.r[cpu.PC] # this could be a no-op if Rn == 7
|
cpu.r[Rn] = cpu.r[cpu.PC] # this could be a no-op if Rn == 7
|
||||||
cpu.r[cpu.PC] = tmp
|
cpu.r[cpu.PC] = tmp
|
||||||
|
|
Loading…
Add table
Reference in a new issue