mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-13 22:30:49 +00:00
slightly faster key handling
This commit is contained in:
parent
1496e2cc5d
commit
6afee2f6ea
@ -178,7 +178,7 @@ done_time:
|
|||||||
check_keyboard:
|
check_keyboard:
|
||||||
|
|
||||||
jsr get_key
|
jsr get_key
|
||||||
lda LASTKEY
|
cmp #0
|
||||||
beq exit_interrupt
|
beq exit_interrupt
|
||||||
|
|
||||||
;====================
|
;====================
|
||||||
|
@ -11,7 +11,7 @@ get_key:
|
|||||||
|
|
||||||
figure_out_key:
|
figure_out_key:
|
||||||
cmp #' '+128 ; the mask destroys space ; 2
|
cmp #' '+128 ; the mask destroys space ; 2
|
||||||
beq save_key ; so handle it specially ; 2nt/3
|
beq return_key ; so handle it specially ; 2nt/3
|
||||||
|
|
||||||
check_right_arrow:
|
check_right_arrow:
|
||||||
cmp #$95 ; 2
|
cmp #$95 ; 2
|
||||||
@ -32,15 +32,14 @@ check_down_arrow:
|
|||||||
check_escape:
|
check_escape:
|
||||||
and #$5f ; mask, to make upper-case ; 2
|
and #$5f ; mask, to make upper-case ; 2
|
||||||
cmp #$1B ; 2
|
cmp #$1B ; 2
|
||||||
bne save_key ; 2nt/3
|
bne return_key ; 2nt/3
|
||||||
lda #'Q' ; 2
|
lda #'Q' ; 2
|
||||||
bne save_key ; branch always ; 3
|
bne return_key ; branch always ; 3
|
||||||
|
|
||||||
no_key:
|
no_key:
|
||||||
lda #0 ; no key, so save a zero ; 2
|
lda #0 ; no key, so return a zero ; 2
|
||||||
|
|
||||||
save_key:
|
return_key:
|
||||||
sta LASTKEY ; save the key to our buffer ; 2
|
|
||||||
rts ; 6
|
rts ; 6
|
||||||
;============
|
;============
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user