2019-08-17 23:39:48 +00:00
|
|
|
%zeropage basicsafe
|
2019-08-09 00:15:31 +00:00
|
|
|
|
2019-08-07 00:02:34 +00:00
|
|
|
main {
|
2019-08-05 21:36:24 +00:00
|
|
|
|
|
|
|
sub start() {
|
2019-08-24 22:24:00 +00:00
|
|
|
ubyte[] ubarr = [22,33,44,55,66]
|
|
|
|
byte[] barr = [22,-33,-44,55,66]
|
|
|
|
ubyte endub1
|
|
|
|
byte endb1
|
|
|
|
ubyte aa
|
|
|
|
ubyte ub
|
|
|
|
byte bb
|
2019-08-26 21:38:59 +00:00
|
|
|
uword uw
|
2019-08-24 22:24:00 +00:00
|
|
|
word total
|
2019-08-26 21:38:59 +00:00
|
|
|
uword count
|
2019-08-19 20:28:41 +00:00
|
|
|
|
2019-08-20 22:09:44 +00:00
|
|
|
|
2019-08-24 22:24:00 +00:00
|
|
|
; ---------- BYTE var ---------
|
|
|
|
|
|
|
|
count = 0
|
|
|
|
total = 0
|
2019-08-24 22:46:46 +00:00
|
|
|
c64scr.print("byte var in arrayliteral: ")
|
|
|
|
for bb in [1,3,5,99] {
|
2019-08-24 22:24:00 +00:00
|
|
|
count++
|
|
|
|
total += bb
|
|
|
|
}
|
2019-08-24 22:46:46 +00:00
|
|
|
if count==4 and total==108
|
2019-08-24 22:24:00 +00:00
|
|
|
c64scr.print("ok\n")
|
|
|
|
else
|
|
|
|
c64scr.print("fail!!!\n")
|
|
|
|
|
|
|
|
|
2019-08-24 22:46:46 +00:00
|
|
|
; ---------- WORD var ---------
|
2019-08-24 22:24:00 +00:00
|
|
|
|
2019-08-24 22:46:46 +00:00
|
|
|
word[] warr = [-111,222,-333,444]
|
|
|
|
word endw1
|
|
|
|
word ww
|
2019-08-24 22:24:00 +00:00
|
|
|
|
|
|
|
count = 0
|
|
|
|
total = 0
|
2019-08-24 22:46:46 +00:00
|
|
|
c64scr.print("word var in arrayliteral: ")
|
|
|
|
for ww in [1111,3333,555,999] {
|
2019-08-24 22:24:00 +00:00
|
|
|
count++
|
2019-08-24 22:46:46 +00:00
|
|
|
total += ww
|
2019-08-24 22:24:00 +00:00
|
|
|
}
|
2019-08-24 22:46:46 +00:00
|
|
|
if count==4 and total==5998
|
2019-08-24 22:24:00 +00:00
|
|
|
c64scr.print("ok\n")
|
|
|
|
else
|
|
|
|
c64scr.print("fail!!!\n")
|
|
|
|
|
2019-08-24 14:21:05 +00:00
|
|
|
}
|
2019-04-11 22:04:15 +00:00
|
|
|
}
|