From 2398616bee2c1c52ffced6318c6f571d2f689a17 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Thu, 7 Nov 2019 22:25:15 +0100 Subject: [PATCH] small CHRIN optimization --- c64/kernal/keyboard/chrin_keyboard.s | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/c64/kernal/keyboard/chrin_keyboard.s b/c64/kernal/keyboard/chrin_keyboard.s index b91245a7..2c814539 100644 --- a/c64/kernal/keyboard/chrin_keyboard.s +++ b/c64/kernal/keyboard/chrin_keyboard.s @@ -33,12 +33,15 @@ chrin_repeat: rts not_end_of_input: - // Return next byte of waiting input and advance index + // Advance index + inc CRSW + + // Return next byte of waiting tay +chrin_keyboard_return_byte: plx_trash_a lda (LXSP),y jsr screen_code_to_petscii - inc CRSW clc rts @@ -84,13 +87,10 @@ chrin_enter: sty INDX lda #$01 sta CRSW + // Return first char of line ldy #$00 - plx_trash_a - lda (LXSP),y - jsr screen_code_to_petscii - clc - rts + beq chrin_keyboard_return_byte // branch always empty_line: // For an empty line, just return the carriage return