prog8/examples/test.p8

38 lines
680 B
Plaintext
Raw Normal View History

%import textio
2021-09-12 17:09:50 +00:00
%import floats
%zeropage dontuse
2021-05-29 13:25:17 +00:00
main {
label:
sub start() {
2021-09-12 17:09:50 +00:00
ubyte[6] ubs = 10 to 20 step 2
ubyte[] ubs2 = 10 to 20 step 2
float[6] fs = 10 to 20 step 2
float[] fs2 = 10 to 20 step 2
txt.print_ub(len(ubs))
txt.nl()
2021-09-12 17:09:50 +00:00
txt.print_ub(len(ubs2))
txt.nl()
2021-09-12 17:09:50 +00:00
txt.print_ub(len(fs))
txt.nl()
2021-09-12 17:09:50 +00:00
txt.print_ub(len(fs2))
txt.nl()
2021-09-12 17:09:50 +00:00
ubyte ix
for ix in 0 to 5 {
txt.print_ub(ubs2[ix])
txt.spc()
}
txt.nl()
2021-09-12 17:09:50 +00:00
for ix in 0 to 5 {
floats.print_f(fs2[ix])
txt.spc()
}
txt.nl()
2021-09-12 17:09:50 +00:00
}
}