diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2022-01-26 21:46:46 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2022-01-26 21:46:54 +0100 |
| commit | 09e77a2437eaef1883c330abe21c4287a9c3093a (patch) | |
| tree | 9c9a0be610aef1ee87a7a380a0e0cec5cd17b58a | |
| parent | cf914416a8ff7a50943193cebcddc2bc01ebe8c4 (diff) | |
| download | tsea83-09e77a2437eaef1883c330abe21c4287a9c3093a.tar.gz | |
ar &
| -rw-r--r-- | lab1ucode.out | 2 | ||||
| -rw-r--r-- | lab1ucode.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lab1ucode.out b/lab1ucode.out index 20e9804..3f5e6e8 100644 --- a/lab1ucode.out +++ b/lab1ucode.out @@ -28,7 +28,7 @@ prog: 1a: 0130000 1b: 0000180 1c: 0280000 -1d: 0200000 +1d: 0d00000 1e: 0130000 1f: 0000180 20: 0000780 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" |
