Updated the cx16 library to the Commander X16's ROM prerelease 37.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
;
|
||||
; 2019-09-25, Greg King
|
||||
; 2020-04-30, Greg King
|
||||
;
|
||||
; unsigned char cpeekcolor (void);
|
||||
; /* Return the colors from the current cursor position. */
|
||||
@@ -12,8 +12,15 @@
|
||||
|
||||
_cpeekcolor:
|
||||
php
|
||||
lda CURS_FLAG ; is the cursor currently off?
|
||||
bne @L1
|
||||
sei ; don't let cursor blinking interfere
|
||||
stz VERA::CTRL ; use port 0
|
||||
ldx CURS_STATE ; is cursor currently displayed?
|
||||
beq @L1 ; jump if not
|
||||
lda CURS_COLOR ; get color under cursor
|
||||
bra @L2
|
||||
|
||||
@L1: stz VERA::CTRL ; use port 0
|
||||
lda CURS_Y
|
||||
sta VERA::ADDR+1 ; set row number
|
||||
stz VERA::ADDR+2
|
||||
@@ -21,7 +28,7 @@ _cpeekcolor:
|
||||
sec ; color attribute is second byte
|
||||
rol a
|
||||
sta VERA::ADDR
|
||||
lda VERA::DATA0 ; get color
|
||||
plp
|
||||
lda VERA::DATA0 ; get color of character
|
||||
@L2: plp
|
||||
ldx #>$0000
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user