mirror of
https://github.com/irmen/prog8.git
synced 2024-11-03 13:07:54 +00:00
de06353194
some programs are now 100% source compatible between C64 and Cx16 targets! import libraries have been rena;med
35 lines
632 B
Lua
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')
|
|
}
|
|
}
|