added DUMMY_READ_VOLATILE:
[fw/sdcc] / src / xa51 / main.c
index 8875d3e7b964b4c88d0985e0afca507e54c1dda1..707bad099c831ccd8a42ada8e5e0e32a3b09a47d 100755 (executable)
@@ -43,7 +43,8 @@ static char *_xa51_keywords[] =
 };
 
 extern int rewinds;
-void   _xa51_genAssemblerEnd () {
+void   _xa51_genAssemblerEnd (FILE * of)
+{
   //fprintf (stderr, "Did %d rewind%c for c-line in asm comments\n", rewinds,
   //rewinds==1 ? '\0' : 's');
 }
@@ -89,6 +90,7 @@ _xa51_parseOptions (int *pargc, char **argv, int *i)
 static void
 _xa51_finaliseOptions (void)
 {
+  fprintf (stderr, "*** WARNING *** The XA51 port isn't yet complete\n");
   port->mem.default_local_map = istack;
   port->mem.default_globl_map = xdata;
   if (options.model!=MODEL_PAGE0) {
@@ -149,7 +151,7 @@ _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");
@@ -194,13 +196,13 @@ static bool cseCostEstimation (iCode *ic, iCode *pdic)
 */
 static const char *_linkCmd[] =
 {
-  "xa_link", "", "$1", NULL
+  "xa_link", "", "\"$1\"", NULL
 };
 
 /* $3 is replaced by assembler.debug_opts resp. port->assembler.plain_opts */
 static const char *_asmCmd[] =
 {
-  "xa_rasm", "$l", "$3", "$1.asm", NULL
+  "xa_rasm", "$l", "$3", "\"$1.asm\"", NULL
 };
 
 /* Globals */
@@ -209,7 +211,9 @@ PORT xa51_port =
   TARGET_ID_XA51,
   "xa51",
   "MCU 80C51XA",                       /* Target name */
+  NULL,                                /* Processor name */
   {
+    glue,
     FALSE,                     /* Emit glue around main */
     MODEL_PAGE0,
     MODEL_PAGE0
@@ -255,6 +259,7 @@ PORT xa51_port =
     NULL, // default global map
     1
   },
+  { NULL, NULL },
   {
     -1, // stack grows down
     0, // bank overhead NUY
@@ -270,6 +275,7 @@ PORT xa51_port =
   "_",
   _xa51_init,
   _xa51_parseOptions,
+  NULL,
   _xa51_finaliseOptions,
   _xa51_setDefaultOptions,
   xa51_assignRegisters,