CHRIN fix, M65 part

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent d692887261
commit 559d087c39
1 file changed
+15 -12
+15 -12
View File
@@ -6,7 +6,7 @@
;
m65_chrin_keyboard: ; XXX connnect this function to Kernal
m65_chrin_keyboard:
; Preserve .X, .Y and .Z register
@@ -14,6 +14,11 @@ m65_chrin_keyboard: ; XXX connnect this function to Kernal
phy
phz
; Preserve old PNTR
lda PNTR
pha
; FALLTROUGH
m65_chrin_keyboard_repeat:
@@ -48,6 +53,8 @@ m65_chrin_keyboard_empty_line:
m65_chrin_keyboard_end:
plz ; drop stored PNTR
plz
ply
plx
@@ -61,10 +68,6 @@ m65_chrin_keyboard_not_end_of_input:
inc CRSW
tay
; FALLTROUGH
m65_chrin_keyboard_return_byte:
jsr m65_helper_scrlpnt_chrin
tya
@@ -141,17 +144,17 @@ m65_chrin_enter_loop:
; XXX add windowed mode support here - correct INDX and M65__SCRINPUT
; Set mark informing that we are returning a line
ldy #$01
sty CRSW ; XXX has to get previous PNTR+1, not 1
; Clear quote mode mark
dey
ldy #$00
sty QTSW
; Return first char of line
bra m65_chrin_keyboard_return_byte ; branch always
; Set current character to return
pla
pha
sta CRSW
; Return first char
bra m65_chrin_keyboard_not_end_of_input
m65_chrin_keyboard_not_enter: