prog8/examples/test.p8

59 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-03-22 21:00:21 +00:00
%import textio
%zeropage basicsafe
main {
sub start() {
2023-05-07 13:15:58 +00:00
ubyte[10] envelope_attacks = 99
2023-05-07 19:03:14 +00:00
; expect nope yep yep nope yep yep
cx16.r0L = 8
cx16.r2L = 9
if (cx16.r0L >= cx16.r2L) or (envelope_attacks[cx16.r1L]==0) {
2023-05-07 17:55:06 +00:00
txt.print("\nyep\n")
} else {
txt.print("\nnope\n")
}
2023-05-07 19:03:14 +00:00
cx16.r0L = 9
cx16.r2L = 9
if (cx16.r0L >= cx16.r2L) or (envelope_attacks[cx16.r1L]==0) {
2023-05-07 13:15:58 +00:00
txt.print("\nyep\n")
} else {
txt.print("\nnope\n")
}
2023-05-07 19:03:14 +00:00
cx16.r0L = 10
cx16.r2L = 9
if (cx16.r0L >= cx16.r2L) or (envelope_attacks[cx16.r1L]==0) {
2023-05-07 13:15:58 +00:00
txt.print("\nyep\n")
} else {
txt.print("\nnope\n")
}
2023-05-07 19:03:14 +00:00
cx16.r0L = 0
cx16.r2L = 9
if (cx16.r0L >= cx16.r2L) or (envelope_attacks[cx16.r1L]==0) {
2023-05-07 13:15:58 +00:00
txt.print("\nyep\n")
} else {
txt.print("\nnope\n")
}
2023-05-07 19:03:14 +00:00
cx16.r0L = 9
cx16.r2L = 0
if (cx16.r0L >= cx16.r2L) or (envelope_attacks[cx16.r1L]==0) {
2023-05-07 13:15:58 +00:00
txt.print("\nyep\n")
} else {
txt.print("\nnope\n")
}
2023-05-07 19:03:14 +00:00
cx16.r0L = 255
cx16.r2L = 9
if (cx16.r0L >= cx16.r2L) or (envelope_attacks[cx16.r1L]==0) {
2023-05-07 13:15:58 +00:00
txt.print("\nyep\n")
} else {
txt.print("\nnope\n")
}
2023-03-18 23:24:05 +00:00
}
}