2019-07-16 21:56:00 +00:00
|
|
|
%import c64utils
|
|
|
|
%zeropage basicsafe
|
|
|
|
|
2020-07-24 20:57:19 +00:00
|
|
|
; TODO fix compiler errors when compiling without optimization ( /= )
|
2020-07-01 20:31:38 +00:00
|
|
|
|
|
|
|
|
2019-07-29 21:11:13 +00:00
|
|
|
main {
|
2019-07-16 21:56:00 +00:00
|
|
|
|
|
|
|
struct Color {
|
|
|
|
ubyte red
|
|
|
|
ubyte green
|
|
|
|
ubyte blue
|
|
|
|
}
|
|
|
|
|
|
|
|
sub start() {
|
|
|
|
|
|
|
|
Color purple = {255, 0, 255}
|
|
|
|
|
|
|
|
Color other
|
|
|
|
|
|
|
|
other = purple
|
|
|
|
|
2020-07-03 21:49:17 +00:00
|
|
|
other.red /= 2
|
2019-07-16 21:56:00 +00:00
|
|
|
other.green = 10 + other.green / 2
|
|
|
|
other.blue = 99
|
|
|
|
|
|
|
|
c64scr.print_ub(other.red)
|
|
|
|
c64.CHROUT(',')
|
|
|
|
c64scr.print_ub(other.green)
|
|
|
|
c64.CHROUT(',')
|
|
|
|
c64scr.print_ub(other.blue)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
}
|
|
|
|
}
|