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
lda #%11111110
sta $dc00
ldy $dc01
sty ScanResult+7
sec
ldx #7
lda #%11111110
* sta $dc00
pha
lda $dc01
sta ScanResult,x
pla
sec
rol
sta $dc00
ldy $dc01
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
dex
bpl -
;; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~