]> pd.if.org Git - mmurtl/commitdiff
autocommit for file dated 1995-02-09 16:07:42
authorRichard Burgess <>
Thu, 9 Feb 1995 16:07:42 +0000 (16:07 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 17 Oct 2016 14:03:48 +0000 (14:03 +0000)
msamples/cm32m/cm32.h [new file with mode: 0644]

diff --git a/msamples/cm32m/cm32.h b/msamples/cm32m/cm32.h
new file mode 100644 (file)
index 0000000..059ec87
--- /dev/null
@@ -0,0 +1,105 @@
+/*\r
+ * Global definitions for the C MINUS 32 compiler.\r
+ *\r
+ * Copyright 1990, Dave Dunfield\r
+ * Copyright 1992-1995 R.A. Burgess\r
+*/\r
+\r
+#define FALSE          0\r
+#define TRUE           1\r
+\r
+/*\r
+ * Misc. fixed compiler parameters\r
+ */\r
+#define        LINE_MAX        200             /* maximum size of input line */\r
+#define MACROS         500             /* number of macros allowed */\r
+#define MAC_BUFF       15000   /* string space alloted to macro pool */\r
+#define PARAMETERS     10              /* maximum # parameters to a macro */\r
+#define PARM_BUFF      200             /* parameter names & definitions */\r
+#define INCL_DEPTH     5               /* maximum depth of include files */\r
+\r
+#define GBUFFSIZE   15000      /* n bytes in symbol name pool */\r
+#define LBUFFSIZE   300                /* n bytes in Local symbol name pool */\r
+#define SYMBOL_SIZE    31              /* Max chars in symbol name */\r
+#define EXPR_DEPTH     20              /* maximum depth of expression stack */\r
+#define MAX_SYMBOLS    300             /* maximum # active symbols */\r
+#define MAX_ARGS       20              /* maximum # arguments to a function */\r
+#define MAX_PROTOS     700             /* maximum # params for all functions */\r
+#define LOOP_DEPTH     10              /* maximum # nested loops */\r
+#define MAX_SWITCH     80              /* maximum # active switch-case statements */\r
+#define DIM_SIZE       100             /* maximum # active array dimensions */\r
+#define DEFINE_SIZE    260             /* maximum # defines - was 150 */\r
+#define DEFINE_BUFF 2800       /* size of define string space - was 1500*/\r
+#define LITER_BUFF     10000   /* size of literal string space */\r
+#define MAX_ERRORS     15              /* # error before termination forced */\r
+\r
+/******************************************************************\r
+ Bits found in the "type" entry of symbol table, also\r
+ used on the expression stack to keep track of element types,\r
+ and passed to the code generation routines to identify types.\r
+\r
+ The POINTER definition indicates the level of pointer indirection,\r
+ and should contain all otherwise unused bits, in the least significant\r
+ (rightmost) bits of the word.\r
+\r
+ All structure definitions are marked as STRUCDEF.  The TAG is optionally\r
+ the name in the symbol table.  The tag may be reused to dine other\r
+ structure variables. The members of a STRUCDEF follow the it directly\r
+ in the sysbol table and are marked as STRUCMEM.  When a structure\r
+ variable is actually defined it is simply marked as a STRUCT and\r
+*/\r
+\r
+#define STRUCMEM       0x04000000L             /* structure member (follows strucdef) */\r
+#define STRUCDEF       0x02000000L             /* struct TAG define, members follow */\r
+#define TYPDEF         0x01000000L             /* for type definition & struct tags */\r
+#define ISR                    0x00800000L             /* function is interrupt type */\r
+#define REFERENCE      0x00400000L             /* symbol has been referenced */\r
+#define GLOBAL         0x00200000L             /* symbol is not local - access by name */\r
+#define INITED         0x00100000L             /* symbol is initialized */\r
+#define GLABEL         0x00080000L             /* symbol is a goto label - local only */\r
+#define FUNCTION       0x00040000L             /* symbol is a function */\r
+#define PROTO          0x00020000L             /* symbol is a prototype function */\r
+#define VARARGS                0x00010000L             /* function has var nParams */\r
+#define ARGUMENT       0x00008000L             /* symbol is a function argument */\r
+#define EXTERNAL       0x00004000L             /* external reference */\r
+#define FAR                    0x00002000L             /* far - pointers and functions ONLY */\r
+#define STATIC         0x00001000L             /* symbol is not public or External*/\r
+#define CONSTANT       0x00000800L             /* warning if assigned a value */\r
+#define REGISTER       0x00000400L             /* register symbol */\r
+#define STRUCT         0x00000200L             /* a structure */\r
+#define ARRAY          0x00000100L             /* symbol is an array */\r
+#define UNSIGNED       0x00000080L             /* Use unsigned value */\r
+#define DWORD          0x00000040L             /* 32 bit  */\r
+#define WORD           0x00000020L             /* 16 bit */\r
+#define BYTE           0x00000010L             /* 8  bit */\r
+#define VOID           0x00000008L             /* functions and params only */\r
+#define POINTER                0x00000007L             /* 7 levels of pointer indirection max */\r
+\r
+#define SIZEMASK       0x00000070L             /* mask to test size only */\r
+\r
+/*************************************************\r
+  Tokens identifing value types.\r
+**************************************************/\r
+\r
+#define NUMBER         100     /* numeric constant */\r
+#define STRING         101     /* literal constant */\r
+#define LABEL          102     /* label address */\r
+#define SYMBOL         103     /* symbol value */\r
+#define INEAX          104     /* value in EAX (accumulator) */\r
+#define INECX          105     /* value is in secondary register */\r
+#define INEDX          106     /* pointer in EDX reg (indirect access) */\r
+#define PECX           107     /* pointer in ECX reg (indirect access) */\r
+#define PEDX           108     /* pointer in EDX register (indirect access) */\r
+#define PESI           109     /* pointer in index register (indirect access) */\r
+\r
+/* EBX is used as the top of the processor stack. It's simply\r
+   for rapid access to stacked items. If another item is placed\r
+   on the stack and a token is the "active EBX item" then it\r
+   must be pushed onto the real stack.\r
+*/\r
+\r
+#define STACK_TOP      110 /* Value in EBX for accessibility */\r
+#define ISTACK_TOP     111 /* Index to value in EBX for accessibility */\r
+\r
+#define ON_STACK       112 /* Value actually on Processor stack */\r
+#define ION_STACK      113 /* Index to value actually on Processor stack */\r