prog8/examples/test.p8

48 lines
649 B
Plaintext
Raw Normal View History

%import textio
; %import floats
%zeropage basicsafe
2021-10-27 21:48:02 +00:00
2021-10-30 13:15:11 +00:00
main {
sub start() {
word xx=0
2021-11-06 13:47:11 +00:00
if not xx {
txt.print("xx is zero\n")
2021-11-06 18:09:33 +00:00
}
while not xx {
xx ++
}
do {
xx--
} until not xx
2021-11-06 17:52:54 +00:00
if not xx {
txt.print("xx is zero\n")
}
2021-11-06 13:47:11 +00:00
; ubyte yy=$30
; ubyte zz=9
; sys.memset(xx+200, yy*2, ~yy)
;
; if yy & %10000 {
; yy++
; }
;
; @($c030) = 10
; @(~xx) *= 2
; txt.print_ub(@($c030))
;
; float f1 = 1111.11
; float f2 = 2222.22
; float[] fa = [2222.22, 3333.33]
;
; swap(f1, fa[1])
; floats.print_f(f1)
; txt.nl()
; floats.print_f(fa[1])
}
}