
*
* Pass two for C compiler
*

 lib sysdef
 lib il.def

* internal definitions

MAXEXP equ 100+32 max exp entries

* expression table entry structure

rslt equ 0 result location
oprtr equ 2 operator type
rtype equ 3 result type
op1 equ 5 op1
op2 equ 17 op2

EXPSIZ equ 29 size of expression entry

* result locations

BREG equ 1 b register
DREG equ 2 d register
XREG equ 3 x register
UREG equ 4 u register
LNREG equ 5 long register
FPREG equ 6 fp register
TOS equ 7 top of stack
BOS equ 8 base of stack

* type equates

CHR equ 1 character
INT equ 2 integer
SHORT equ 3 short
UNSND equ 4 unsigned
LONG equ 5 long integer
FLOAT equ 6 floating point
DUBLE equ 7 double precision
STRUCT equ 12 structure or union
CONST equ 14 constant

PTR equ 1 pointer to ...
FNCT equ 2 function returning ...
ARAY equ 3 array of ...

* Class equates

AUTO equ 1 automatic
STAT equ 2 static
REG equ 3 register
EXTN equ 4 external
TYPDF equ 5 type define
STRTAG equ 6 structure tag
UNNTAG equ 7 union tag
MOS equ 8 member of structurw
MOU equ 9 member of union

* branch table structure

brval equ 0 branch type value
brnum equ 1 label number
brcon equ 3 condition flag

MAXBRS equ 32

* Address Register Definition

ar_ref equ 0 Reference code - see below
ar_off equ 1 offset value
ar_ofr equ 3 offset in register - see below
ar_inc equ 4 auto inc amount
ar_pst equ 6 0=predec, 1=postdec (or inc)
ar_adr equ 7 0=value, 1=address
ar_ind equ 8 indirection count
ar_con equ 9 contents of this ar
ar_nam equ 11 name (8 bytes)

ADRSIZ equ 19 size of entry

NUMADR equ 32 number of ars

* reference codes

NOREF equ 0 no reference
YREF equ 1 y register
XREF equ 2 x register
UREF equ 3 u register
TREF equ 4 base of stack reference
NREF equ 5 name
LREF equ 6 label
SREF equ 7 stack reference
CREF equ 8 constant

* offset register

OFFB equ 1 offset from b reg
OFFD equ 2 offset from d reg

* additional operators - not in il

BRX equ 128 branch op
BLX equ 129 branch and label op
LBL equ 130 label

