From 7ce75c9092decf6595328ce783eacb4151d2de18 Mon Sep 17 00:00:00 2001 From: 4am Date: Sun, 22 Nov 2020 00:50:43 -0500 Subject: [PATCH] shave some cycles (front load end-of-loop comparisons) --- src/fx/fx.dhgr.soft.diagonal.a | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/fx/fx.dhgr.soft.diagonal.a b/src/fx/fx.dhgr.soft.diagonal.a index 0b98a5bf7..b6d81c547 100644 --- a/src/fx/fx.dhgr.soft.diagonal.a +++ b/src/fx/fx.dhgr.soft.diagonal.a @@ -48,18 +48,28 @@ counter = $FF !source "src/fx/macros.a" !source "src/fx/fx.dhgr.common.a" +exit=*+3 +COPY_TO_AUXMEM $60, $07 - lda #(40+24+7-1) ; columns + rows + blocks per row - 1 + lda #(40+24+7) ; columns + rows + blocks per row sta counter - lda #39 + lda #40 sta col + ColLoop - lda #23 + lda $c000 + bmi exit + dec col + dec counter + beq exit + + lda #24 sta row ldy col RowLoop + dec row + bmi ColLoop ldx row lda hgrrowlo, x sta src @@ -189,14 +199,7 @@ RowLoop sta $C002 sta $C004 iny - dec row - +LBPL RowLoop - lda $c000 - bmi @exit - dec col - dec counter - +LBNE ColLoop -@exit rts + jmp RowLoop ; next table can not cross a page boundary !if <* > $E8 {