mirror of
https://github.com/irmen/prog8.git
synced 2025-10-25 05:18:38 +00:00
started changing libs to typed pointers
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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 {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user