mirror of
https://github.com/irmen/prog8.git
synced 2024-11-02 07:05:14 +00:00
53 lines
879 B
Lua
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()
|
|
|
|
}
|
|
}
|