1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-20 12:32:58 +00:00
cc65/libsrc/atari5200/bgcolor.s

27 lines
446 B
ArmAsm
Raw Normal View History

;
; Greg King, 10-Apr-2019
;
.export _bgcolor
.include "atari5200.inc"
.data
old_bg_index:
.byte COLOR_BLACK ; see conioscreen.s for default palette
.code
_bgcolor:
and #$03
tax
ldy COLOR0,x
lda old_bg_index
sty COLOR4 ; set new value
stx old_bg_index
ldx #0 ; fix high byte
rts
.end