started changing libs to typed pointers

This commit is contained in:
Irmen de Jong
2025-07-20 23:59:59 +02:00
parent 720988ae72
commit 2f90c53ad0
2 changed files with 22 additions and 9 deletions

View File

@@ -1,6 +1,8 @@
TODO
====
BUG: fix ZP variables no longer getting initialized to 0 (see test.p8)
STRUCTS: are being developed in their own separate branch for now, called "structs".
Idea is to make it feature complete in the IR/Virtual target, then merge it to master?, and then start building the 6502 code generation for it.

View File

@@ -1,16 +1,27 @@
%option no_sysinit
%zeropage basicsafe
%zeropage kernalsafe
%import textio
%zpallowed 224,255
main {
sub start() {
word @shared ww = 2222
uword @shared @requirezp var1 = 0
uword @shared @requirezp var2 = 0
uword @shared @requirezp var3 = 0
uword @shared @requirezp var4 = 0
uword @shared @requirezp var5 = 0
abs(ww)
sgn(ww)
sqrt(ww)
min(ww, 0)
max(ww, 0)
clamp(ww, 0, 319)
sub start() {
txt.print_uw(var1)
txt.spc()
txt.print_uw(var2)
txt.spc()
txt.print_uw(var3)
txt.spc()
txt.print_uw(var4)
txt.spc()
txt.print_uw(var5)
txt.nl()
repeat {}
}
}