-
-#if 1
- // use the generic memcpy() for now
- emitcode (";", "initialize %s", OP_SYMBOL(IC_LEFT(ic))->name);
- emitcode ("mov", "dptr,#_memcpy_PARM_2");
- emitcode ("mov", "a,#%s", fromName);
- emitcode ("movx", "@dptr,a");
- emitcode ("inc", "dptr");
- emitcode ("mov", "a,#(%s>>8)", fromName);
- emitcode ("movx", "@dptr,a");
- emitcode ("inc", "dptr");
- emitcode ("mov", "a,#%02x; only from cseg for now", 2);
- emitcode ("movx", "@dptr,a");
- emitcode ("mov", "dptr,#_memcpy_PARM_3");
- emitcode ("mov", "a,#(%d>>0); number of bytes", count);
- emitcode ("movx", "@dptr,a");
- emitcode ("inc", "dptr");
- emitcode ("mov", "a,#(%d>>8)", count);
- emitcode ("movx", "@dptr,a");
- emitcode ("mov", "dptr,#%s", toName);
- emitcode ("mov", "b,#%02x; only to xseg for now", 1);
- emitcode ("lcall", "_memcpy");
-#else
- // more efficient, but will require the native_memcpy_cs2xs
- emitcode ("mov", "r0,#%s", fromName);
- emitcode ("mov", "r1,#(%s>>8)", fromName);
- emitcode ("mov", "r2,#%s", toName);
- emitcode ("mov", "r3,#(%s>>8)", toName);
- emitcode ("mov", "r4,#%d", count);
- emitcode ("mov", "r5,#(%d>>8)", count);
- emitcode ("lcall", "_native_memcpy_cs2xs");
-#endif