From c35a9917954a0024fb19ca3e045b0e56114df455 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 5 Mar 2025 17:48:53 +0200 Subject: Add macros.scm --- atk16_schasm/main.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'atk16_schasm/main.scm') diff --git a/atk16_schasm/main.scm b/atk16_schasm/main.scm index e6f63ca..3258a7f 100644 --- a/atk16_schasm/main.scm +++ b/atk16_schasm/main.scm @@ -35,7 +35,7 @@ (hlt)) ;; store string data in memory -(def-label 'data +(def-label 'text-data (%packed-string "hölynpöly")) (at-addr #x50) @@ -56,5 +56,11 @@ (%if (R1 <= (u16 #xFF)) (emit-word #xbeef)) +(comment + (ld R1 (u16 10)) + (%while (R1 > (u16 0)) + (%call println (label 'text-data)) + (sub R1 (u16 1)))) + ;; compile to a 128KB image file (write-image-to "out.bin") -- cgit v1.3