unroll loop in keyboard scanner

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-20 01:01:05 +09:30
1 parent 67b2f3fc7d
commit 3f18fce879
1 file changed
+8 -38
+8 -38
View File
@@ -314,47 +314,17 @@ skip0:
;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; // Scan Keyboard Matrix ;; // Scan Keyboard Matrix
ldx #7
lda #%11111110 lda #%11111110
sta $dc00 * sta $dc00
ldy $dc01 pha
sty ScanResult+7 lda $dc01
sta ScanResult,x
pla
sec sec
rol rol
sta $dc00 dex
ldy $dc01 bpl -
sty ScanResult+6
rol
sta $dc00
ldy $dc01
sty ScanResult+5
rol
sta $dc00
ldy $dc01
sty ScanResult+4
rol
sta $dc00
ldy $dc01
sty ScanResult+3
rol
sta $dc00
ldy $dc01
sty ScanResult+2
rol
sta $dc00
ldy $dc01
sty ScanResult+1
rol
sta $dc00
ldy $dc01
sty ScanResult+0
;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~