prog8/examples/test.p8

41 lines
879 B
Plaintext
Raw Normal View History

2024-06-01 13:03:01 +00:00
%import textio
%zeropage basicsafe
%option no_sysinit
main {
2024-08-24 12:34:23 +00:00
sub start() {
2024-09-08 19:49:13 +00:00
ubyte @shared x
uword @shared w
x=2
if x==2 or cx16.r0L==42
txt.print("yep0\n")
if x==1 or x==2
txt.print("yep1\n")
x = 9
if x==1 or x==2
txt.print("yep2-shouldn't-see-this\n") ; TODO fix this in IR/VM
if x in 1 to 4
txt.print("yep3-shouldn't-see-this\n")
if x in 4 to 10
txt.print("yep4\n")
w=2222
if w==1111 or w==2222
txt.print("w-yep1\n")
w = 4999
if w==1111 or w==2222
txt.print("w-yep2-shouldn't-see-this\n") ; TODO fix this in IR/VM
if w in 1111 to 4444
txt.print("w-yep3-shouldn't-see-this\n")
if w in 4444 to 5555
txt.print("w-yep4\n")
2024-07-21 11:35:28 +00:00
}
}