prog8/examples/test.p8

99 lines
1.9 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
ubyte a2 = 128
uword w1 = 0
; if not a1 and not w1
; txt.print("1")
; if (0==a1) and (0==w1)
; txt.print("a")
; txt.nl()
a1 = 0
w1 = 4096
if not a1 and not w1
txt.print("fail ")
else
txt.print("ok ")
if (0==a1) and (0==w1)
txt.print("fail ")
else
txt.print("ok ")
txt.nl()
a1=128
w1=2
if not a1 and not w1
txt.print("fail")
if (0==a1) and (0==w1)
txt.print("fail")
txt.nl()
w1=2
if not a1 and not w1
txt.print("fail")
if (0==a1) and (0==w1)
txt.print("fail")
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
}