Wrapper PUTCURSOR added so cursor drawing doesn't reach SHR code

This commit is contained in:
Bobbi Webber-Manners 2023-01-09 15:03:02 -05:00
parent 18ebc891b6
commit ae68427b33
3 changed files with 15 additions and 5 deletions

Binary file not shown.

View File

@ -157,7 +157,7 @@ INKEYGO CLI ; Enable IRQs
JSR GETCHRC ; Get character under cursor
STA COPYCHAR ; Save char under edit cursor
LDA CURSORED
JSR PUTCHRC ; Display edit cursor
JSR PUTCURSOR ; Display edit cursor
JSR COPYSWAP1 ; Swap to copy cursor
INKEYGO2 JSR GETCHRC ; Get character under cursor
STA OLDCHAR
@ -179,7 +179,7 @@ INKEY1 LDA CURSOR ; Add cursor
BIT VDUSTATUS
BVC INKEY2
LDA CURSORCP
INKEY2 JSR PUTCHRC ; Toggle cursor
INKEY2 JSR PUTCURSOR ; Toggle cursor
INKEY3 LDA #$27 ; Prepare to return CHR$27 if Escape state
CLC
BIT ESCFLAG ; Check Escape state
@ -213,10 +213,10 @@ INKEYOK PHA ; Save key or timeout
LDA OLDCHAR ; Prepare for main cursor
BIT VDUSTATUS
BVC INKEYOFF2 ; No editing cursor
JSR PUTCHRC ; Remove cursor
JSR PUTCURSOR ; Remove cursor
JSR COPYSWAP1 ; Swap cursor back
LDA COPYCHAR ; Remove main cursor
INKEYOFF2 JSR PUTCHRC ; Remove cursor
INKEYOFF2 JSR PUTCURSOR ; Remove cursor
PLP
BCS INKEYOK3 ; Timeout
LDA ESCFLAG ; Keypress, test for Escape
@ -540,7 +540,7 @@ KEYCURSOR CMP #$C9
BEQ KEYCOPY
PHA
LDA OLDCHAR
JSR PUTCHRC ; Remove cursor
JSR PUTCURSOR ; Remove cursor
PLA
JSR COPYMOVE ; Move copy cursor
JSR GETCHRC ; Save char under cursor

View File

@ -391,6 +391,16 @@ PRCHR7 PLA
:NOTSHR RTS
* Wrapper around PUTCHRC used when drawing cursor
PUTCURSOR TAX ; Preserve character
BIT VDUSCREEN
BVS :SHR
TXA
JMP PUTCHRC
:SHR TXA ; Recover character
RTS
* OSBYTE &87 - Read character at cursor
***************************************
* Fetch character from screen at (TEXTX,TEXTY) and return MODE in Y