-
- /* Everywhere we generate a reference to the static_name area,
- * (which is currently only here), we immediately follow it with a
- * definition of the post_static_name area. This guarantees that
- * the post_static_name area will immediately follow the static_name
- * area.
- */
- fprintf (asmFile, ";\t.area %s\n", port->mem.static_name); /* MOF */
- fprintf (asmFile, ";\t.area %s\n", port->mem.post_static_name);
- fprintf (asmFile, ";\t.area %s\n", port->mem.static_name);
-
- if (mainf && mainf->fbody) {
- fprintf (asmFile,"__sdcc_gsinit_startup:\n");
- /* if external stack is specified then the
- higher order byte of the xdatalocation is
- going into P2 and the lower order going into
- spx */
- if (options.useXstack) {
- fprintf(asmFile,";\tmov\tP2,#0x%02x\n",
- (((unsigned int)options.xdata_loc) >> 8) & 0xff);
- fprintf(asmFile,";\tmov\t_spx,#0x%02x\n",
- (unsigned int)options.xdata_loc & 0xff);
- }
-
- /* initialise the stack pointer */
- /* if the user specified a value then use it */
- if (options.stack_loc)
- fprintf(asmFile,";\tmov\tsp,#%d\n",options.stack_loc);
- else
- /* no: we have to compute it */
- if (!options.stackOnData && maxRegBank <= 3)
- fprintf(asmFile,";\tmov\tsp,#%d\n",((maxRegBank + 1) * 8) -1);
- else
- fprintf(asmFile,";\tmov\tsp,#__start__stack\n"); /* MOF */
+ copyFile (asmFile, vFile);
+ }
+
+ /* copy global & static initialisations */
+ fprintf (asmFile, "%s", iComments2);
+ fprintf (asmFile, "; global & static initialisations\n");
+ fprintf (asmFile, "%s", iComments2);
+
+ /* Everywhere we generate a reference to the static_name area,
+ * (which is currently only here), we immediately follow it with a
+ * definition of the post_static_name area. This guarantees that
+ * the post_static_name area will immediately follow the static_name
+ * area.
+ */
+ fprintf (asmFile, ";\t.area %s\n", port->mem.static_name); /* MOF */
+ fprintf (asmFile, ";\t.area %s\n", port->mem.post_static_name);
+ fprintf (asmFile, ";\t.area %s\n", port->mem.static_name);
+
+ if (mainf && mainf->fbody) {
+ fprintf (asmFile,"__sdcc_gsinit_startup:\n");
+ /* if external stack is specified then the
+ higher order byte of the xdatalocation is
+ going into P2 and the lower order going into
+ spx */
+ if (options.useXstack) {
+ fprintf(asmFile,";\tmov\tP2,#0x%02x\n",
+ (((unsigned int)options.xdata_loc) >> 8) & 0xff);
+ fprintf(asmFile,";\tmov\t_spx,#0x%02x\n",
+ (unsigned int)options.xdata_loc & 0xff);
+ }