prog8/examples/test.p8

44 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-02-12 20:53:57 +00:00
%import c64utils
%zeropage basicsafe
2019-01-26 21:46:01 +00:00
~ main {
2019-02-14 01:23:59 +00:00
; @todo test memset/memcopy (there's a bug in memcopy?)
2019-02-21 00:31:33 +00:00
;ubyte x = rnd82() % 6 ; @todo fix compiler crash + always 0???
;drawNext(rnd() & 7) ; @todo missing asm pattern
2019-02-14 01:23:59 +00:00
2019-02-21 00:31:33 +00:00
;ubyte[7] blockColors = [3, 6, 8, 7, 5, 4, 2]
;drawNext(n % len(blockColors)) ; @todo why is len a word here?
2019-02-14 01:23:59 +00:00
2019-02-21 00:31:33 +00:00
; if(X and c64scr.getcc(1,1)!=32) ... @todo the result value of the asmsub getcc is not put on the eval stack when used in an expression
2019-02-14 01:23:59 +00:00
2019-02-21 00:31:33 +00:00
; (e1 and e2) @todo should not simply bitwise and e1 and e2 (same for or, xor)
; Y = (currentBlock[0] & sc) ; @todo missing assembly pattern for this bitand_byte
2019-02-12 20:53:57 +00:00
2019-02-21 00:31:33 +00:00
; mul_word_3
2019-02-12 20:53:57 +00:00
2019-02-21 00:31:33 +00:00
sub start() {
2019-02-12 20:53:57 +00:00
2019-02-21 00:31:33 +00:00
Y=c64scr.getchr(30,20)
c64scr.print_ub(Y)
2019-02-12 20:53:57 +00:00
c64.CHROUT('\n')
2019-02-21 00:31:33 +00:00
Y=c64scr.getclr(30,20)
c64scr.print_ub(Y)
2019-02-12 20:53:57 +00:00
c64.CHROUT('\n')
2019-02-21 00:31:33 +00:00
c64scr.setcc(30,20,123,4)
2019-02-12 20:53:57 +00:00
2019-02-21 00:31:33 +00:00
Y=c64scr.getchr(30,20)
c64scr.print_ub(Y)
c64.CHROUT('\n')
Y=c64scr.getclr(30,20)
c64scr.print_ub(Y)
2019-02-12 20:53:57 +00:00
c64.CHROUT('\n')
}
}