mirror of
https://github.com/cc65/cc65.git
synced 2024-12-24 11:31:31 +00:00
Another small optimization
git-svn-id: svn://svn.cc65.org/cc65/trunk@2150 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
62dbbcc4b6
commit
ebb44b8a4f
@ -6,7 +6,7 @@
|
||||
|
||||
.export _strcpy
|
||||
.import popax
|
||||
.importzp ptr1, ptr2, tmp3
|
||||
.importzp ptr1, ptr2
|
||||
|
||||
_strcpy:
|
||||
sta ptr1 ; Save src
|
||||
@ -14,7 +14,6 @@ _strcpy:
|
||||
jsr popax ; Get dest
|
||||
sta ptr2
|
||||
stx ptr2+1
|
||||
sta tmp3 ; remember for function return
|
||||
ldy #$00
|
||||
|
||||
L1: lda (ptr1),y
|
||||
@ -26,6 +25,6 @@ L1: lda (ptr1),y
|
||||
inc ptr2+1
|
||||
bne L1
|
||||
|
||||
L9: lda tmp3 ; X still contains high byte
|
||||
L9: lda ptr2 ; X still contains high byte
|
||||
rts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user