summaryrefslogtreecommitdiffstats
path: root/lab1ucode.py
diff options
context:
space:
mode:
Diffstat (limited to 'lab1ucode.py')
-rw-r--r--lab1ucode.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lab1ucode.py b/lab1ucode.py
index 814ff4a..07b24f6 100644
--- a/lab1ucode.py
+++ b/lab1ucode.py
@@ -148,13 +148,12 @@ def compile(lines):
if hs == "0000000":
todo.append(inst)
- return ["{:02x}: {}".format(addr, line) for addr, line in linked], labels
- """
- todo:
- """
+ if todo:
+ print("todo", file=sys.stderr)
+ print("\n".join(todo), file=sys.stderr)
+ assert False
- print("todo")
- print("\n".join(todo))
+ return ["{:02x}: {}".format(addr, line) for addr, line in linked], labels
def write(prog, labels):