shave some bytes

This commit is contained in:
4am 2021-09-21 20:55:46 -04:00
parent 6d288a2df4
commit 15e9372b7d

View File

@ -40,23 +40,16 @@ RowLoop
sta src+1
ldx mask1
lda copymasks_even, x
sta @even1
lda copymasks_odd, x
sta @odd1
ldy #39
- lda (src), y
eor (dst), y ; merge source and destination bits
@odd1=*+1
and #$FD ; [SMC] isolate the bits to replace, zero the rest
and copymasks_odd, x ; isolate the bits to replace, zero the rest
eor (dst), y ; unmerge source and destination bits, leaves 'to keep' destination bits intact
sta (dst), y ; write the result
dey
lda (src), y
eor (dst), y ; merge source and destination bits
@even1=*+1
and #$FD ; [SMC] isolate the bits to replace, zero the rest
and copymasks_even, x ; isolate the bits to replace, zero the rest
eor (dst), y ; unmerge source and destination bits, leaves 'to keep' destination bits intact
sta (dst), y ; write the result
dey
@ -72,23 +65,16 @@ RowLoop
sta src+1
ldx mask2
lda copymasks_even, x
sta @even2
lda copymasks_odd, x
sta @odd2
ldy #39
- lda (src), y
eor (dst), y ; merge source and destination bits
@odd2=*+1
and #$FD ; [SMC] isolate the bits to replace, zero the rest
and copymasks_odd, x ; isolate the bits to replace, zero the rest
eor (dst), y ; unmerge source and destination bits, leaves 'to keep' destination bits intact
sta (dst), y ; write the result
dey
lda (src), y
eor (dst), y ; merge source and destination bits
@even2=*+1
and #$FD ; [SMC] isolate the bits to replace, zero the rest
and copymasks_even, x ; isolate the bits to replace, zero the rest
eor (dst), y ; unmerge source and destination bits, leaves 'to keep' destination bits intact
sta (dst), y ; write the result
dey