xa51, work in progress
[fw/sdcc] / src / xa51 / main.c
index f7bb02d4f891130f04fe19f1d3b318ab0f98c694..f9476de06b5219ad219d15438d817d71363a9269 100755 (executable)
@@ -46,8 +46,8 @@ static char *_xa51_keywords[] =
 
 extern int rewinds;
 void   _xa51_genAssemblerEnd () {
-  fprintf (stderr, "Did %d rewind%c for c-line in asm comments\n", rewinds,
-          rewinds==1 ? '\0' : 's');
+  //fprintf (stderr, "Did %d rewind%c for c-line in asm comments\n", rewinds,
+  //rewinds==1 ? '\0' : 's');
 }
 
 void xa51_assignRegisters (eBBlock ** ebbs, int count);
@@ -114,20 +114,17 @@ _xa51_getRegName (struct regs *reg)
 static void
 _xa51_genAssemblerPreamble (FILE * of)
 {
-  // this needs to be an include file someday
-  fputs ("pswl\tsfr\t0x400\n", of);
-  fputs ("z\tbit\tpswl.0\n", of);
-  fputs ("n\tbit\tpswl.1\n", of);
-  fputs ("v\tbit\tpswl.2\n", of);
-  fputs ("ac\tbit\tpswl.6\n", of);
-  fputs ("cy\tbit\tpswl.7\n", of);
+  fprintf (of, "_errno\tsfr\t0x00; to keep the fp-lib's happy for now\n");
 }
 
 /* Generate interrupt vector table. */
 static int
 _xa51_genIVT (FILE * of, symbol ** interrupts, int maxInterrupts)
 {
-  return FALSE;
+  fprintf (of, "\t.dw\t0x8f00\n");
+  fprintf (of, "\t.dw\t__sdcc_gsinit_startup\n");
+  // no IVT yet
+  return TRUE;
 }
 
 /* Generate code to copy XINIT to XISEG */