Add debug print
This commit is contained in:
parent
c360c96b69
commit
1e6ab47f40
1 changed files with 6 additions and 2 deletions
|
@ -116,8 +116,12 @@ def step():
|
||||||
|
|
||||||
# 0nnn call_machine
|
# 0nnn call_machine
|
||||||
elif high_byte >> 4 == 0:
|
elif high_byte >> 4 == 0:
|
||||||
print("%03x: Can't call machine language!" % (ip - 2))
|
# Our own non-standard debug
|
||||||
sys.exit(1)
|
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
|
# 1nnn jmp nnn
|
||||||
elif high_byte >> 4 == 1:
|
elif high_byte >> 4 == 1:
|
||||||
|
|
Loading…
Reference in a new issue