From: cuz Date: Mon, 5 May 2003 17:05:22 +0000 (+0000) Subject: Small optimization X-Git-Tag: V2.12.0~1566 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62dbbcc4b68f160bfd00b08d69e18b1d3aebb8aa;p=cc65 Small optimization git-svn-id: svn://svn.cc65.org/cc65/trunk@2149 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/common/strcat.s b/libsrc/common/strcat.s index 7297579bb..8640626f3 100644 --- a/libsrc/common/strcat.s +++ b/libsrc/common/strcat.s @@ -6,7 +6,7 @@ .export _strcat .import popax - .importzp ptr1, ptr2, ptr3 + .importzp ptr1, ptr2, tmp3 _strcat: sta ptr1 ; Save src @@ -14,8 +14,7 @@ _strcat: jsr popax ; Get dest sta ptr2 stx ptr2+1 - sta ptr3 ; Remember for function return - stx ptr3+1 + sta tmp3 ; Remember for function return ldy #0 ; find end of dest @@ -50,8 +49,7 @@ sc4: lda (ptr1),y ; done, return pointer to dest -sc5: lda ptr3 - ldx ptr3+1 +sc5: lda tmp3 ; X does still contain high byte rts diff --git a/libsrc/common/strcpy.s b/libsrc/common/strcpy.s index a0194db9c..649424def 100644 --- a/libsrc/common/strcpy.s +++ b/libsrc/common/strcpy.s @@ -6,7 +6,7 @@ .export _strcpy .import popax - .importzp ptr1, ptr2, ptr3 + .importzp ptr1, ptr2, tmp3 _strcpy: sta ptr1 ; Save src @@ -14,8 +14,7 @@ _strcpy: jsr popax ; Get dest sta ptr2 stx ptr2+1 - sta ptr3 ; remember for function return - stx ptr3+1 + sta tmp3 ; remember for function return ldy #$00 L1: lda (ptr1),y @@ -27,7 +26,6 @@ L1: lda (ptr1),y inc ptr2+1 bne L1 -L9: lda ptr3 - ldx ptr3+1 +L9: lda tmp3 ; X still contains high byte rts