Summary Files Commits Branches @commit @diff @stats
path: root / isprime / isprime.oph.s
diff options
context:
space:
mode:
1 files changed, 24 insertions, 0 deletions
-rw-r--r--isprime/isprime.oph.s24
diff --git a/isprime/isprime.oph.s b/isprime/isprime.oph.s
new file mode 100644
index 0000000..9fbc15e
--- /dev/null
+++ b/isprime/isprime.oph.s
@@ -0,0 +1,24 @@
+; .org is ONLY used for internal (assembler/label/alias/...) values, it doesn't output anything!
+; So you cannot use .org to place data on a given location.
+
+.outfile "isprime.prg"
+
+.require "basic_starter.oph.s"
+.require "kernal.oph.s"
+
+number: .word 1
+
+main:
+ `lowercase
+ lda number
+ bne + ; if (a == 0)
+ `print yes
+ rts
+* `print no
+ rts
+
+.charmap 'A, "abcdefghijklmnopqrstuvwxyz"
+.charmap 'a, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+
+yes: .byte "Yes",0
+no: .byte "No",0