2018-12-11 23:15:05 +00:00
|
|
|
%import c64utils
|
2018-12-29 15:25:20 +00:00
|
|
|
%option enable_floats
|
2018-10-16 00:26:35 +00:00
|
|
|
|
2018-12-04 21:30:35 +00:00
|
|
|
~ main {
|
2018-11-11 17:19:08 +00:00
|
|
|
|
2018-12-28 01:08:39 +00:00
|
|
|
ubyte[3] ubarray = [11,55,222]
|
|
|
|
byte[3] barray = [-11,-22,-33]
|
|
|
|
uword[3] uwarray = [111,2222,55555]
|
|
|
|
word[3] warray = [-111,-222,-555]
|
2018-12-29 15:25:20 +00:00
|
|
|
float[3] farray = [1.11, 2.22, -3.33]
|
2018-12-28 01:08:39 +00:00
|
|
|
str text = "hello\n"
|
2018-12-22 00:07:43 +00:00
|
|
|
|
2018-12-28 01:08:39 +00:00
|
|
|
sub start() {
|
|
|
|
c64scr.print_ub(X)
|
|
|
|
c64.CHROUT('\n')
|
2018-12-18 00:43:04 +00:00
|
|
|
|
2018-12-28 01:08:39 +00:00
|
|
|
c64scr.print("loop str\n")
|
|
|
|
for ubyte c in text {
|
|
|
|
c64scr.print_ub(c)
|
2018-12-29 15:25:20 +00:00
|
|
|
c64.CHROUT(',')
|
2018-12-28 01:08:39 +00:00
|
|
|
}
|
|
|
|
|
2018-12-29 15:25:20 +00:00
|
|
|
c64scr.print("\nloop ub\n")
|
2018-12-28 01:08:39 +00:00
|
|
|
for ubyte ub in ubarray{
|
|
|
|
c64scr.print_ub(ub)
|
2018-12-29 15:25:20 +00:00
|
|
|
c64.CHROUT(',')
|
2018-12-28 01:08:39 +00:00
|
|
|
}
|
2018-12-12 00:13:13 +00:00
|
|
|
|
2018-12-29 15:25:20 +00:00
|
|
|
c64scr.print("\nloop b\n")
|
|
|
|
for byte b in barray {
|
|
|
|
c64scr.print_b(b)
|
|
|
|
c64.CHROUT(',')
|
|
|
|
}
|
|
|
|
|
|
|
|
c64scr.print("\nloop uw\n")
|
|
|
|
for uword uw in uwarray {
|
2018-12-28 01:08:39 +00:00
|
|
|
c64scr.print_uw(uw)
|
2018-12-29 15:25:20 +00:00
|
|
|
c64.CHROUT(',')
|
|
|
|
}
|
|
|
|
|
|
|
|
c64scr.print("\nloop w\n")
|
|
|
|
for word w in warray {
|
|
|
|
c64scr.print_w(w)
|
|
|
|
c64.CHROUT(',')
|
2018-12-28 01:08:39 +00:00
|
|
|
}
|
|
|
|
|
2018-12-29 15:25:20 +00:00
|
|
|
c64scr.print("\nloop f\n")
|
|
|
|
for float f in farray {
|
|
|
|
c64flt.print_f(f)
|
|
|
|
c64.CHROUT(',')
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-12-28 01:08:39 +00:00
|
|
|
ending:
|
|
|
|
c64scr.print("\nending\n")
|
|
|
|
c64scr.print_ub(X)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
}
|
2018-12-26 03:51:21 +00:00
|
|
|
}
|