* far data space.
*/
- if (result)
- {
- fprintf(stderr,
- "*** Internal error: 10 bit stack var used as result.\n");
- emitcode(";", "look at me!");
- }
-
-
if ( _G.accInUse )
emitcode("push","acc");
if (!inExcludeList("dph"))
emitcode ("push","dph");
if (options.model == MODEL_FLAT24 && !inExcludeList("dpx"))
- emitcode ("push", "dpx");
+ {
+ emitcode ("push", "dpx");
+ /* Make sure we're using standard DPTR */
+ emitcode ("push", "dps");
+ emitcode ("mov", "dps, #0x00");
+ if (options.stack10bit)
+ {
+ /* This ISR could conceivably use DPTR2. Better save it. */
+ emitcode ("push", "dpl1");
+ emitcode ("push", "dph1");
+ emitcode ("push", "dpx1");
+ }
+ }
/* if this isr has no bank i.e. is going to
run with bank 0 , then we need to save more
registers :-) */
}
if (options.model == MODEL_FLAT24 && !inExcludeList("dpx"))
+ {
+ if (options.stack10bit)
+ {
+ emitcode ("pop", "dpx1");
+ emitcode ("pop", "dph1");
+ emitcode ("pop", "dpl1");
+ }
+ emitcode ("pop", "dps");
emitcode ("pop", "dpx");
+ }
if (!inExcludeList("dph"))
emitcode ("pop","dph");
if (!inExcludeList("dpl"))