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,6 +1,6 @@
;
; 2016-02-28, Groepaz
; 2020-04-29, Greg King
; 2022-03-29, Greg King
;
; char cpeekc (void);
; /* Return the character from the current cursor position. */
@@ -9,13 +9,18 @@
.export _cpeekc
.include "cx16.inc"
.macpack generic
screen_addr := $1B000 ; VRAM address of text screen
_cpeekc:
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
asl a ; each character has two bytes
sta VERA::ADDR