prog8/examples/test.p8
Irmen de Jong 0a330b9288 warmings
2020-11-24 22:21:54 +01:00

53 lines
879 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 ; TODO FIX COMPUTATION ERROR
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()
}
}