-
- /* print the global variables in this module */
- pic14printPublics (asmFile);
-
-
- /* copy the sfr segment */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; special function registers\n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, sfr->oFile);
-
-
- /* Put all variables into a cblock */
- fprintf (asmFile, "\n\n\tcblock 0x0c\n\n");
-
- for(i=0; i<pic14_nRegs; i++) {
- if(regspic14[i].wasUsed && (regspic14[i].offset>=0x0c) )
- fprintf (asmFile, "\t%s\n",regspic14[i].name);
- }
-
-
- /* For now, create a "dpl" and a "dph" in the register space */
- /* of the pic so that we can use the same calling mechanism */
- /* as the 8051 port */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; dpl and dph to emulate the 8051 calling mechanism \n");
- fprintf (asmFile, "%s", iComments2);
-
- fprintf (asmFile, "\tdph\n");
-
-
-
- /* copy the sbit segment */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; special function bits \n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, sfrbit->oFile);
-
- /* copy the data segment */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; internal ram data\n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, data->oFile);
-
-
- /* create the overlay segments */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; overlayable items in internal ram \n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, ovrFile);
-
- /* create the stack segment MOF */
- if (mainf && mainf->fbody) {
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; Stack segment in internal ram \n");
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, ";\t.area\tSSEG\t(DATA)\n"
- ";__start__stack:\n;\t.ds\t1\n\n");
- }
-
- /* create the idata segment */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; indirectly addressable internal ram data\n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, idata->oFile);
-
- /* if external stack then reserve space of it */
- if (mainf && mainf->fbody && options.useXstack ) {
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; external stack \n");
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile,";\t.area XSEG (XDATA)\n"); /* MOF */
- fprintf (asmFile,";\t.ds 256\n");
- }
-
-
- /* copy xtern ram data */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; external ram data\n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, xdata->oFile);
-
-
- fprintf (asmFile, "\tendc\n");
-
-
- /* copy the bit segment */
- fprintf (asmFile, "%s", iComments2);
- fprintf (asmFile, "; bit data\n");
- fprintf (asmFile, "%s", iComments2);
- copyFile (asmFile, bit->oFile);