prog8/examples/test.p8

27 lines
415 B
Plaintext
Raw Normal View History

%import textio
%zeropage basicsafe
2022-03-13 11:52:12 +00:00
main {
2022-08-07 11:45:03 +00:00
sub start() {
2022-08-08 19:09:49 +00:00
str @zp zpstr = "irmen"
ubyte[3] @zp zparr = [1,2,3]
2022-08-08 19:09:49 +00:00
txt.print(zpstr)
txt.print_ub(zparr[2])
}
sub start2() {
2022-08-07 11:45:03 +00:00
ubyte[] arr = [1,2,3,4]
uword pointer
ubyte ix
2022-08-07 11:45:03 +00:00
arr[ix] = arr[ix]+1
2022-08-07 11:45:03 +00:00
; arr[3] = arr[3]+1
; pointer[3] = pointer[3]+1
2022-08-07 11:45:03 +00:00
txt.print_ub(arr[3])
}
}