I have realised that strcat is an important function in my program, thus I am wondering if someone could produce one version which is faster (maybe and smaller) version than what I have :)



strcat:
pop eax
pop edx
pop ecx
push eax
_scanfornull:
mov al,[edx]
inc edx
or al,al
jnz _scanfornull
dec edx
_copystring:
mov al,[ecx]
inc ecx
mov [edx],al
inc edx
or al,al
jnz _copystring
retn
Posted on 2003-06-01 06:39:37 by roticv
if its a ASCIIZ string (which has big buff alocated..128 bytes..+-)
and want to strcat to it:

xyz\0 <-- abc\0 => xyzabc\0

than u could REP SCASB the '\0'
and rep movsb/w the rest with CLD on (cx has the strlen of second asciiz string)
Be sure esi/edi are pointing to your strings addr.
good luck
Posted on 2003-06-01 10:31:38 by wizzra
Use Jens Duttke's fast strlen code to formulate a fast version of strcat. To wit one has the following...
Posted on 2003-06-17 21:00:03 by Poimander
Svin has a multi-string cat function, but I cannot find it? :confused:
It was on the board at one time...
Posted on 2003-06-17 21:27:46 by bitRAKE
Greetings All! I've implemented a multi-string version of the function in my previous post.
Posted on 2003-06-17 22:53:48 by Poimander