From 671a3bc3bfb29114d2d7f398125990b9d95c4948 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Thu, 7 Nov 2019 22:29:20 +0100 Subject: [PATCH] saved few more bytes in CHRIN keyboard --- c64/kernal/keyboard/chrin_keyboard.s | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/c64/kernal/keyboard/chrin_keyboard.s b/c64/kernal/keyboard/chrin_keyboard.s index 2c814539..dcefc146 100644 --- a/c64/kernal/keyboard/chrin_keyboard.s +++ b/c64/kernal/keyboard/chrin_keyboard.s @@ -6,7 +6,7 @@ chrin_keyboard: - // Save X + // Save .X phx_trash_a chrin_repeat: @@ -27,6 +27,14 @@ chrin_repeat: // Return carriage return and clear pending input flag lda #$00 sta CRSW + + // FALLTROUGH + +empty_line: + // For an empty line, just return the carriage return + // (and don't forget to actually print the carriage return, so that + // the cursor advances and screen scrolls as required) + plx_trash_a clc lda #$0d @@ -92,15 +100,6 @@ chrin_enter: ldy #$00 beq chrin_keyboard_return_byte // branch always -empty_line: - // For an empty line, just return the carriage return - // (and don't forget to actually print the carriage return, so that - // the cursor advances and screen scrolls as required) - plx_trash_a - clc - lda #$0d - rts - not_enter: lda KEYD