Then may I suggest inline assembly using the "mov" assembly statement
Then may I suggest inline assembly using the "mov" assembly statement
Yes true Gordon, if you do a straight mov... Look at example below to explain what I mean using REP MOVSB
Code:procedure CopyMemory(Destination, Source:Pointer; dwSize:LongWord); asm PUSH ECX PUSH ESI PUSH EDI MOV EDI, Destination MOV ESI, Source MOV ECX, dwSize REP MOVSB POP EDI POP ESI POP ECX end;
All we do here is use MOVSB which will mov bytes from address in ESI to address in EDI, this will repeat using the REP statement Untill ECX = 0 allowing us to use any amount of bytes.
Reference
https://faydoc.tripod.com/cpu/movsb.htm
Last edited by Departure; 02-10-2011 at 01:55 AM.
Xlilzoosk8rX (02-10-2011)