summaryrefslogtreecommitdiffstats
path: root/lab1ucode.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2022-01-27 00:40:08 +0100
committerGustav Sörnäs <gustav@sornas.net>2022-01-27 00:40:08 +0100
commita42b91bd790eb134cf896d55616999628d690cc2 (patch)
treed2e948b7994c1335151ba07f618119eff09d3994 /lab1ucode.py
parent2c21d9d4723f29acdb16d963a934707cf7574de9 (diff)
downloadtsea83-a42b91bd790eb134cf896d55616999628d690cc2.tar.gz
syntax in ucode
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):