atari5200: implement bgcolor() and textcolor()

Includes some other small fixes/cleanups.
This commit is contained in:
Christian Groessler
2019-04-02 21:11:11 +02:00
committed by Oliver Schmidt
parent edd596b2a4
commit ec5e38617a
18 changed files with 261 additions and 26 deletions

View File

@@ -0,0 +1,28 @@
;
; Christian Groessler, 02-Apr-2019
;
; unsigned char __fastcall__ textcolor (unsigned char color);
.export _textcolor
.import conio_color
.include "atari.inc"
_textcolor:
; move bits #0 and #1 to bits #6 and #7
and #3
clc
ror a
ror a
ror a ; new conio_color value
ldx conio_color ; get old value
sta conio_color ; store new value
txa
; move bits #6 and #7 to bits #0 and #1
clc
rol a
rol a
rol a
ldx #0
rts