Extended the semantics of the critical keyword to include
[fw/sdcc] / src / ds390 / main.c
index de5d91e8b5fc2cadb6aa65aa69727304599c1b7b..330b8d7e7d2a1ec48da4c7cb3af941ac0f719154 100644 (file)
@@ -339,6 +339,7 @@ PORT ds390_port =
   "DS80C390",                  /* Target name */
   NULL,
   {
+    glue,
     TRUE,                      /* Emit glue around main */
     MODEL_SMALL | MODEL_LARGE | MODEL_FLAT24,
     MODEL_SMALL
@@ -384,6 +385,7 @@ PORT ds390_port =
     NULL,
     1
   },
+  { NULL, NULL },
   {
     +1, 1, 4, 1, 1, 0
   },
@@ -410,6 +412,7 @@ PORT ds390_port =
   NULL,
   _ds390_nativeMulCheck,
   FALSE,
+  TRUE,                                /* little endian */
   0,                           /* leave lt */
   0,                           /* leave gt */
   1,                           /* transform <= to ! > */
@@ -673,6 +676,7 @@ PORT tininative_port =
     NULL,
     1
   },
+  { NULL, NULL },
   {
     +1, 1, 4, 1, 1, 0
   },
@@ -699,6 +703,7 @@ PORT tininative_port =
   NULL,
   NULL,
   FALSE,
+  TRUE,                                /* little endian */
   0,                           /* leave lt */
   0,                           /* leave gt */
   1,                           /* transform <= to ! > */
@@ -806,6 +811,27 @@ _ds400_finaliseOptions (void)
   }  /* MODEL_FLAT24 */
 }
 
+extern char * iComments2;
+
+static void _ds400_generateRomDataArea(FILE *fp, bool isMain)
+{
+    /* Only do this for the file containing main() */
+    if (isMain)
+    {
+       fprintf(fp, "%s", iComments2);
+       fprintf(fp, "; the direct data area used by the DS80c400 ROM code.\n");
+       fprintf(fp, "%s", iComments2);
+       fprintf(fp, ".area ROMSEG (ABS,CON,DATA)\n\n");
+       fprintf(fp, ".ds 24 ; 24 bytes of directs used starting at 0x68\n\n");
+    }
+}
+
+static void _ds400_linkRomDataArea(FILE *fp)
+{
+    fprintf(fp, "-b ROMSEG = 0x0068\n");
+}
+
+
 PORT ds400_port =
 {
   TARGET_ID_DS400,
@@ -813,6 +839,7 @@ PORT ds400_port =
   "DS80C400",                  /* Target name */
   NULL,
   {
+    glue,
     TRUE,                      /* Emit glue around main */
     MODEL_SMALL | MODEL_LARGE | MODEL_FLAT24,
     MODEL_SMALL
@@ -858,6 +885,7 @@ PORT ds400_port =
     NULL,
     1
   },
+  { _ds400_generateRomDataArea, _ds400_linkRomDataArea },
   {
     +1, 1, 4, 1, 1, 0
   },
@@ -884,6 +912,7 @@ PORT ds400_port =
   NULL,
   _ds390_nativeMulCheck,
   FALSE,
+  TRUE,                                /* little endian */
   0,                           /* leave lt */
   0,                           /* leave gt */
   1,                           /* transform <= to ! > */