summaryrefslogtreecommitdiffstats
path: root/lab1ucode.in
diff options
context:
space:
mode:
Diffstat (limited to 'lab1ucode.in')
-rw-r--r--lab1ucode.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/lab1ucode.in b/lab1ucode.in
index c3ad920..2e012df 100644
--- a/lab1ucode.in
+++ b/lab1ucode.in
@@ -30,8 +30,8 @@ ar+grx->ar
ar->grx, 0->upc
sub:
-pm->ar
-ar-grx->ar
+grx->ar
+ar-pm->ar
ar->grx, 0->upc
and:
@@ -64,12 +64,16 @@ halt:
halt
cmp:
-pm->ar
-ar-grx->ar, 0->upc
+grx->ar
+ar-pm->ar, 0->upc
bge:
pc->ar
+; if grx < pm
n=1? bge_done
+; if grx == pm
+z=1? bge_done
+; here, !(grx <= pm) <=> grx > pm
ar+'ir->ar
bge_done:
ar->pc, 0->upc