kbhit checks KBEDG and getc resets KBEDG
This commit is contained in:
committed by
greg-king5
parent
43f24afe29
commit
78d660da55
@@ -29,6 +29,8 @@ KBNPR: .byte 0
|
||||
|
||||
.code
|
||||
_kbhit:
|
||||
lda KBEDG
|
||||
bne L1
|
||||
lda $FCB0 ; Read the Opt buttons
|
||||
and #$0c
|
||||
sta KBTMP
|
||||
@@ -49,6 +51,6 @@ _kbhit:
|
||||
sta KBNPR ; inverted previous ones pressed
|
||||
stx KBPRV
|
||||
lda KBEDG
|
||||
@L1: tax ; No new keys hit
|
||||
L1: ldx #$00
|
||||
rts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user