prog8/examples/test.p8

97 lines
1.8 KiB
Plaintext
Raw Normal View History

%import textio
%zeropage basicsafe
2022-03-13 11:52:12 +00:00
; NOTE: meant to test to virtual machine output target (use -target virtual)
main {
2022-06-08 19:05:03 +00:00
sub start() {
2022-06-29 20:19:44 +00:00
ubyte a1 = 0
uword w1 = 0
ubyte vv
if not a1
txt.print("ok ")
else
txt.print("fail ")
vv = not a1
txt.print_ub(vv)
txt.nl()
a1=128
if not a1
txt.print("fail ")
else
txt.print("ok ")
vv = not a1
txt.print_ub(vv)
txt.nl()
if not w1
txt.print("ok ")
else
txt.print("fail ")
vv = not w1
txt.print_ub(vv)
txt.nl()
w1 = 4096
if not w1
txt.print("fail ")
else
txt.print("ok ")
vv = not w1
txt.print_ub(vv)
txt.nl()
2022-06-29 20:19:44 +00:00
; petaxian roller.p8 line 49
; super large in new version, ok in 8.2....
; TODO cx16.r0 = a2 + 25 + (a1/40)
; txt.setcc( a1, a2 + 25 + (a1/40), 11,22)
2022-06-29 20:19:44 +00:00
; if a1 and a2 {
; a1++
; }
;
; if not a1 or not a2 {
; a1++
; }
;
; if a1!=99 and not a2 {
; a1++
; }
2022-06-29 20:19:44 +00:00
; while a1 != a2 {
; a1++
; }
;
; while a1!='\"' {
; a1++
; }
; do {
; a1++
; } until a1==99
;
;close_end:
; a1++
2022-06-29 20:19:44 +00:00
; ; a "pixelshader":
; sys.gfx_enable(0) ; enable lo res screen
; ubyte shifter
;
; repeat {
; uword xx
; uword yy = 0
; repeat 240 {
; xx = 0
; repeat 320 {
; sys.gfx_plot(xx, yy, xx*yy + shifter as ubyte)
; xx++
; }
; yy++
; }
; shifter+=4
; }
}
2022-02-17 23:40:31 +00:00
}