prog8/examples/test.p8

59 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-03-24 23:32:54 +00:00
%import c64lib
%import c64utils
%import c64flt
%zeropage basicsafe
2020-07-26 22:32:59 +00:00
main {
2020-07-26 21:32:20 +00:00
sub start() {
2020-08-17 21:40:29 +00:00
; byte[] data = [11,22,33,44,55,66]
; word[] dataw = [1111,2222,3333,4444,5555,6666]
;
; byte d
; word w
;
; for d in data {
; c64scr.print_b(d)
; c64.CHROUT(',')
; }
; c64.CHROUT('\n')
; for w in dataw {
; c64scr.print_w(w)
; c64.CHROUT(',')
; }
; c64.CHROUT('\n')
ubyte bb
ubyte from = 10
ubyte end = 20
for bb in from to end step 3 {
c64scr.print_ub(bb)
c64.CHROUT(',')
}
c64.CHROUT('\n')
for bb in end to from step -3 {
c64scr.print_ub(bb)
c64.CHROUT(',')
}
c64.CHROUT('\n')
2020-08-18 11:49:08 +00:00
word ww
word fromw = -10
word endw = 21
2020-08-17 21:40:29 +00:00
for ww in fromw to endw step 3 {
2020-08-18 11:49:08 +00:00
c64scr.print_w(ww)
c64.CHROUT(',')
}
2020-08-18 11:49:08 +00:00
c64.CHROUT('\n')
2020-08-17 21:40:29 +00:00
for ww in endw to fromw step -3 {
2020-08-18 11:49:08 +00:00
c64scr.print_w(ww)
c64.CHROUT(',')
}
c64.CHROUT('\n')
2020-07-25 23:32:27 +00:00
}
}