* as/link/mcs51/lkarea.c (lnkarea2): handle absolute areas, restructured
[fw/sdcc] / src / hc08 / main.c
index 5e8555c9e5c06153bba8240bf43ac80cdb1cee2c..cd6eb0c021496647b5155a011f06c2407a6af886 100644 (file)
@@ -51,7 +51,7 @@ static char *_hc08_keywords[] =
 };
 
 
-void hc08_assignRegisters (eBBlock ** ebbs, int count);
+void hc08_assignRegisters (ebbIndex *);
 
 static int regParmFlg = 0;     /* determine if we can register a parameter */
 
@@ -68,7 +68,7 @@ _hc08_reset_regparm (void)
 }
 
 static int
-_hc08_regparm (sym_link * l)
+_hc08_regparm (sym_link * l, bool reentrant)
 {
   int size = getSize(l);
     
@@ -139,7 +139,7 @@ _hc08_setDefaultOptions (void)
 {
   options.code_loc = 0x8000;
   options.data_loc = 0x80;
-  options.xdata_loc = 0x100;
+  options.xdata_loc = 0;       /* 0 means immediately following data */
   options.stack_loc = 0x7fff;
   options.out_fmt = 1;         /* use motorola S19 output */
 
@@ -164,11 +164,13 @@ _hc08_genAssemblerPreamble (FILE * of)
   symbol *mainExists=newSymbol("main", 0);
   mainExists->block=0;
 
-  fprintf (of, "\t.area %s\n",port->mem.code_name);
+  fprintf (of, "\t.area %s\n",HOME_NAME);
   fprintf (of, "\t.area GSINIT0 (CODE)\n");
   fprintf (of, "\t.area %s\n",port->mem.static_name);
   fprintf (of, "\t.area %s\n",port->mem.post_static_name);
+  fprintf (of, "\t.area %s\n",CODE_NAME);
   fprintf (of, "\t.area %s\n",port->mem.xinit_name);
+  fprintf (of, "\t.area %s\n",port->mem.const_name);
   fprintf (of, "\t.area %s\n",port->mem.data_name);
   fprintf (of, "\t.area %s\n",port->mem.overlay_name);
   fprintf (of, "\t.area %s\n",port->mem.bit_name);
@@ -417,6 +419,9 @@ PORT hc08_port =
        /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
     1, 2, 2, 4, 2, 2, 2, 1, 4, 4
   },
+  /* tags for generic pointers */
+  { 0x00, 0x40, 0x60, 0x80 },          /* far, near, xstack, code */
+  
   {
     "XSEG",
     "STACK",
@@ -433,6 +438,10 @@ PORT hc08_port =
     "HOME (CODE)",
     "XISEG", // initialized xdata
     "XINIT", // a code copy of xiseg
+    "CONST   (CODE)",     // const_name - const data (code or not)
+    "CABS    (ABS,CODE)", // cabs_name - const absolute data (code or not)
+    "XABS    (ABS)",      // xabs_name - absolute xdata
+    "IABS    (ABS)",      // iabs_name - absolute data
     NULL,
     NULL,
     1