How to copy array xbyte memory from one address(xdata) to another(xdata address) and use autoincrement DPTR to make it faster in Cx51? I have selected "use multiply DPTR register" in projects for target...
for(i=0 ; i<30;i++){ XBYTE[baseaddress1+i]=XBYTE[baseaddress2+i]; } This code is to slow. Thanks for help.
I don't use C51 but note that some compilers produces better (or even way better) code when the loop does not perform indexing, i.e you do:
for (i = 0; i < 30; i++) { *dst++ = *src++; }
insteaad of:
for (i = 0; i < 30; i++) { dst[i] = src[i]; }
By the way - there are special tags to use when posting source code. And the tags are clearly described directly above the text input box.
yew can off coarse look @ memcpy
the run thyme library shuld be optimiz'd
Always yo're freind.
Zeusti.