prog8/examples/test.p8

38 lines
727 B
Plaintext
Raw Normal View History

%import textio
2023-10-27 20:36:43 +00:00
%import math
%option no_sysinit
%zeropage basicsafe
main {
sub start() {
2023-10-27 20:36:43 +00:00
ubyte ub1 = 12
ubyte ub2 = 233
txt.print_ub(math.diff(ub1, ub2))
txt.nl()
ub1 = 200
ub2 = 90
txt.print_ub(math.diff(ub1, ub2))
txt.nl()
ub1 = 144
ub2 = 144
txt.print_ub(math.diff(ub1, ub2))
txt.nl()
txt.nl()
uword uw1 = 1200
uword uw2 = 40000
txt.print_uw(math.diffw(uw1, uw2))
txt.nl()
uw1 = 40000
uw2 = 21000
txt.print_uw(math.diffw(uw1, uw2))
txt.nl()
2023-10-27 20:36:43 +00:00
uw1 = 30000
uw2 = 30000
txt.print_uw(math.diffw(uw1, uw2))
txt.nl()
}
}