summaryrefslogtreecommitdiffstats
path: root/lab1ucode.py
diff options
context:
space:
mode:
Diffstat (limited to 'lab1ucode.py')
-rw-r--r--lab1ucode.py8
1 files changed, 4 insertions, 4 deletions
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"