Upgraded the cx16 library to the Commander X16 Kernal ROM's prerelease 39.

This commit is contained in:
Greg King
2022-04-02 09:39:35 -04:00
parent 75ee10478e
commit a5e69e7ea6
18 changed files with 208 additions and 172 deletions

View File

@@ -1,5 +1,5 @@
;
; 2020-04-30, Greg King
; 2022-03-29, Greg King
;
; unsigned char cpeekcolor (void);
; /* Return the colors from the current cursor position. */
@@ -8,8 +8,11 @@
.export _cpeekcolor
.include "cx16.inc"
.macpack generic
screen_addr := $1B000 ; VRAM address of text screen
_cpeekcolor:
php
lda CURS_FLAG ; is the cursor currently off?
@@ -22,8 +25,10 @@ _cpeekcolor:
@L1: stz VERA::CTRL ; use port 0
lda CURS_Y
add #<(>screen_addr)
sta VERA::ADDR+1 ; set row number
stz VERA::ADDR+2
lda #^screen_addr
sta VERA::ADDR+2
lda CURS_X ; get character column
sec ; color attribute is second byte
rol a