summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2022-01-26 21:55:51 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2022-01-26 21:55:51 +0100
commit44a5c3168627fdd21627454148f92daaa5bf4f2c (patch)
tree54e801342a20751693b5222d586d028b9dd5a436
parent1ed4e1969232d91c0b5a45d91e1952f904d18650 (diff)
parent4d9803d6a8095af68a835cd7ab8beb3872dbb585 (diff)
downloadtsea83-44a5c3168627fdd21627454148f92daaa5bf4f2c.tar.gz
Merge branch 'main' of sornas:liu/tsea83 into main
-rw-r--r--lab1-2.mia8
-rw-r--r--lab1ucode.in14
-rw-r--r--lab1ucode.out40
3 files changed, 31 insertions, 31 deletions
diff --git a/lab1-2.mia b/lab1-2.mia
index 25816e6..4e15094 100644
--- a/lab1-2.mia
+++ b/lab1-2.mia
@@ -393,10 +393,10 @@ K1:
03: 18
04: 1c
05: 20
-06: 21
-07: 24
-08: 2c
-09: 2d
+06: 28
+07: 29
+08: 2a
+09: 2b
0a: 2e
0b: 2f
0c: 00
diff --git a/lab1ucode.in b/lab1ucode.in
index 6dc2b3f..d1b8283 100644
--- a/lab1ucode.in
+++ b/lab1ucode.in
@@ -39,13 +39,6 @@ pm->ar
ar&grx->ar
ar->grx, 0->upc
-halt:
-halt
-
-cmp:
-pm->ar
-ar-grx->ar, 0->upc
-
lsr:
grx->ar
pm->lc
@@ -61,6 +54,13 @@ bra:
bne:
0->upc
+halt:
+halt
+
+cmp:
+pm->ar
+ar-grx->ar, 0->upc
+
bge:
0->upc
diff --git a/lab1ucode.out b/lab1ucode.out
index 3f5e6e8..7f853a4 100644
--- a/lab1ucode.out
+++ b/lab1ucode.out
@@ -31,19 +31,19 @@ prog:
1d: 0d00000
1e: 0130000
1f: 0000180
-20: 0000780
-21: 0280000
-22: 0b00000
-23: 0000180
-24: 0380000
-25: 0081000
-26: 000062a
-27: 0000800
-28: 1a00000
-29: 0000326
-2a: 0130000
-2b: 0000180
-2c: 0000180
+20: 0380000
+21: 0081000
+22: 0000626
+23: 0000800
+24: 1a00000
+25: 0000322
+26: 0130000
+27: 0000180
+28: 0000180
+29: 0000180
+2a: 0000780
+2b: 0280000
+2c: 0b00000
2d: 0000180
2e: 0000180
2f: 0000180
@@ -59,13 +59,13 @@ store 0x12
add 0x14
sub 0x18
and 0x1c
-halt 0x20
-cmp 0x21
-lsr 0x24
-lsr_loop 0x26
-lsr_exit 0x2a
-bra 0x2c
-bne 0x2d
+lsr 0x20
+lsr_loop 0x22
+lsr_exit 0x26
+bra 0x28
+bne 0x29
+halt 0x2a
+cmp 0x2b
bge 0x2e
beq 0x2f
end 0x30