Just some white space fixes of recently contributed code.

This commit is contained in:
Oliver Schmidt
2017-04-06 17:53:57 +02:00
parent be772c0198
commit e43dbe1c24
5 changed files with 8 additions and 12 deletions

View File

@@ -21,7 +21,7 @@ _strcat:
.else .else
lda #0 lda #0
sta ptr2 ; access from page start, y contains low byte sta ptr2 ; access from page start, y contains low byte
.endif .endif
stx ptr2+1 stx ptr2+1
findEndOfDest: findEndOfDest:
@@ -33,7 +33,7 @@ findEndOfDest:
bne findEndOfDest bne findEndOfDest
endOfDestFound: endOfDestFound:
sty ptr2 ; advance pointer to last y position sty ptr2 ; advance pointer to last y position
ldy #0 ; reset new y-offset ldy #0 ; reset new y-offset
copyByte: copyByte:

View File

@@ -20,7 +20,7 @@ _strchr:
.else .else
lda #0 lda #0
sta ptr1 ; access from page start, y contains low byte sta ptr1 ; access from page start, y contains low byte
.endif .endif
Loop: lda (ptr1),y ; Get next char Loop: lda (ptr1),y ; Get next char
beq EOS ; Jump on end of string beq EOS ; Jump on end of string
@@ -29,7 +29,7 @@ Loop: lda (ptr1),y ; Get next char
iny iny
bne Loop bne Loop
inc ptr1+1 inc ptr1+1
bne Loop ; Branch always bne Loop ; Branch always
; End of string. Check if we're searching for the terminating zero ; End of string. Check if we're searching for the terminating zero

View File

@@ -40,7 +40,7 @@ checkNext:
check: cpy tmp1 ; compare with length of test character string check: cpy tmp1 ; compare with length of test character string
beq endOfTestChars beq endOfTestChars
cmp (ptr1),y ; found matching char? cmp (ptr1),y ; found matching char?
bne checkNext bne checkNext
leave: txa ; restore position of finding leave: txa ; restore position of finding
ldx tmp2 ; and return ldx tmp2 ; and return
@@ -50,5 +50,4 @@ endOfTestChars:
inx inx
bne loadChar bne loadChar
inc tmp2 inc tmp2
bne loadChar ; like bra... bne loadChar ; like bra...

View File

@@ -71,5 +71,3 @@ L6: lda #0
L7: lda ptr3 L7: lda ptr3
ldx ptr3+1 ldx ptr3+1
rts rts

View File

@@ -40,15 +40,14 @@ checkNext:
check: cpy tmp1 ; compare with length of test character string check: cpy tmp1 ; compare with length of test character string
beq leave beq leave
cmp (ptr1),y ; found matching char? cmp (ptr1),y ; found matching char?
bne checkNext bne checkNext
foundTestChar: foundTestChar:
inx inx
bne loadChar bne loadChar
inc tmp2 inc tmp2
bne loadChar ; like bra... bne loadChar ; like bra...
leave: txa ; restore position of finding leave: txa ; restore position of finding
ldx tmp2 ; and return ldx tmp2 ; and return
rts rts