2020-03-24 23:32:54 +00:00
|
|
|
%import c64lib
|
2020-03-14 23:47:21 +00:00
|
|
|
%import c64utils
|
2020-04-08 22:12:50 +00:00
|
|
|
%import c64flt
|
2020-04-03 20:44:10 +00:00
|
|
|
%zeropage basicsafe
|
2020-03-24 18:37:54 +00:00
|
|
|
|
2020-07-26 22:32:59 +00:00
|
|
|
main {
|
2020-07-26 16:56:51 +00:00
|
|
|
|
2020-07-26 21:32:20 +00:00
|
|
|
sub start() {
|
2020-08-18 13:16:56 +00:00
|
|
|
|
2020-08-20 10:18:42 +00:00
|
|
|
struct Color {
|
|
|
|
ubyte red
|
|
|
|
uword green
|
|
|
|
float blue
|
2020-08-18 12:47:52 +00:00
|
|
|
}
|
2020-08-17 16:42:02 +00:00
|
|
|
|
2020-08-20 10:18:42 +00:00
|
|
|
Color c = [11,22222,3.1234]
|
2020-08-18 11:49:08 +00:00
|
|
|
|
2020-08-20 10:18:42 +00:00
|
|
|
; c64scr.print_ub(c.red)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; c64scr.print_uw(c.green)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; c64flt.print_f(c.blue)
|
|
|
|
; c64.CHROUT('\n')
|
2020-08-18 13:16:56 +00:00
|
|
|
|
2020-08-20 10:18:42 +00:00
|
|
|
uword xx = 4.5678
|
|
|
|
ubyte bb = 33
|
|
|
|
|
|
|
|
foo2(-33)
|
|
|
|
foo2(bb)
|
|
|
|
foo2(4.55) ; TODO truncation warning
|
|
|
|
|
|
|
|
;foo("zzz", 8.777)
|
|
|
|
;len(13)
|
|
|
|
|
|
|
|
; uword size = len(Color)
|
|
|
|
; c64scr.print_uw(size)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
|
|
|
|
; c64scr.print_ub(len(Color))
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; c64scr.print_ub(len(c))
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; c64scr.print_ub(len(c.green))
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
}
|
|
|
|
|
|
|
|
sub foo(ubyte aa, word ww) {
|
|
|
|
ww += aa
|
|
|
|
}
|
2020-08-18 14:02:40 +00:00
|
|
|
|
2020-08-20 10:18:42 +00:00
|
|
|
asmsub foo2(ubyte aa @Pc) {
|
|
|
|
%asm {{
|
|
|
|
rts
|
|
|
|
}}
|
2020-07-25 23:32:27 +00:00
|
|
|
}
|
2020-07-03 23:02:36 +00:00
|
|
|
}
|