prog8/examples/test.p8

35 lines
709 B
Plaintext
Raw Normal View History

%import floats
2023-05-16 21:10:33 +00:00
%import textio
%zeropage basicsafe
%option no_sysinit
main {
2023-05-07 21:49:02 +00:00
2023-05-07 23:03:54 +00:00
sub start() {
2023-05-30 17:08:34 +00:00
uword[] split_uwords = [12345, 60000, 4096]
word[] split_words = [12345, -6000, 4096]
float[] floats = [1.1,2.2,3.3]
reverse(split_uwords)
reverse(split_words)
reverse(floats)
2023-05-26 20:56:12 +00:00
uword ww
2023-05-30 17:08:34 +00:00
for ww in split_uwords {
2023-05-26 20:56:12 +00:00
txt.print_uw(ww)
txt.spc()
}
txt.nl()
2023-05-30 17:08:34 +00:00
word sw
for sw in split_words {
txt.print_w(sw)
2023-05-22 18:31:28 +00:00
txt.spc()
}
2023-05-26 20:56:12 +00:00
txt.nl()
2023-05-30 17:08:34 +00:00
ubyte ix
for ix in 0 to len(floats)-1 {
floats.print_f(floats[ix])
txt.spc()
}
2023-03-18 23:24:05 +00:00
}
}