prog8/examples/test.p8

31 lines
546 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-11 21:01:14 +00:00
uword crc = $ffff
if crc & $8000 ; msb(crc) & $80
txt.print("yes")
else
txt.print("fail!")
if crc & $1234
txt.print("yes")
else
txt.print("fail!")
}
; sub start2() {
; ubyte[] arr = [1,2,3,4]
; uword pointer
; ubyte ix
;
; arr[ix] = arr[ix]+1
;
;; arr[3] = arr[3]+1
;; pointer[3] = pointer[3]+1
;
; txt.print_ub(arr[3])
; }
}