1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-18 00:29:02 +00:00
cc65/libsrc/atari5200/bgcolor.s
Christian Groessler d7eecb57f8 atari5200: get rid of conio_colors table
use system color variables instead; improve testcode/lib/atari5200/hello.c
test program
2019-04-12 12:49:38 +02:00

37 lines
637 B
ArmAsm

;
; Christian Groessler, 05-Apr-2019
;
.export _bgcolor
.include "atari5200.inc"
.constructor init_old_bgcolor
.bss
old_bg_color:
.res 1
.code
_bgcolor:
and #3
tax
lda COLOR0,x
ldx old_bg_color
sta COLOR4 ; set new value
sta old_bg_color
txa
ldx #0 ; fix X
rts
.segment "ONCE"
init_old_bgcolor:
lda COLOR0+3 ; see also conioscreen.s for initialization
sta old_bg_color
rts
.end