]> git.sur5r.net Git - cc65/blob - libsrc/atari5200/bgcolor.s
atari5200: changes from discussions in #870
[cc65] / libsrc / atari5200 / bgcolor.s
1 ;
2 ; Greg King, 10-Apr-2019
3 ;
4
5         .export         _bgcolor
6
7         .include        "atari5200.inc"
8
9 .data
10
11 old_bg_index:
12         .byte   COLOR_BLACK     ; see conioscreen.s for default palette
13
14 .code
15
16 _bgcolor:
17         and     #$03
18         tax
19         ldy     COLOR0,x
20         lda     old_bg_index
21         sty     COLOR4          ; set new value
22         stx     old_bg_index
23         ldx     #0              ; fix high byte
24         rts
25
26 .end