1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 20:29:34 +00:00

Speed optimization

git-svn-id: svn://svn.cc65.org/cc65/trunk@2362 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-08-18 11:25:31 +00:00
parent f0e0c9007c
commit 833702e25f

View File

@ -42,19 +42,21 @@ L2: lda (ptr1),y ; Copy one character
inc ptr2+1 ; Bump high bytes
bne L1 ; Branch always
; Fill the remaining bytes.
; Fill the remaining bytes.
L3: inx
bne L4
inc tmp2
beq L9
L4: sta (ptr2),y
L5: iny
L3: inx ; Counter low byte
beq L6 ; Branch on overflow
L4: sta (ptr2),y ; Clear one byte
L5: iny ; Bump pointer
bne L3
inc ptr2+1 ; Bump high byte
bne L3 ; Branch always
; Bump the counter high byte
L6: inc tmp2
bne L4
; Done, return dest
L9: lda ptr2 ; Get low byte