prog8/examples/test.p8

48 lines
1017 B
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-23 21:13:12 +00:00
; @todo see looplabelproblem.p8
2019-02-14 01:23:59 +00:00
2019-02-21 00:31:33 +00:00
;ubyte x = rnd82() % 6 ; @todo fix compiler crash + always 0???
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-12 20:53:57 +00:00
2019-02-21 00:31:33 +00:00
sub start() {
2019-02-12 20:53:57 +00:00
ubyte sc = 3
ubyte[4] currentBlock
Y=currentBlock[0] & sc
2019-02-23 21:13:12 +00:00
ubyte ub1 = %1001
ubyte ub2 = %0111
ubyte ub3
byte b1 = %1001
byte b2 = %0111
byte b3
uword uw1 = %0000100100000000
uword uw2 = %0000001111000000
uword uw3
word w1 = %0000100100000000
word w2 = %0000001111000000
word w3
2019-02-12 20:53:57 +00:00
}
2019-02-23 21:13:12 +00:00
sub drawNext(ubyte x) {
A=x
}
sub drawNextW(uword w) {
w++
}
}