aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_schasm/structs_idea.scm
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-03-18 18:40:14 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-03-18 18:40:14 +0200
commit182c35d5aee98ab2afa27c2e84427206edb9a9ca (patch)
tree1dd2f8f0829c045a041ed65529d19d0934f338f4 /atk16_schasm/structs_idea.scm
parent69de37cdb25563f6cbd2a3c1a338b1e0dd47b3a4 (diff)
schasm updates
Diffstat (limited to 'atk16_schasm/structs_idea.scm')
-rw-r--r--atk16_schasm/structs_idea.scm28
1 files changed, 0 insertions, 28 deletions
diff --git a/atk16_schasm/structs_idea.scm b/atk16_schasm/structs_idea.scm
deleted file mode 100644
index d2fcc86..0000000
--- a/atk16_schasm/structs_idea.scm
+++ /dev/null
@@ -1,28 +0,0 @@
-# This buffer is for notes you don’t want to save, and for Chicken Scheme code.
-
-;; define structs
-(%def-struct point
- (x u16)
- (y u16))
-
-;; static struct instances
-(%static global-point
- point (u16 10) (u16 20))
-
-;; use static address as load offset
-(ld R0 ZR (global-point:x))
-
-;; stack allocated instances
-(%def-proc (main)
- ;; alloc some space on the stack
- (%svar my-point (point:size))
- ;; use stack offset as load offset
- (ld R0 SP (my-point:x)))
-
-;; a vector of static instances
-(let loop ((i 0))
- (when (< i 10)
- (%static (string->symbol (format "global-points/~A" i))
- point (u16 i) (u16 i))))
-
-(ld R0 ZR (global-points/0:x))