Create REG_BANK_[0-3] areas only for 8051 like ports.
[fw/sdcc] / src / xa51 / main.c
index f6ae8c8d8a4228d08778c4e6f1aedfac041203cd..2972cb4c9475a70f97179e60b1f4983504ab419a 100755 (executable)
@@ -149,10 +149,12 @@ _xa51_genAssemblerPreamble (FILE * of)
     fprintf (of, "\t.dw\t__sdcc_gsinit_startup\n");
     fprintf (of, "\n");
     fprintf (of, "__sdcc_gsinit_startup:\n");
-    fprintf (of, "\tmov.b\t_SCR,#0x01\t; page zero mode\n");
+    fprintf (of, ";\tmov.b\t_SCR,#0x01\t; page zero mode\n");
+    fprintf (of, "\t.db 0x96,0x48,0x40,0x01\n");
     fprintf (of, "\tmov\tr7,#0x%04x\n", options.stack_loc);
     fprintf (of, "\tcall\t_external_startup\n");
     _xa51_genXINIT(of);
+    fprintf (of, "\t.area CSEG\t(CODE)\n");
     fprintf (of, "\tcall\t_main\n");
     fprintf (of, "\treset\t;main should not return\n");
   }
@@ -207,6 +209,7 @@ PORT xa51_port =
   TARGET_ID_XA51,
   "xa51",
   "MCU 80C51XA",                       /* Target name */
+  NULL,                                /* Processor name */
   {
     FALSE,                     /* Emit glue around main */
     MODEL_PAGE0,
@@ -268,6 +271,7 @@ PORT xa51_port =
   "_",
   _xa51_init,
   _xa51_parseOptions,
+  NULL,
   _xa51_finaliseOptions,
   _xa51_setDefaultOptions,
   xa51_assignRegisters,