Why move the data separately when you can do a block write using a REP???
And yes mov edi,array works fine as long as the selector is correct. However I make it a point to load the full pointer to be safe.
LDS and LES still have their place.
If you wanted to copy dwords just do this:
The first example is wrong in that you should load EDI instead of ESI if you are using STOS(x). For MOVS(x) you must load both ESI and EDI.
unsigned char *test=(unsigned char *)malloc(500);
//unsigned char *test=new unsigned char;
les edi,dword ptr [test]
Haven't done assembly in some time and I'm a bit rusty at it. In recent times I have no need for it because D3D and MSVC are both fast enough without it.
Salem is right. Follow his advice, I just thought I'd show you how to do it.