2024-01-21 22:05:51 +00:00
|
|
|
%import textio
|
2024-02-03 00:57:17 +00:00
|
|
|
%import floats
|
|
|
|
%import math
|
2024-01-22 23:56:06 +00:00
|
|
|
%zeropage basicsafe
|
|
|
|
%option no_sysinit
|
2023-12-31 00:02:33 +00:00
|
|
|
|
2024-01-07 17:48:18 +00:00
|
|
|
main {
|
|
|
|
sub start() {
|
2024-02-03 16:36:42 +00:00
|
|
|
; ubyte[10] az
|
|
|
|
ubyte @shared offset=4
|
2024-02-03 00:57:17 +00:00
|
|
|
uword @shared az = $4000
|
2024-02-03 16:36:42 +00:00
|
|
|
ubyte @shared value = 22
|
2024-02-03 22:11:53 +00:00
|
|
|
|
2024-02-04 06:34:16 +00:00
|
|
|
az[20] = 99
|
|
|
|
az[2000] = 99
|
|
|
|
az[value] = 99
|
|
|
|
az[cx16.r0] = 99
|
|
|
|
; cx16.r0L = az[200]
|
|
|
|
; cx16.r1L = az[2000]
|
|
|
|
; cx16.r0L = az[value]
|
|
|
|
; cx16.r0H = value*4 + az[value]
|
|
|
|
; cx16.r0L = az[value] + value*4
|
|
|
|
;
|
2024-02-03 22:11:53 +00:00
|
|
|
; @($4004) = 99
|
|
|
|
; az[4]--
|
|
|
|
; @(az + offset)--
|
|
|
|
; txt.print_ub(@($4004))
|
|
|
|
; txt.nl()
|
|
|
|
; az[4]++
|
|
|
|
; @(az+offset)++
|
|
|
|
; txt.print_ub(@($4004))
|
|
|
|
; txt.nl()
|
2024-02-03 16:36:42 +00:00
|
|
|
; cx16.r0L = az[4] + value*5
|
|
|
|
; cx16.r1L = value*5 + az[4]
|
2024-01-28 21:30:45 +00:00
|
|
|
|
|
|
|
|
2024-01-30 22:00:40 +00:00
|
|
|
; ubyte @shared xx
|
|
|
|
; ubyte[3] ubarr
|
|
|
|
; uword[3] @split uwarr
|
|
|
|
; byte[3] sbarr
|
|
|
|
; bool[3] barr
|
|
|
|
; float[3] flarr
|
|
|
|
; bool @shared bb
|
|
|
|
; uword ptr = &ubarr
|
|
|
|
;
|
|
|
|
; ptr[1]++
|
|
|
|
; ptr[1]++
|
|
|
|
; ptr[1]--
|
|
|
|
; txt.print_ub(ubarr[1])
|
|
|
|
; txt.nl()
|
|
|
|
; ptr[1]+=4
|
|
|
|
; ptr[1]-=3
|
|
|
|
; txt.print_ub(ubarr[1])
|
|
|
|
; txt.nl()
|
2024-01-28 21:30:45 +00:00
|
|
|
|
2024-01-26 22:14:12 +00:00
|
|
|
; sbarr[1] = sbarr[1] == 0
|
|
|
|
; sbarr[1] = sbarr[1] != 0
|
|
|
|
; sbarr[1] = sbarr[1] < 0
|
|
|
|
; sbarr[1] = sbarr[1] <= 0
|
|
|
|
; sbarr[1] = sbarr[1] > 0
|
|
|
|
; sbarr[1] = sbarr[1] >= 0
|
2024-01-28 21:30:45 +00:00
|
|
|
;
|
2024-01-26 22:14:12 +00:00
|
|
|
; xx = 1
|
|
|
|
;
|
|
|
|
; sbarr[xx] = sbarr[xx] == 0
|
|
|
|
; sbarr[xx] = sbarr[xx] != 0
|
|
|
|
; sbarr[xx] = sbarr[xx] < 0
|
|
|
|
; sbarr[xx] = sbarr[xx] <= 0
|
|
|
|
; sbarr[xx] = sbarr[xx] > 0
|
|
|
|
; sbarr[xx] = sbarr[xx] >= 0
|
|
|
|
|
2024-01-28 20:19:52 +00:00
|
|
|
; sbarr[1] = sbarr[1] == 2
|
|
|
|
; sbarr[1] = sbarr[1] != 2
|
|
|
|
; sbarr[1] = sbarr[1] < 2
|
|
|
|
; sbarr[1] = sbarr[1] <= 2
|
|
|
|
; sbarr[1] = sbarr[1] > 2
|
|
|
|
; sbarr[1] = sbarr[1] >= 2
|
|
|
|
; xx = 1
|
|
|
|
; sbarr[xx] = sbarr[xx] == 2
|
|
|
|
; sbarr[xx] = sbarr[xx] != 2
|
|
|
|
; sbarr[xx] = sbarr[xx] < 2
|
|
|
|
; sbarr[xx] = sbarr[xx] <= 2
|
|
|
|
; sbarr[xx] = sbarr[xx] > 2
|
|
|
|
; sbarr[xx] = sbarr[xx] >= 2
|
2024-01-26 22:14:12 +00:00
|
|
|
|
|
|
|
; ubarr[1] = ubarr[1] == 2
|
2024-01-28 21:30:45 +00:00
|
|
|
; ubarr[1] = ubarr[1] < 2
|
|
|
|
; ubarr[1] = ubarr[1] <= 2
|
|
|
|
; ubarr[1] = ubarr[1] > 3
|
|
|
|
; ubarr[1] = ubarr[1] >= 3
|
2024-01-26 22:14:12 +00:00
|
|
|
|
2024-01-22 23:56:06 +00:00
|
|
|
; barr[1] = barr[0] and barr[2]
|
|
|
|
; barr[1] = barr[0] or barr[2]
|
|
|
|
; barr[1] = barr[0] xor barr[2]
|
|
|
|
; barr[1] = not barr[0]
|
2024-01-25 23:12:04 +00:00
|
|
|
;
|
2024-01-24 21:36:04 +00:00
|
|
|
; ubarr[1] = 999
|
|
|
|
; ubarr[1] = ubarr[1]==999
|
|
|
|
; txt.print_uw(ubarr[1])
|
2024-01-25 23:12:04 +00:00
|
|
|
;
|
2024-01-22 23:56:06 +00:00
|
|
|
; barr[1] = barr[1] and bb
|
|
|
|
; barr[1] = barr[1] or bb
|
|
|
|
; barr[1] = barr[1] xor bb
|
2024-01-25 23:12:04 +00:00
|
|
|
;
|
2024-01-22 23:56:06 +00:00
|
|
|
; bb = bb and barr[1]
|
|
|
|
; bb = bb or barr[1]
|
|
|
|
; bb = bb xor barr[1]
|
|
|
|
; bb = not bb
|
2024-02-03 00:57:17 +00:00
|
|
|
}
|
|
|
|
}
|