CopyMemory() only in ASM without API possible ?
Posted: Sat Sep 09, 2006 11:14 am
Hello,
Just out of curiosity, I've looked at the /COMMENTED ASM output, and noticed the following :
MOV eax, Fromaddr
MOV Toaddr, eax
I'm sure it's not that simple, it would have already been implemented if it was
Just wondering if it's possible to do it only in ASM, and if yes (and how) is there any speed gain ?
I found on the forum a post about an optimised CopyMemory for AMD processors, but it was rather complex.
Nothing urgent, but if you know the answer... thanks you in advance
Just out of curiosity, I've looked at the /COMMENTED ASM output, and noticed the following :
Isn't it possible to copy directly the memory in pure ASM ?; CopyMemory(*Fromaddr, *Toaddr, 5)
PUSH dword 5
PUSH dword [esp+PS28+4]
PUSH dword [esp+PS28+12]
CALL _PB_CopyMemory@12
MOV eax, Fromaddr
MOV Toaddr, eax
I'm sure it's not that simple, it would have already been implemented if it was

I found on the forum a post about an optimised CopyMemory for AMD processors, but it was rather complex.
Nothing urgent, but if you know the answer... thanks you in advance
