Summary Files Commits Branches @commit @diff @stats
path: root / catalan / print.a65
diff options
context:
space:
mode:
1 files changed, 17 insertions, 0 deletions
-rw-r--r--catalan/print.a6517
diff --git a/catalan/print.a65 b/catalan/print.a65
new file mode 100644
index 0000000..f2038db
--- /dev/null
+++ b/catalan/print.a65
@@ -0,0 +1,17 @@
+#ifndef CATALAN_PRINT
+#define CATALAN_PRINT
+
+#include "kernal.a65"
+
+#define print(str) .( :\
+ ldx #0 ; x = 0 :\
+loop lda str, x ; while (_1[x] != 0) :\
+ beq end :\
+ putchar() ; putchar(_1[x]) :\
+ inx ; ++x :\
+ bne loop ; if (x == 0) break :\
+end :\
+.)
+
+#endif /* CATALAN_PRINT */
+// vim: noet ts=8 sw=0 lcs=tab\:\ \