diff options
| -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" |
