#include "BuildCmd.h"
#include "MySystem.h"
#include "../SDCCutil.h"
-extern const char *preArgv[128]; /* pre-processor arguments */
+#include "../SDCCglobl.h"
static char _defaultRules[] =
{
#include "peeph.rul"
istack->ptrType = FPOINTER;
if (options.parms_in_bank1) {
- addToList (preArgv, "-DSDCC_PARMS_IN_BANK1");
+ addSet(&preArgvSet, Safe_strdup("-DSDCC_PARMS_IN_BANK1"));
}
} /* MODEL_FLAT24 */
}
NULL,
1
},
+ { NULL, NULL },
{
+1, 1, 4, 1, 1, 0
},
1, /* transform >= to ! < */
1, /* transform != to !(a == b) */
0, /* leave == */
+#if 0 // obsolete, and buggy for != xdata
TRUE, /* we support array initializers. */
+#else
+ FALSE, /* No array initializer support. */
+#endif
cseCostEstimation,
__ds390_builtins, /* table of builtin functions */
GPOINTER, /* treat unqualified pointers as "generic" pointers */
NULL,
1
},
+ { NULL, NULL },
{
+1, 1, 4, 1, 1, 0
},
}
// hackhack: we're a superset of the 390.
- addToList (preArgv, "-DSDCC_ds390");
- addToList (preArgv, "-D__ds390");
+ addSet(&preArgvSet, Safe_strdup("-DSDCC_ds390"));
+ addSet(&preArgvSet, Safe_strdup("-D__ds390"));
/* Hack-o-matic: if we are using the flat24 model,
* adjust pointer sizes.
istack->ptrType = FPOINTER;
if (options.parms_in_bank1) {
- addToList (preArgv, "-DSDCC_PARMS_IN_BANK1");
+ addSet(&preArgvSet, Safe_strdup("-DSDCC_PARMS_IN_BANK1"));
}
+
+ // the DS400 rom calling interface uses register bank 3.
+ RegBankUsed[3] = 1;
+
} /* 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,
NULL,
1
},
+ { _ds400_generateRomDataArea, _ds400_linkRomDataArea },
{
+1, 1, 4, 1, 1, 0
},