/* * File: global.h * * Global variable definitions for IMP80 compiler * * Bob Eager August 2002 * */ #ifndef EXTERN #define EXTERN extern #endif EXTERN PUCHAR a; /* Points 25% into workfile */ EXTERN INT arsize; /* Size of array a[] in workfile */ EXTERN INT asl; /* Number of elements in main list */ EXTERN INT aslcurbtm; /* Bottom marker for aslist */ EXTERN LISTF *aslist; /* Main list */ EXTERN INT aslwarn; EXTERN PUCHAR cc; /* Input reconstruction buffer */ EXTERN INT ccsize; /* Size of buffer 'cc' */ EXTERN CHAR compiler; /* YES if %TRUSTEDPROGRAM */ EXTERN INT const_limit; /* Limit of constant list */ EXTERN INT const_ptr; /* Free pointer in constant list */ EXTERN INT cprmode; /* 1 for main program */ EXTERN UINT ctype; /* Returned constant type */ EXTERN CHAR dcomp; /* YES to list compiled code */ EXTERN PUCHAR dictbase; /* Base of dictionary (lett[] or a[]) */ EXTERN PINT display; EXTERN INT dsize; /* Size of dictionary */ EXTERN PINT dvheads; EXTERN INT expepdisp; EXTERN INT faulty; /* Number of faults in program */ EXTERN CHAR freeformat; /* NO for truncation at column 72, else YES */ EXTERN INT hit; /* General secondary result */ EXTERN INT idepth; /* Depth of %INCLUDE nesting */ EXTERN INT ihead; /* Head of %INCLUDE file list */ EXTERN INT imax; /* Maximum value for integer */ EXTERN FILE *infp; /* File pointer for current source file */ EXTERN INT inhcode; /* YES to inhibit generation of code */ EXTERN INT lastat; EXTERN INT lastend; EXTERN INT lastname; /* Index in 'word' of last name handled by 'pname' */ EXTERN INT length; /* Length of item in line buffer 'cc' */ EXTERN UINT level; /* Textual level */ EXTERN PUCHAR lett; /* Pass 1 dictionary */ EXTERN INT line; /* Current line being compiled */ EXTERN CHAR list; /* YES if listing, else NO */ EXTERN FILE *listfp; /* File pointer for listing file */ EXTERN INT logepdisp; EXTERN PCHAR mainep; /* Name of main entry point */ EXTERN INT next; /* Next free element in 'lett' */ EXTERN UINT nextp; /* Index in 'a' for code generation */ EXTERN INT nnames; /* Number of names dictionary can hold */ EXTERN INT oldline; EXTERN INT p1size; /* Value of 'r' after pass 1 */ EXTERN CHAR parmarr; /* YES to check array bounds */ EXTERN CHAR parmchk; /* YES to compile unassigned checking */ EXTERN CHAR parmdbug; /* YES to compile debugging support */ EXTERN CHAR parmdiag; /* YES to compile diagnostic support */ EXTERN CHAR parmlet; /* YES to compile even with errors */ EXTERN CHAR parmline; /* YES to put line numbers in code */ EXTERN CHAR parmmax; /* Use maximum table sizes */ EXTERN CHAR parmopt; /* YES to optimise code */ EXTERN CHAR parmprof; /* YES to compile profiling code */ EXTERN CHAR parmtrace; /* YES to compile tracing code */ EXTERN CHAR parmx; /* YES to */ EXTERN CHAR parmy; /* YES to flag unused constants */ EXTERN PCHAR progname; /* Program (compiler) name */ EXTERN INT q; /* Index in line buffer 'cc' */ EXTERN INT qmax; EXTERN INT r; EXTERN PINT sfs; /* Array of %START/%FINISH (etc) listheads */ #if DEBUG EXTERN CHAR smap; /* YES to dump workfile after each statement */ #endif EXTERN CHAR stack; /* YES to not use aux stack */ EXTERN INT starstart; EXTERN INT strlink; EXTERN INT stmts; /* Count of statements compiled */ EXTERN PUINT tags; /* Tags for items in 'word' */ EXTERN PUCHAR tline; /* Primary input line buffer */ EXTERN PUCHAR wkfilead; /* Address of workfile */ EXTERN INT wkfilek; /* Workfile size in kilobytes */ EXTERN PINT word; /* Dictionary hash table */ /* Miscellaneous tables (declared in table.c) */ extern const UCHAR bytes[]; extern UCHAR itoetab[];/* ISO to EBCDIC table */ extern UCHAR itoi[]; /* Table to convert illegal characters */ extern UCHAR onecase[];/* Upper case translation table */ extern UCHAR trtab[];/* Character validation table */ /* Register and opcode tables (declared in asm.h) */ extern UINT opcsize; /* Number of opcodes */ extern const PUCHAR opc[]; extern const UINT opcinfo1[]; extern const UINT opcinfo2[]; extern const PUCHAR regs[]; /* * End of file: global.h * */