1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-21 09:17:52 +00:00

Fixed indentation

This commit is contained in:
IrgendwerA8
2017-02-26 22:36:19 +01:00
parent c240d42a9e
commit 3d28f5ca90
4 changed files with 66 additions and 67 deletions
+23 -24
View File
@@ -10,38 +10,37 @@
.importzp ptr1, ptr2, tmp3
_strcat:
sta ptr1 ; Save src
stx ptr1+1
jsr popax ; Get dest
sta tmp3 ; Remember for function return
tay
lda #0
sta ptr2 ; access from page start, y contains low byte
stx ptr2+1
sta ptr1 ; Save src
stx ptr1+1
jsr popax ; Get dest
sta tmp3 ; Remember for function return
tay
lda #0
sta ptr2 ; access from page start, y contains low byte
stx ptr2+1
findEndOfDest:
lda (ptr2),y
beq endOfDestFound
lda (ptr2),y
beq endOfDestFound
iny
bne findEndOfDest
inc ptr2+1
bne findEndOfDest
bne findEndOfDest
inc ptr2+1
bne findEndOfDest
endOfDestFound:
sty ptr2 ; advance pointer to last y position
ldy #0 ; reset new y-offset
sty ptr2 ; advance pointer to last y position
ldy #0 ; reset new y-offset
copyByte:
lda (ptr1),y
sta (ptr2),y
beq done
lda (ptr1),y
sta (ptr2),y
beq done
iny
bne copyByte
inc ptr1+1
inc ptr2+1
bne copyByte ; like bra here
bne copyByte
inc ptr1+1
inc ptr2+1
bne copyByte ; like bra here
; return pointer to dest
done: lda tmp3 ; X does still contain high byte
done: lda tmp3 ; X does still contain high byte
rts