From ad1b0ab4509711803dbfff758026858abec65104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Wed, 26 Jan 2022 22:05:41 +0100 Subject: fix ar?x->ar --- lab1ucode.out | 8 ++++---- 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" -- cgit v1.2.1