prog8/examples/test.p8
2023-04-01 02:29:33 +02:00

37 lines
604 B
Lua

%import textio
%import floats
%zeropage basicsafe
main {
sub start() {
ubyte xx=100
ubyte yy=21
xx %= yy
txt.print_ub(xx)
txt.nl()
ubyte ub1 = 100
ubyte ub2 = 13
ubyte ubd
ubyte ubr
divmod(ub1, ub2, ubd, ubr)
txt.print_ub(ubd)
txt.spc()
txt.print_ub(ubr)
txt.nl()
uword uw1 = 10000
uword uw2 = 900
uword uwd
uword uwr
divmodw(uw1, uw2, uwd, uwr)
txt.print_uw(uwd)
txt.spc()
txt.print_uw(uwr)
txt.nl()
}
}