From c1f0d07847f3652f1f4e63015f928b9a1c1bb825 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 31 Jul 2025 09:44:21 +0300 Subject: feat(isprime): Implemented simple conditional --- isprime/kernal.oph.s | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 isprime/kernal.oph.s (limited to 'isprime/kernal.oph.s') 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 -- cgit v1.3.1-26-gb76a