diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2022-01-26 21:36:44 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2022-01-26 21:36:44 +0100 |
| commit | 2ea7eec53978ff743e73b83c4adab942914b0438 (patch) | |
| tree | 11eee27d811fe5df177e30ba696014aa4f4e0a0d /lab1ucode.in | |
| download | tsea83-2ea7eec53978ff743e73b83c4adab942914b0438.tar.gz | |
initial commit
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 |
