For 32-bit code, assuming flat model, the above are:
edi = place to copy to
esi = place to copy from
ecx = length of string (in bytes)
REP MOVSB ;REPeat: MOVe a String by Bytes
or better yet:
edi = place to copy to
esi = place to copy from
ecx = length of string (in bytes)
;we'll be needing it later on
push ecx
;we will move the string by DWORDS so divide length
;(in bytes) by 4 to get length in DWORDS
shr ecx,2
rep movsd ; REPeat: MOVe a String by Dwords
;however any extra bytes that don't fit into a DWORD will
;not get copied yet, so copy them too...
pop ecx
and ecx,03h
;if there are no extra bytes to copy, leave.
cmp ecx,0
je exit
rep movsb ;copy extra bytes that don't fit into a dword
"Information has a tendency to be free. Which means someone will always tell you something you don't want to know."