Summary Files Commits Branches @commit @diff @stats
path: root / isprime / kernal.oph.s
diff options
context:
space:
mode:
1 files changed, 17 insertions, 0 deletions
-rw-r--r--isprime/kernal.oph.s17
diff --git a/isprime/kernal.oph.s b/isprime/kernal.oph.s
new file mode 100644
index 0000000..a9fd007
--- /dev/null
+++ b/isprime/kernal.oph.s
@@ -0,0 +1,17 @@
+.alias putchar $FFD2
+
+; print [null-terminated string start address]
+.macro print
+ ldx #0 ; x = 0
+ _loop: lda _1, x ; while (_1[x] != 0) {
+ beq _done
+ jsr putchar ; putchar(_1[x])
+ inx ; ++x
+ bne _loop ; if (x == 0) break } This allows max 255 character to be read
+ _done:
+.macend
+
+.macro lowercase
+ ldx #23
+ stx 53272
+.macend