2018-12-11 23:15:05 +00:00
|
|
|
%import c64utils
|
2018-12-13 00:19:43 +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-04 21:30:35 +00:00
|
|
|
sub start() {
|
2018-12-12 00:13:13 +00:00
|
|
|
|
|
|
|
ubyte ub1
|
2018-12-14 22:15:44 +00:00
|
|
|
ubyte ub2
|
2018-12-14 23:07:25 +00:00
|
|
|
byte b1 = -99
|
2018-12-14 22:15:44 +00:00
|
|
|
byte b2
|
2018-12-12 00:13:13 +00:00
|
|
|
uword uw1
|
2018-12-14 22:15:44 +00:00
|
|
|
uword uw2
|
2018-12-14 23:07:25 +00:00
|
|
|
word w1 = -9999
|
2018-12-14 22:15:44 +00:00
|
|
|
word w2
|
2018-12-12 00:13:13 +00:00
|
|
|
float f1
|
2018-12-13 00:19:43 +00:00
|
|
|
float f2
|
|
|
|
float f3
|
2018-12-12 00:13:13 +00:00
|
|
|
|
2018-12-16 12:58:18 +00:00
|
|
|
ubyte[3] uba = [1,2,3]
|
2018-12-17 00:59:04 +00:00
|
|
|
byte[3] ba = [-1,0,3]
|
|
|
|
uword[3] uwa = [1000,200,0]
|
2018-12-16 12:58:18 +00:00
|
|
|
word[3] wa = -222
|
2018-12-17 00:59:04 +00:00
|
|
|
ubyte[3] uba0 = 0
|
|
|
|
byte[3] ba0 = 0
|
|
|
|
uword[3] uwa0 = 0
|
|
|
|
word[3] wa0 = 0
|
2018-12-16 12:58:18 +00:00
|
|
|
;word[3] wa = [-1000.w,2000.w,3000.w] ; @todo array data type fix (float->word)
|
|
|
|
;word[3] wa = [1000,2000,3000] ; @todo array data type fix (uword->word)
|
2018-12-17 00:59:04 +00:00
|
|
|
float[3] fa0 = 0.0
|
|
|
|
float[3] fa1 = [-1000,44.555, 99.999]
|
|
|
|
float[3] fa2 = [-1000,44.555, 0]
|
2018-12-16 12:58:18 +00:00
|
|
|
str string = "hello"
|
|
|
|
str_p pstring = "hello1"
|
|
|
|
str_s sstring = "hello12"
|
|
|
|
str_ps psstring = "hello123"
|
2018-12-16 02:38:17 +00:00
|
|
|
|
|
|
|
c64.CHROUT('x')
|
|
|
|
c64scr.print_ubyte_decimal(X)
|
2018-12-14 22:15:44 +00:00
|
|
|
c64.CHROUT('\n')
|
2018-12-16 12:58:18 +00:00
|
|
|
|
|
|
|
ub1 = any(uba)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
2018-12-14 22:15:44 +00:00
|
|
|
c64.CHROUT('\n')
|
2018-12-16 12:58:18 +00:00
|
|
|
ub1 = any(ba)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub1 = any(uwa)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub1 = any(wa)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
2018-12-14 22:15:44 +00:00
|
|
|
c64.CHROUT('\n')
|
2018-12-17 00:59:04 +00:00
|
|
|
ub1 = any(fa1)
|
2018-12-16 12:58:18 +00:00
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
2018-12-14 22:15:44 +00:00
|
|
|
c64.CHROUT('\n')
|
2018-12-17 00:59:04 +00:00
|
|
|
ub1 = any(fa2)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
ub1 = any(uba0)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub1 = any(ba0)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub1 = any(uwa0)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub1 = any(wa0)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
ub1 = any(fa0)
|
|
|
|
c64scr.print_ubyte_decimal(ub1)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
2018-12-16 02:38:17 +00:00
|
|
|
c64.CHROUT('x')
|
|
|
|
c64scr.print_ubyte_decimal(X)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
2018-12-17 00:59:04 +00:00
|
|
|
c64.CHROUT('x')
|
|
|
|
c64scr.print_ubyte_decimal(X)
|
|
|
|
c64.CHROUT('\n')
|
|
|
|
|
|
|
|
; ub1 = all(uba) ; 1 ok
|
|
|
|
; c64scr.print_ubyte_decimal(ub1)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; ub1 = all(ba) ; 0 ok
|
|
|
|
; c64scr.print_ubyte_decimal(ub1)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; ub1 = all(uwa) ; 0 ok
|
|
|
|
; c64scr.print_ubyte_decimal(ub1)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; ub1 = all(wa) ; 1 ok
|
|
|
|
; c64scr.print_ubyte_decimal(ub1)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; ub1 = all(fa1) ; 1 ok
|
|
|
|
; c64scr.print_ubyte_decimal(ub1)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; ub1 = all(fa2) ; 0 ok
|
|
|
|
; c64scr.print_ubyte_decimal(ub1)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
; c64.CHROUT('x')
|
|
|
|
; c64scr.print_ubyte_decimal(X)
|
|
|
|
; c64.CHROUT('\n')
|
|
|
|
|
2018-12-04 21:30:35 +00:00
|
|
|
}
|
2018-10-16 20:49:19 +00:00
|
|
|
}
|
2018-12-12 00:13:13 +00:00
|
|
|
|