mirror of
https://github.com/irmen/prog8.git
synced 2025-10-31 15:16:13 +00:00
started changing libs to typed pointers
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
TODO
|
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".
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,27 @@
|
|||||||
%option no_sysinit
|
%option no_sysinit
|
||||||
%zeropage basicsafe
|
%zeropage kernalsafe
|
||||||
%import textio
|
%import textio
|
||||||
|
%zpallowed 224,255
|
||||||
|
|
||||||
main {
|
main {
|
||||||
sub start() {
|
uword @shared @requirezp var1 = 0
|
||||||
word @shared ww = 2222
|
uword @shared @requirezp var2 = 0
|
||||||
|
uword @shared @requirezp var3 = 0
|
||||||
|
uword @shared @requirezp var4 = 0
|
||||||
|
uword @shared @requirezp var5 = 0
|
||||||
|
|
||||||
abs(ww)
|
sub start() {
|
||||||
sgn(ww)
|
txt.print_uw(var1)
|
||||||
sqrt(ww)
|
txt.spc()
|
||||||
min(ww, 0)
|
txt.print_uw(var2)
|
||||||
max(ww, 0)
|
txt.spc()
|
||||||
clamp(ww, 0, 319)
|
txt.print_uw(var3)
|
||||||
|
txt.spc()
|
||||||
|
txt.print_uw(var4)
|
||||||
|
txt.spc()
|
||||||
|
txt.print_uw(var5)
|
||||||
|
txt.nl()
|
||||||
|
|
||||||
|
repeat {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user