2020-09-12 16:53:44 +00:00
|
|
|
%import c64textio
|
2020-09-06 15:58:05 +00:00
|
|
|
;%import c64flt
|
|
|
|
;%option enable_floats
|
2020-09-14 22:10:20 +00:00
|
|
|
%zeropage kernalsafe
|
2020-09-05 00:05:28 +00:00
|
|
|
|
2020-08-27 17:47:50 +00:00
|
|
|
|
|
|
|
main {
|
2020-09-05 00:05:28 +00:00
|
|
|
|
2020-09-16 19:19:57 +00:00
|
|
|
struct Color {
|
|
|
|
ubyte red
|
|
|
|
ubyte green
|
|
|
|
ubyte blue
|
|
|
|
}
|
2020-09-05 00:05:28 +00:00
|
|
|
|
2020-08-27 17:47:50 +00:00
|
|
|
sub start() {
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-09-16 19:19:57 +00:00
|
|
|
ubyte ub = 9
|
2020-09-15 01:26:57 +00:00
|
|
|
uword yy = 9999 ; this is okay (no 0-initialization generated) but... the next:
|
|
|
|
uword xx = ub ; TODO don't generate xx = 0 assignment if it's initialized with something else...
|
2020-09-16 19:19:57 +00:00
|
|
|
uword zz
|
|
|
|
|
|
|
|
Color purple = [1,2,3]
|
|
|
|
|
|
|
|
uword x1
|
|
|
|
uword x2
|
|
|
|
|
|
|
|
word dx = x2 - x1 as word
|
2020-09-15 01:26:57 +00:00
|
|
|
|
2020-09-16 19:19:57 +00:00
|
|
|
;ub++
|
|
|
|
;xx++
|
|
|
|
;yy++
|
|
|
|
;zz++
|
2020-09-06 15:58:05 +00:00
|
|
|
|
2020-08-29 21:55:26 +00:00
|
|
|
;asmsub clear_screen (ubyte char @ A, ubyte color @ Y) clobbers(A) { ...}
|
|
|
|
; TODO dont cause name conflict if we define sub or sub with param 'color' or even a var 'color' later.
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-08-29 21:55:26 +00:00
|
|
|
; sub color(...) {}
|
|
|
|
; sub other(ubyte color) {} ; TODO don't cause name conflict
|
2020-08-28 23:44:20 +00:00
|
|
|
|
2020-08-27 17:47:50 +00:00
|
|
|
}
|
2020-09-04 22:17:58 +00:00
|
|
|
|
2020-08-27 17:47:50 +00:00
|
|
|
}
|