projects
/
a2gs_xortest
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
palette test
[a2gs_xortest]
/
xortest.s
1
org $800
2
3
REG_NEWVID = $c029
4
FB_BASE = $e12000
5
6
clc
7
xce
8
9
lda #$c1
10
sta REG_NEWVID
11
12
rep #$30 ; accum/index 16bit
13
lda #$0000
14
ldx #$0000
15
fillrest
16
stal $e19d00,x
17
inx
18
inx
19
cpx #$300
20
bne fillrest
21
22
lda #$0000
23
cmap pha
24
sta 0
25
asl
26
tax ; offset = i * 2
27
asl
28
asl
29
asl
30
ora 0
31
sta 0
32
xba
33
ora 0
34
stal $e19e00,x
35
pla
36
inc
37
cmp #$000f
38
bne cmap
39
40
YVAL = 0
41
COLIDX = 1
42
43
sep #$20 ; accum 8bit
44
ldx #0 ; fb index
45
stz YVAL
46
yloop lda YVAL
47
and #$f
48
sta COLIDX
49
asl
50
asl
51
asl
52
asl
53
ora COLIDX
54
ldy #160 ; 160 bytes across
55
xloop stal FB_BASE,x
56
inx
57
dey
58
bne xloop
59
inc YVAL
60
lda YVAL
61
cmp #200
62
bne yloop
63
64
infloop bra infloop
65
66
; vi:ft=asm_ca65