diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/add.asm | 11 | ||||
-rw-r--r-- | demos/inp.asm | 9 | ||||
-rw-r--r-- | demos/test.asm | 22 |
3 files changed, 42 insertions, 0 deletions
diff --git a/demos/add.asm b/demos/add.asm new file mode 100644 index 0000000..0185625 --- /dev/null +++ b/demos/add.asm @@ -0,0 +1,11 @@ + ORG 30 + LDA X I + ADD Y /simple comment + STA S / another one + HLT + +X, HEX 1A +Y, DEC -23 +S, DEC 0 + + END diff --git a/demos/inp.asm b/demos/inp.asm new file mode 100644 index 0000000..bdec386 --- /dev/null +++ b/demos/inp.asm @@ -0,0 +1,9 @@ + ORG 12 +LINP, SKI / check input flag + BUN LINP + inp + OUT /output character + sta CHR i + HLT +CHR, + HEX B42 diff --git a/demos/test.asm b/demos/test.asm new file mode 100644 index 0000000..2b03cc2 --- /dev/null +++ b/demos/test.asm @@ -0,0 +1,22 @@ + org 38 + + lda num1 i +lop, add num2 / add in loop + isz ctr + bun lop + sta sum / save ac to sum + + hlt + +ctr, dec -5 +num1, hex a1 +sum, hex 0 + +num2, dec 21 + org 9f + hex c4b5 + dec -70 + hex 43 + hex d89a + + end |