From 1e6ab47f40eb2a2a457a8e4f581a070856f2a323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sat, 10 Jul 2021 02:21:36 +0300 Subject: [PATCH] Add debug print --- sipsi-8.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sipsi-8.py b/sipsi-8.py index b459c04..7c5f4b8 100644 --- a/sipsi-8.py +++ b/sipsi-8.py @@ -116,8 +116,12 @@ def step(): # 0nnn call_machine elif high_byte >> 4 == 0: - print("%03x: Can't call machine language!" % (ip - 2)) - sys.exit(1) + # Our own non-standard debug + if high_byte & 0xf == 0x1: + print(low_byte & 0xf, data_registers[low_byte & 0xf]) + else: + print("%03x: Can't call machine language!" % (ip - 2)) + sys.exit(1) # 1nnn jmp nnn elif high_byte >> 4 == 1: