prog8/examples/test.p8
2020-11-24 22:23:16 +01:00

53 lines
839 B
Lua

%import textio
%import floats
%zeropage basicsafe
%import test_stack
main {
sub start() {
uword uw = $c000
ubyte ub = 1
ubyte ub2 = 1
uw = 1000
uw += ub+ub2
txt.print_uw(uw)
txt.chrout('\n')
uw = 1000
uw -= ub+ub2
txt.print_uw(uw)
txt.chrout('\n')
uw = 1000
uw *= ub+ub2
txt.print_uw(uw)
txt.chrout('\n')
uw = 1000
uw /= ub+ub2
txt.print_uw(uw)
txt.chrout('\n')
uw = 1000
uw %= 5*ub+ub2+ub2
txt.print_uw(uw)
txt.chrout('\n')
uw = 1000
uw <<= ub+ub2
txt.print_uw(uw)
txt.chrout('\n')
uw = 1000
uw >>= ub+ub2
txt.print_uw(uw)
txt.chrout('\n')
test_stack.test()
}
}