cgetc export data now
This commit is contained in:
@@ -6,12 +6,24 @@
|
||||
|
||||
.export _kbhit
|
||||
|
||||
.import store_char
|
||||
|
||||
.include "telestrat.inc"
|
||||
|
||||
_kbhit:
|
||||
BRK_TELEMON XRD0
|
||||
lda store_char ; Check if a key has been detected previously
|
||||
beq @call_telemon ; No, calls Telemon routine
|
||||
lda #$01 ; There is a key pressed previously, return 1
|
||||
ldx #$00
|
||||
txa
|
||||
rol
|
||||
eor #$01
|
||||
rts
|
||||
@call_telemon:
|
||||
BRK_TELEMON XRD0
|
||||
|
||||
ldx #$00
|
||||
bcs @no_char_action
|
||||
sta store_char
|
||||
lda #$01
|
||||
rts
|
||||
@no_char_action:
|
||||
tax
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user