From 7fd5b507d5d89c00da899a17e06cc8fea34653c0 Mon Sep 17 00:00:00 2001 From: Neil Webber Date: Mon, 1 Apr 2024 07:56:22 -0500 Subject: [PATCH] missing import and fix _shifter when NN=0 per 1981 book. Issue Misc #10 --- op07.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/op07.py b/op07.py index ca2c743..0143ef0 100644 --- a/op07.py +++ b/op07.py @@ -34,6 +34,8 @@ # op076 is the commercial instruction set # +from pdptraps import PDPTraps + def op070_mul(cpu, inst): dstreg = (inst & 0o000700) >> 6 @@ -152,7 +154,7 @@ def _shifter(cpu, value, shift, *, opsize): cpu.psw_n = vsign cpu.psw_z = (value == 0) cpu.psw_v = 0 - # C is not altered + cpu.psw_c = 0 # per 1981 PDP11 Processor Handbook return value elif shift > 31: # right shift # sign extend if appropriate, so the sign propagates