diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2022-01-26 22:05:41 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2022-01-26 22:05:41 +0100 |
| commit | ad1b0ab4509711803dbfff758026858abec65104 (patch) | |
| tree | b394da203ca5b08b33fd436d17bfd9eeb23b0c80 | |
| parent | 44a5c3168627fdd21627454148f92daaa5bf4f2c (diff) | |
| download | tsea83-ad1b0ab4509711803dbfff758026858abec65104.tar.gz | |
fix ar?x->ar
| -rw-r--r-- | lab1ucode.out | 8 | ||||
| -rw-r--r-- | lab1ucode.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lab1ucode.out b/lab1ucode.out index 7f853a4..c6fe8a4 100644 --- a/lab1ucode.out +++ b/lab1ucode.out @@ -20,15 +20,15 @@ prog: 12: 0190000 13: 0000180 14: 0280000 -15: 0900000 +15: 0980000 16: 0130000 17: 0000180 18: 0280000 -19: 0b00000 +19: 0b80000 1a: 0130000 1b: 0000180 1c: 0280000 -1d: 0d00000 +1d: 0d80000 1e: 0130000 1f: 0000180 20: 0380000 @@ -43,7 +43,7 @@ prog: 29: 0000180 2a: 0000780 2b: 0280000 -2c: 0b00000 +2c: 0b80000 2d: 0000180 2e: 0000180 2f: 0000180 diff --git a/lab1ucode.py b/lab1ucode.py index e9b0fc1..3def9b8 100644 --- a/lab1ucode.py +++ b/lab1ucode.py @@ -76,21 +76,21 @@ def compile(lines): if "+" in fr: if "+'" in fr: # ignore flags - other = fr.split("+'")[0] + other = fr.split("+'")[1] alu = "1000" else: - other = fr.split("+")[0] + other = fr.split("+")[1] alu = "0100" tb = TB[other] # alu subtraction if "-" in fr: - other = fr.split("-")[0] + other = fr.split("-")[1] tb = TB[other] alu = "0101" if "&" in fr: - other = fr.split("&")[0] + other = fr.split("&")[1] tb = TB[other] alu = "0110" |
