diff --git a/op4.py b/op4.py index 996d3d7..1b23727 100644 --- a/op4.py +++ b/op4.py @@ -55,10 +55,10 @@ from pdptraps import PDPTraps def d3dispatcher(d3table, cpu, inst): - opf = d3table[(inst & 0o7000) >> 9] - if opf is None: - raise PDPTraps.ReservedInstruction - opf(cpu, inst) + try: + d3table[(inst & 0o7000) >> 9](cpu, inst) + except TypeError: # means a None was in d3table + raise PDPTraps.ReservedInstruction from None # This is ALWAYS a 16-bit MOV