prog8/examples/test.p8

25 lines
530 B
Plaintext
Raw Normal View History

%import floats
2024-10-22 22:58:32 +02:00
%import textio
%option no_sysinit
%zeropage basicsafe
2024-10-18 22:22:34 +02:00
main {
sub start() {
2024-10-22 22:58:32 +02:00
ubyte[4] values
uword[4] wvalues
float[4] fvalues
cx16.r0L = 0
cx16.r1L = 3
values[cx16.r0L+2] = if cx16.r1L>2 99 else 111
wvalues[cx16.r0L+2] = if cx16.r1L>2 9999 else 1111
fvalues[cx16.r0L+2] = if cx16.r1L>2 9.99 else 1.111
2024-10-22 22:58:32 +02:00
txt.print_ub(values[2])
2024-10-18 22:22:34 +02:00
txt.nl()
2024-10-22 22:58:32 +02:00
txt.print_uw(wvalues[2])
2024-10-18 22:22:34 +02:00
txt.nl()
2024-10-22 22:58:32 +02:00
floats.print(fvalues[2])
}
}