1
0
mirror of https://github.com/cc65/cc65.git synced 2025-02-07 20:30:49 +00:00

Second tentative fix

This commit is contained in:
Fabrizio Caruso 2019-10-28 20:02:18 +01:00 committed by greg-king5
parent 1d39863a60
commit 609f63ac74
2 changed files with 5 additions and 3 deletions

View File

@ -20,8 +20,10 @@
; So the keyboard returns '1', '2', '3', 'P', 'R', 'F' or '?'. ; So the keyboard returns '1', '2', '3', 'P', 'R', 'F' or '?'.
_cgetc: _cgetc:
bne _start
jsr _kbhit ; Check for char available jsr _kbhit ; Check for char available
beq _cgetc beq _cgetc
_start:
lda KBSTL lda KBSTL
ora KBEDG ora KBEDG
ldx #0 ldx #0
@ -52,6 +54,8 @@ _cgetc:
rts rts
@L5: @L5:
lda KBEDG ; No Pause pressed lda KBEDG ; No Pause pressed
ldx #$00
stx KBEDG
ora KBSTL ora KBSTL
bit #$08 bit #$08
beq @L7 beq @L7

View File

@ -49,8 +49,6 @@ _kbhit:
sta KBNPR ; inverted previous ones pressed sta KBNPR ; inverted previous ones pressed
stx KBPRV stx KBPRV
lda KBEDG lda KBEDG
beq @L1
jmp return1 ; Key hit
@L1: tax ; No new keys hit @L1: tax ; No new keys hit
rts rts