depends on the operating system. MS-Windows and *nix: you can not do that because the os will not permit it unless the address is one which you got from allocating memory using malloc().
in assembly just store the destination address in edi register, source address in esi register, number of bytes to copy in ecx, then rep movsb instruction. There are quite a few posts on this board that demonstrate this, like
this one.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,954 posts
since Aug 2005