Created a target and a library for the Commander X16 prototype computer.

This commit is contained in:
Greg King
2019-09-27 03:38:51 -04:00
parent 0896deedef
commit 18afc7c703
49 changed files with 2440 additions and 59 deletions

27
libsrc/cx16/bordercolor.s Normal file
View File

@@ -0,0 +1,27 @@
;
; 2019-09-23, Greg King
;
; unsigned char __fastcall__ bordercolor (unsigned char color);
; /* Set the color for the border. The old color setting is returned. */
;
.export _bordercolor
.include "cx16.inc"
_bordercolor:
tax
; Point to the border color register.
stz VERA::CTRL ; Use port 0
lda #<VERA::COMPOSER::FRAME
sta VERA::ADDR
lda #>VERA::COMPOSER::FRAME
sta VERA::ADDR+1
ldy #^VERA::COMPOSER::FRAME | VERA::INC0
sty VERA::ADDR+2
lda VERA::DATA0 ; get old value
stx VERA::DATA0 ; set new value
rts