another keyboard code optimization
This commit is contained in:
1 parent
d01c7e8ac9
commit
22936314fe
1 file changed
+9
-8
@@ -88,6 +88,7 @@ m65_scnkey:
|
|||||||
stx SHFLAG ; .X is $00 here
|
stx SHFLAG ; .X is $00 here
|
||||||
|
|
||||||
lda M65_KB_BUCKY
|
lda M65_KB_BUCKY
|
||||||
|
beq m65_scnkey_bucky_done
|
||||||
dex ; index into kb_matrix_bucky_shflag
|
dex ; index into kb_matrix_bucky_shflag
|
||||||
|
|
||||||
; FALLTROUGH
|
; FALLTROUGH
|
||||||
@@ -96,22 +97,22 @@ m65_scnkey_bucky_loop:
|
|||||||
|
|
||||||
inx
|
inx
|
||||||
asr ; ASR preserves most significant bit, but in our case it is 0
|
asr ; ASR preserves most significant bit, but in our case it is 0
|
||||||
bcc m65_scnkey_bucky_next
|
bcc @1
|
||||||
|
|
||||||
; Bucky key pressed
|
; Bucky key pressed
|
||||||
|
|
||||||
pha
|
tay
|
||||||
lda kb_matrix_bucky_shflag, x
|
lda kb_matrix_bucky_shflag, x
|
||||||
ora SHFLAG
|
ora SHFLAG
|
||||||
sta SHFLAG
|
sta SHFLAG
|
||||||
pla
|
tya
|
||||||
|
@1:
|
||||||
; FALLTROUGH
|
|
||||||
|
|
||||||
m65_scnkey_bucky_next:
|
|
||||||
|
|
||||||
bne m65_scnkey_bucky_loop
|
bne m65_scnkey_bucky_loop
|
||||||
|
|
||||||
|
; FALLTROUGH
|
||||||
|
|
||||||
|
m65_scnkey_bucky_done:
|
||||||
|
|
||||||
; Set KEYTAB vector
|
; Set KEYTAB vector
|
||||||
|
|
||||||
lda KEYLOG+1
|
lda KEYLOG+1
|
||||||
|
|||||||
Reference in new issue
Block a user