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
+10 -40
+10 -40
View File
@@ -314,47 +314,17 @@ skip0:
;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;; // Scan Keyboard Matrix ;; // Scan Keyboard Matrix
lda #%11111110 ldx #7
sta $dc00 lda #%11111110
ldy $dc01 * sta $dc00
sty ScanResult+7 pha
sec lda $dc01
sta ScanResult,x
pla
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
;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~