2024-11-08 21:05:31 +00:00
|
|
|
%import floats
|
2024-10-27 20:50:48 +00:00
|
|
|
%import textio
|
2024-11-05 22:56:58 +00:00
|
|
|
%option no_sysinit
|
2024-11-08 18:43:59 +00:00
|
|
|
%zeropage basicsafe
|
|
|
|
|
2024-11-08 21:05:31 +00:00
|
|
|
; DIRTY tests
|
2024-10-18 20:22:34 +00:00
|
|
|
|
2024-11-04 03:28:27 +00:00
|
|
|
main {
|
2024-11-08 21:05:31 +00:00
|
|
|
uword @shared @dirty globw
|
|
|
|
uword @shared globwi = 4444
|
|
|
|
float @shared @dirty globf
|
|
|
|
float @shared globfi = 4
|
|
|
|
ubyte[5] @shared @dirty globarr1
|
|
|
|
ubyte[] @shared globarr2 = [11,22,33,44,55]
|
2024-10-21 23:08:21 +00:00
|
|
|
|
2024-11-08 21:05:31 +00:00
|
|
|
sub start() {
|
|
|
|
testdirty()
|
2024-11-07 21:17:23 +00:00
|
|
|
txt.nl()
|
2024-11-08 21:05:31 +00:00
|
|
|
testdirty()
|
2024-11-04 23:15:40 +00:00
|
|
|
txt.nl()
|
2024-11-08 21:05:31 +00:00
|
|
|
}
|
2024-10-21 23:08:21 +00:00
|
|
|
|
2024-11-08 21:05:31 +00:00
|
|
|
sub testdirty() {
|
|
|
|
uword @shared @dirty locw
|
|
|
|
uword @shared locwi = 4444
|
|
|
|
float @shared @dirty locf
|
|
|
|
float @shared locfi = 4.0
|
|
|
|
ubyte[5] @shared @dirty locarr1
|
|
|
|
ubyte[] @shared locarr2 = [11,22,33,44,55]
|
|
|
|
|
|
|
|
txt.print("globals: ")
|
|
|
|
txt.print_uw(globw)
|
|
|
|
txt.spc()
|
|
|
|
floats.print(globf)
|
|
|
|
txt.print(" with init: ")
|
|
|
|
txt.print_uw(globwi)
|
|
|
|
txt.spc()
|
|
|
|
floats.print(globfi)
|
|
|
|
txt.print(" arrays: ")
|
|
|
|
txt.print_ub(globarr1[2])
|
|
|
|
txt.spc()
|
|
|
|
txt.print_ub(globarr2[2])
|
|
|
|
txt.print("\nlocals: ")
|
|
|
|
txt.print_uw(locw)
|
|
|
|
txt.spc()
|
|
|
|
floats.print(locf)
|
|
|
|
txt.print(" with init: ")
|
|
|
|
txt.print_uw(locwi)
|
|
|
|
txt.spc()
|
|
|
|
floats.print(locfi)
|
|
|
|
txt.print(" arrays: ")
|
|
|
|
txt.print_ub(locarr1[2])
|
|
|
|
txt.spc()
|
|
|
|
txt.print_ub(locarr2[2])
|
2024-11-08 18:43:59 +00:00
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
|
2024-11-08 21:05:31 +00:00
|
|
|
globw++
|
|
|
|
globwi++
|
|
|
|
globf++
|
|
|
|
globfi++
|
|
|
|
globarr1[2]++
|
|
|
|
globarr2[2]++
|
|
|
|
locw++
|
|
|
|
locwi++
|
|
|
|
locf++
|
|
|
|
locfi++
|
|
|
|
locarr1[2]++
|
|
|
|
locarr2[2]++
|
2024-11-08 18:43:59 +00:00
|
|
|
}
|
2024-11-05 22:56:58 +00:00
|
|
|
}
|