prog8/examples/test.p8

38 lines
624 B
Plaintext
Raw Normal View History

%import textio
%zeropage basicsafe
%option no_sysinit
main {
sub start() {
2024-02-06 21:18:52 +00:00
ubyte @shared xx=1
uword @shared yy
2024-02-03 22:11:53 +00:00
2024-02-06 21:18:52 +00:00
ubyte[16] array
array[1] = 1
xx += 3
yy += 3
xx -= 3
yy -= 3
2024-02-06 23:03:39 +00:00
txt.print_ub(array[1])
txt.spc()
array[1]++
txt.print_ub(array[1])
txt.spc()
array[1]--
txt.print_ub(array[1])
txt.nl()
txt.print_ub(array[1])
txt.spc()
array[xx]++
txt.print_ub(array[1])
txt.spc()
array[xx]--
txt.print_ub(array[1])
txt.nl()
}
}