2022-11-15 17:51:52 +00:00
|
|
|
%import textio
|
2022-12-03 16:46:06 +00:00
|
|
|
%zeropage basicsafe
|
|
|
|
%option no_sysinit
|
2022-11-29 19:09:10 +00:00
|
|
|
|
2022-10-22 11:33:35 +00:00
|
|
|
main {
|
2022-11-28 22:07:07 +00:00
|
|
|
|
2022-11-29 23:15:13 +00:00
|
|
|
sub start() {
|
2022-12-03 16:46:06 +00:00
|
|
|
; TODO ALSO TEST AS GLOBALS
|
|
|
|
ubyte @requirezp zpvar = 10
|
|
|
|
ubyte @zp zpvar2 = 20
|
|
|
|
uword empty
|
|
|
|
ubyte[10] bssarray
|
|
|
|
uword[10] bsswordarray
|
|
|
|
ubyte[10] nonbssarray = 99
|
|
|
|
str name="irmen"
|
|
|
|
|
|
|
|
txt.print("10 ")
|
|
|
|
txt.print_ub(zpvar)
|
|
|
|
txt.nl()
|
|
|
|
zpvar++
|
|
|
|
|
|
|
|
txt.print("20 ")
|
|
|
|
txt.print_ub(zpvar2)
|
|
|
|
txt.nl()
|
|
|
|
zpvar2++
|
|
|
|
|
|
|
|
txt.print("0 ")
|
|
|
|
txt.print_uw(empty)
|
|
|
|
txt.nl()
|
|
|
|
empty++
|
|
|
|
|
|
|
|
txt.print("0 ")
|
|
|
|
txt.print_ub(bssarray[1])
|
|
|
|
txt.nl()
|
|
|
|
bssarray[1]++
|
|
|
|
|
|
|
|
txt.print("0 ")
|
|
|
|
txt.print_uw(bsswordarray[1])
|
|
|
|
txt.nl()
|
|
|
|
bsswordarray[1]++
|
|
|
|
|
|
|
|
txt.print("99 ")
|
|
|
|
txt.print_ub(nonbssarray[1])
|
|
|
|
txt.nl()
|
|
|
|
nonbssarray[1]++
|
|
|
|
|
|
|
|
txt.print("r ")
|
|
|
|
txt.chrout(name[1])
|
2022-11-29 23:15:13 +00:00
|
|
|
txt.nl()
|
2022-12-03 16:46:06 +00:00
|
|
|
name[1] = (name[1] as ubyte +1)
|
2022-11-29 23:15:13 +00:00
|
|
|
|
2022-12-03 16:46:06 +00:00
|
|
|
txt.print("try running again.\n")
|
2022-11-29 23:15:13 +00:00
|
|
|
}
|
2022-09-18 14:04:49 +00:00
|
|
|
}
|