Optimize stpcpy's size and speed

This commit is contained in:
Colin Leroy-Mira
2024-09-04 22:52:52 +02:00
parent 5e5dd1d6c4
commit 55d3a6ea39
4 changed files with 38 additions and 11 deletions

View File

@@ -25,6 +25,9 @@ L1: lda (ptr1),y
inc ptr2+1
bne L1
L9: lda ptr2 ; X still contains high byte
rts
L9: lda ptr2 ; X still contains dest's original high byte
; On exit, we want AX to be dest (as this is what strcpy returns).
; We also want (ptr2),y to still point to dest's terminator, as this
; is used by stpcpy().
rts