diff options
author | B. Watson <urchlay@slackware.uk> | 2022-11-04 02:32:46 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2022-11-04 02:32:46 -0400 |
commit | fad90e3c58d88f96c966209db12e010320fa9c87 (patch) | |
tree | c3d4c934c7729f6fcbb37312592809d391e61425 | |
parent | 542c4c433a2ca17856d3d229111dc36813f594d3 (diff) | |
download | dla-asm-fad90e3c58d88f96c966209db12e010320fa9c87.tar.gz |
Save 3 more cycles in drunkwalk.
-rw-r--r-- | dla.s | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -551,10 +551,10 @@ checkneigh: ; check neighbors. used to be a subroutine, inlined it. ; also inlined plotsetup here. sty part_y ; 3 - lda lineaddrs_l,y - sta pixptr - lda lineaddrs_h,y - sta pixptr+1 + lda lineaddrs_l,y ; 5 + sta pixptr ; 3 + lda lineaddrs_h,y ; 5 + sta pixptr+1 ; 3 ; 3/4 of the time, we can use a faster code path, check ; (-1,0) and (1,0) at the same time. this happens only when @@ -601,8 +601,10 @@ pp1ok: tay lda (pixptr),y and pixmask - bne stick - jmp dwloop ; too far for branch. X *still* holds (maybe modified) part_x + beq dwloop ; ...or fall through to stick. + ; note that if we add much more code to drunkwalk, the beq will + ; have to become a jmp, which takes 3 extra cycles. so any code + ; added above had better save more than 3 cycles! stick: ; we always get here with Z flag clear stx part_x ; only update part_x at exit. |