*KEY tweaks. (WIP)

This commit is contained in:
Bobbi Webber-Manners 2022-12-09 23:40:27 -05:00
parent 7999707853
commit 4eb53b2230
2 changed files with 7 additions and 4 deletions

Binary file not shown.

View File

@ -91,18 +91,20 @@ STARKEY1 ASL A ; Key num * 2
PLX ; Recover key num * 2
STA KEYBUF+1,X ; Store MS byte start address
:L1 LDA (OSLPTR),Y ; Read char from input
CMP #$0D ; Carriage return?
BEQ :S1
STA (OSTEXT) ; Store in buffer
PHA
INY ; Advance source index
JSR INCKEYPTR ; Advance dest pointer
INY
BRA :L1
PLA
CMP #$0D ; Carriage return?
BNE :L1
:S1 LDA OSTEXT+0
STA KEYBUF + $20 ; Free space LS byte
LDA OSTEXT+1
STA KEYBUF + $21 ; Free space LS byte
RTS
* Increment OSTEXT, skipping over screen holes
* Screen holes are $478-$47F, $4F8-$4FF
* $578-$57F, $5F8-$5FF
@ -125,6 +127,7 @@ INCKEYPTR LDA OSTEXT+0 ; Least significant byte
RTS
* OSWRCH handler
****************
* Send a character to current output