Borland Makefile cleanup
[fw/sdcc] / src / ds390 / main.c
index 4e112d6b345bbe7573e8fe86f0670cf2dcbc3afa..5698771c6981013b25ac533c37f0eaa9d60819aa 100644 (file)
@@ -155,7 +155,7 @@ _ds390_finaliseOptions (void)
     fprintf (stderr,
             "*** error: ds390 port only supports the 10 bit stack mode.\n");
     } else {
-       if (!options.stack_loc) options.stack_loc = 0x400007;
+       if (!options.stack_loc) options.stack_loc = 0x400008;
     }
     
     /* generate native code 16*16 mul/div */
@@ -230,7 +230,7 @@ _ds390_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
       return FALSE;
     }
 
-  fprintf (of, "\tajmp\t__sdcc_gsinit_startup\n");
+  fprintf (of, "\tajmp\t__reset_vect\n");
 
   /* now for the other interrupts */
   for (i = 0; i < maxInterrupts; i++)
@@ -245,6 +245,8 @@ _ds390_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
        }
     }
 
+  fprintf (of, "__reset_vect:\n\tljmp\t__sdcc_gsinit_startup\n");
+
   return TRUE;
 }
 
@@ -324,6 +326,7 @@ PORT ds390_port =
   TARGET_ID_DS390,
   "ds390",
   "DS80C390",                  /* Target name */
+  NULL,
   {
     TRUE,                      /* Emit glue around main */
     MODEL_SMALL | MODEL_LARGE | MODEL_FLAT24,
@@ -380,6 +383,7 @@ PORT ds390_port =
   "_",
   _ds390_init,
   _ds390_parseOptions,
+  NULL,
   _ds390_finaliseOptions,
   _ds390_setDefaultOptions,
   ds390_assignRegisters,
@@ -454,7 +458,7 @@ static void _tininative_finaliseOptions (void)
        fprintf(stderr,"TININative supports only stack10bit \n");
     }
     
-    if (!options.stack_loc) options.stack_loc = 0x400007;
+    if (!options.stack_loc) options.stack_loc = 0x400008;
     
     /* generate native code 16*16 mul/div */
     if (options.useAccelerator) 
@@ -514,11 +518,11 @@ static void _tininative_do_assemble (const char * const *asmOptions)
     };
     char buffer[100];
 
-    buildCmdLine(buffer,macroCmd,srcFileName,NULL,NULL,NULL);
+    buildCmdLine(buffer,macroCmd,dstFileName,NULL,NULL,NULL);
     if (my_system(buffer)) {
        exit(1);
     }
-    buildCmdLine(buffer,a390Cmd,srcFileName,NULL,NULL,asmOptions);
+    buildCmdLine(buffer,a390Cmd,dstFileName,NULL,NULL,asmOptions);
     if (my_system(buffer)) {
        exit(1);
     }    
@@ -607,6 +611,7 @@ PORT tininative_port =
   TARGET_ID_DS390,
   "TININative",
   "DS80C390",                  /* Target name */
+       NULL,                   /* processor */
   {
     FALSE,                     /* Emit glue around main */
     MODEL_FLAT24,
@@ -663,6 +668,7 @@ PORT tininative_port =
   "",
   _tininative_init,
   _ds390_parseOptions,
+  NULL,
   _tininative_finaliseOptions,
   _tininative_setDefaultOptions,
   ds390_assignRegisters,