]> git.sur5r.net Git - cc65/blob - libsrc/atari/bgcolor.s
atari: split color.s into bordercolor.s and bgcolor.s
[cc65] / libsrc / atari / bgcolor.s
1 ;
2 ; Christian Groessler, 02-Apr-2019
3 ;
4
5         .export         _bgcolor
6
7         .include        "atari.inc"
8
9
10 _bgcolor:
11         ldx     COLOR2  ; get old value
12         sta     COLOR2  ; set new value
13         and     #$0e
14         cmp     #8
15         bcs     bright
16         lda     #$0e
17         .byte   $2c     ; bit opcode, eats the next 2 bytes
18 bright: lda     #0
19         sta     COLOR1
20         txa
21         ldx     #0      ; fix X
22         rts