From 5df044e44c1827eea3729ff87a510702e1ffdfce Mon Sep 17 00:00:00 2001 From: outofmbufs Date: Tue, 8 Apr 2025 22:35:02 -0500 Subject: [PATCH] Really fix #23, this time without making Unix crash --- op000.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op000.py b/op000.py index eec3519..e6896e5 100644 --- a/op000.py +++ b/op000.py @@ -52,7 +52,7 @@ def op_rtt(cpu, inst): # this knows KERNEL < SUPERVISOR < USER newpsw_d['curmode'] = max(cpu.psw_curmode, newpsw_d['curmode']) - newpsw_d['prevmode'] = max(cpu.psw_prevmode, newpsw_d['prevmode']) + newpsw_d['prevmode'] = max(cpu.psw_curmode, newpsw_d['prevmode']) # if not in kernel mode, cannot change pri if cpu.psw_curmode != cpu.KERNEL: