X-Git-Url: https://git.sur5r.net/?p=cc65;a=blobdiff_plain;f=libsrc%2Fatari5200%2Fbgcolor.s;h=bf10dff2cd4f9572c9cd861530a2444d8bf29378;hp=1f9f772601fd196ccec6b7d627c19d3bfc68838e;hb=be6bba66a927e419860d2115e2d38de4e1c09d96;hpb=79b9a8d2dfa6d13af7f2de963cc591fec786a6b0 diff --git a/libsrc/atari5200/bgcolor.s b/libsrc/atari5200/bgcolor.s index 1f9f77260..bf10dff2c 100644 --- a/libsrc/atari5200/bgcolor.s +++ b/libsrc/atari5200/bgcolor.s @@ -1 +1,37 @@ -.include "../atari/bgcolor.s" +; +; Christian Groessler, 05-Apr-2019 +; + + .import conio_colors + .export _bgcolor + + .include "atari5200.inc" + + .constructor init_old_bgcolor + +.bss + +old_bg_color: + .res 1 + +.code + +_bgcolor: + and #3 + tax + lda conio_colors,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 conio_colors+3 ; see also conioscreen.s for initialization + sta old_bg_color + rts + + .end