HALT in user mode is ReservedInst, not AddressError
This commit is contained in:
parent
d0de30614f
commit
4651d137f7
1 changed files with 4 additions and 2 deletions
6
op000.py
6
op000.py
|
@ -29,8 +29,10 @@ from branches import branch
|
||||||
|
|
||||||
def op_halt(cpu, inst):
|
def op_halt(cpu, inst):
|
||||||
if cpu.psw_curmode != cpu.KERNEL:
|
if cpu.psw_curmode != cpu.KERNEL:
|
||||||
# strange trap, but that's what it says
|
# In the 1979 PDP-11/70 handbook it says trap 4 for non-kernel HALT.
|
||||||
raise PDPTraps.AddressError(cpu.CPUERR_BITS.ILLHALT)
|
# An 11/40 book says trap 10 (ReservedInst, makes more sense).
|
||||||
|
# SIMH says trap 10. Going with that.
|
||||||
|
raise PDPTraps.ReservedInstruction(cpu.CPUERR_BITS.ILLHALT)
|
||||||
cpu.halted = True
|
cpu.halted = True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue