mirror of
https://github.com/irmen/prog8.git
synced 2024-09-30 15:57:06 +00:00
37 lines
684 B
Lua
37 lines
684 B
Lua
;%import c64lib
|
|
;%import c64graphics
|
|
;%import c64textio
|
|
%import c64flt
|
|
;%option enable_floats
|
|
%target cx16
|
|
%import cx16textio
|
|
%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')
|
|
}
|
|
}
|