Blob Blame History Raw
From 609f63ac749fc4bfc75720d5b27c5f7820dc741b Mon Sep 17 00:00:00 2001
From: Fabrizio Caruso <fabrizio_caruso@hotmail.com>
Date: Mon, 28 Oct 2019 20:02:18 +0100
Subject: [PATCH 082/170] Second tentative fix

---
 libsrc/lynx/cgetc.s | 4 ++++
 libsrc/lynx/kbhit.s | 4 +---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libsrc/lynx/cgetc.s b/libsrc/lynx/cgetc.s
index ee489337..bb2840b1 100644
--- a/libsrc/lynx/cgetc.s
+++ b/libsrc/lynx/cgetc.s
@@ -20,8 +20,10 @@
 ; So the keyboard returns '1', '2', '3', 'P', 'R', 'F' or '?'.
 
 _cgetc:
+        bne     _start     
         jsr     _kbhit          ; Check for char available
         beq     _cgetc
+_start:
         lda     KBSTL
         ora     KBEDG
         ldx     #0
@@ -52,6 +54,8 @@ _cgetc:
         rts
 @L5:
         lda     KBEDG           ; No Pause pressed
+        ldx     #$00
+        stx     KBEDG
         ora     KBSTL
         bit     #$08
         beq     @L7
diff --git a/libsrc/lynx/kbhit.s b/libsrc/lynx/kbhit.s
index b606fc49..a5126a7d 100644
--- a/libsrc/lynx/kbhit.s
+++ b/libsrc/lynx/kbhit.s
@@ -49,8 +49,6 @@ _kbhit:
         sta     KBNPR           ; inverted previous ones pressed
         stx     KBPRV
         lda     KBEDG
-        beq     @L1
-        jmp     return1         ; Key hit
-
 @L1:    tax                     ; No new keys hit
         rts
+
-- 
2.26.0