diff options
Diffstat (limited to 'lab1ucode.in')
| -rw-r--r-- | lab1ucode.in | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/lab1ucode.in b/lab1ucode.in new file mode 100644 index 0000000..6dc2b3f --- /dev/null +++ b/lab1ucode.in @@ -0,0 +1,71 @@ +pc->asr +pm->ir, pc++ +k2->upc + +direct: +ir->asr, k1->upc + +immediate: +pc->asr, pc++, k1->upc + +indirect: +ir->asr +pm->asr, k1->upc + +indexed: +ir->ar +; ar+gr3->ar +!1184000 +ar->asr, k1->upc + +load: +pm->grx, 0->upc + +store: +grx->pm, 0->upc + +add: +pm->ar +ar+grx->ar +ar->grx, 0->upc + +sub: +pm->ar +ar-grx->ar +ar->grx, 0->upc + +and: +pm->ar +ar&grx->ar +ar->grx, 0->upc + +halt: +halt + +cmp: +pm->ar +ar-grx->ar, 0->upc + +lsr: +grx->ar +pm->lc +lsr_loop: +l=1? lsr_exit +lc--, lsr, b lsr_loop +lsr_exit: +ar->grx, 0->upc + +bra: +0->upc + +bne: +0->upc + +bge: +0->upc + +beq: +0->upc + +end: +b end |
