cgetc export data now

This commit is contained in:
jede
2022-04-26 00:40:16 +02:00
parent 451acb3423
commit e9597e8721
2 changed files with 40 additions and 14 deletions

View File

@@ -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