summaryrefslogtreecommitdiffstats
path: root/lab1ucode.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2022-01-26 21:46:46 +0100
committerGustav Sörnäs <gustav@sornas.net>2022-01-26 21:46:54 +0100
commit09e77a2437eaef1883c330abe21c4287a9c3093a (patch)
tree9c9a0be610aef1ee87a7a380a0e0cec5cd17b58a /lab1ucode.py
parentcf914416a8ff7a50943193cebcddc2bc01ebe8c4 (diff)
downloadtsea83-09e77a2437eaef1883c330abe21c4287a9c3093a.tar.gz
ar &
Diffstat (limited to 'lab1ucode.py')
-rw-r--r--lab1ucode.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lab1ucode.py b/lab1ucode.py
index 6c74130..e9b0fc1 100644
--- a/lab1ucode.py
+++ b/lab1ucode.py
@@ -89,6 +89,11 @@ def compile(lines):
tb = TB[other]
alu = "0101"
+ if "&" in fr:
+ other = fr.split("&")[0]
+ tb = TB[other]
+ alu = "0110"
+
if inst == "pc++":
p = "1"