-
- // memcpy from cseg to xseg
- 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; from cseg", 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");