2021-12-25 20:42:50 +00:00
|
|
|
%import textio
|
|
|
|
%zeropage basicsafe
|
2021-12-15 22:43:14 +00:00
|
|
|
|
2021-12-28 12:56:47 +00:00
|
|
|
|
2021-10-30 13:15:11 +00:00
|
|
|
main {
|
2021-11-09 23:17:56 +00:00
|
|
|
sub start() {
|
2021-12-25 20:42:50 +00:00
|
|
|
ubyte @shared xx
|
2021-12-17 19:21:14 +00:00
|
|
|
|
2021-12-28 12:56:47 +00:00
|
|
|
if xx<100 {
|
|
|
|
foobar()
|
2021-12-25 20:42:50 +00:00
|
|
|
}
|
2021-12-28 12:56:47 +00:00
|
|
|
txt.print("\nthe end\n")
|
|
|
|
}
|
2021-12-16 00:34:36 +00:00
|
|
|
|
2021-12-28 12:56:47 +00:00
|
|
|
sub foobar() {
|
|
|
|
txt.print("foobar\n")
|
2021-12-05 20:28:31 +00:00
|
|
|
}
|
2021-12-28 12:56:47 +00:00
|
|
|
|
2021-05-12 22:35:22 +00:00
|
|
|
}
|
2021-12-28 12:56:47 +00:00
|
|
|
;
|
|
|
|
;
|
|
|
|
;main {
|
|
|
|
; ubyte @shared foo=99
|
|
|
|
; sub thing(uword rr) {
|
|
|
|
; ubyte @shared xx = rr[1] ; should still work as var initializer that will be rewritten
|
|
|
|
; ubyte @shared yy
|
|
|
|
; yy = rr[2]
|
|
|
|
; uword @shared other
|
|
|
|
; ubyte @shared zz = other[3]
|
|
|
|
; }
|
|
|
|
; sub start() {
|
|
|
|
;
|
|
|
|
; txt.print("should print: 10 40 80 20\n")
|
|
|
|
;
|
|
|
|
; ubyte @shared xx
|
|
|
|
;
|
|
|
|
; if xx >0
|
|
|
|
; goto $c000
|
|
|
|
; else
|
|
|
|
; xx++
|
|
|
|
;labeltje:
|
|
|
|
;
|
|
|
|
; repeat {
|
|
|
|
; xx++
|
|
|
|
; if xx==10
|
|
|
|
; break
|
|
|
|
; }
|
|
|
|
; txt.print_ub(xx)
|
|
|
|
; txt.nl()
|
|
|
|
;
|
|
|
|
; while xx<50 {
|
|
|
|
; xx++
|
|
|
|
; if xx==40
|
|
|
|
; break
|
|
|
|
; }
|
|
|
|
; txt.print_ub(xx)
|
|
|
|
; txt.nl()
|
|
|
|
;
|
|
|
|
; do {
|
|
|
|
; xx++
|
|
|
|
; if xx==80
|
|
|
|
; break
|
|
|
|
; } until xx>100
|
|
|
|
; txt.print_ub(xx)
|
|
|
|
; txt.nl()
|
|
|
|
;
|
|
|
|
; for xx in 0 to 25 {
|
|
|
|
; if xx==20
|
|
|
|
; break
|
|
|
|
; }
|
|
|
|
; txt.print_ub(xx)
|
|
|
|
; txt.nl()
|
|
|
|
; }
|
|
|
|
;}
|