prog8/examples/test.p8
Irmen de Jong de06353194 auto select correct library to import based on target, instead of having c64- and cx16- prefix variants
some programs are now 100% source compatible between C64 and Cx16 targets!
import libraries have been rena;med
2020-09-21 00:50:09 +02:00

35 lines
632 B
Lua

%target c64
%import syslib
%import graphics
%import textio
%import floats
%zeropage basicsafe
main {
sub start() {
const ubyte cbvalue = 40
const uword cwvalue = cbvalue
uword wvalue = 40
ubyte x
ubyte bb = 99
x = msb(sin8u(bb) * cwvalue)
txt.print_ub(x)
txt.chrout('\n')
x = msb(sin8u(bb) * wvalue)
txt.print_ub(x)
txt.chrout('\n')
txt.chrout('\n')
x = msb(cwvalue*sin8u(bb))
txt.print_ub(x)
txt.chrout('\n')
x = msb(wvalue*sin8u(bb))
txt.print_ub(x)
txt.chrout('\n')
}
}