Some style adjustments.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
_strlower:
|
||||
_strlwr:
|
||||
sta ptr1 ; Save s (working copy)
|
||||
sta ptr1 ; save s (working copy)
|
||||
stx ptr1+1
|
||||
sta ptr2
|
||||
stx ptr2+1 ; save function result
|
||||
@@ -25,10 +25,10 @@ _strlwr:
|
||||
loop: lda (ptr1),y ; get character
|
||||
beq L9 ; jump if done
|
||||
; get character classification
|
||||
jsr ctype_preprocessor_no_check
|
||||
jsr ctype_preprocessor_no_check
|
||||
and #CT_UPPER ; upper case char?
|
||||
beq L1 ; jump if no
|
||||
lda (ptr1),y ; fetch character again
|
||||
lda (ptr1),y ; fetch character again
|
||||
adc #<('a'-'A') ; make lower case char (ctype_preprocessor_no_check ensures carry clear)
|
||||
sta (ptr1),y ; store back
|
||||
L1: iny ; next char
|
||||
@@ -41,6 +41,3 @@ L1: iny ; next char
|
||||
L9: lda ptr2
|
||||
ldx ptr2+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user