|
|
1.1 root 1: /*
2: * 80386 assembler externs.
3: */
4:
5: /* main */
6: void dodefs(); /* process -D and -E options at each pass */
7:
8: /* getargs */
9: extern int optix; /* reset to 1 to reporcess */
10: extern char *optarg; /* Global argument pointer */
11: extern int getargs(); /* fancy get arguments */
12:
13: /* hash */
14: unsigned short hash();
15:
16: /* symbol handlers */
17: void symInit(); /* init symbol tables */
18: unsigned short symGlob(); /* if -g mark new symbols global */
19: void symDump(); /* dump string table if coff output */
20: sym *symLookUp(); /* look up a symbol and maybe create one */
21: short opLookUp(); /* look up an opcode on the symbol table */
22: void opDelete(); /* remove an entry form the opcode table */
23: macro *macLookUp(); /* look up a macro */
24: void defMac(); /* create a new macro name */
25:
26: /* ind.c */
27: void indBra(); /* indef branch */
28: int indPass(); /* Do we need another pass ? */
29:
30: /* c_out.c */
31: void segment();
32: void section();
33:
34: /* common subs */
35: FILE *xopen(); /* open a file or die in the attempt */
36: char *scpy(); /* make a new copy of a string */
37: char *gcpy(); /* copy into tmp space */
38: void yyerror(); /* display error msg */
39: void fatal(); /* put a msg and die */
40: char *trim(); /* trim trailing spaces and tabs */
41: short countList(); /* count things with next or prev ptrs */
42: char *memset();
43: void freeLevel(); /* pop a logic level */
44: void newLevel(); /* push a logic level */
45: char *parmFind(); /* infd a parm by number */
46: void doShift(); /* shift parms by 1 */
47: char *lookList(); /* get a parm by name */
48: void fileOpen(); /* open a file & creat ctl block */
49: void buildlab(); /* build a label */
50: void labelIgnored(); /* if label given print error message */
51:
52: /* space.c functions */
53: void freeList(); /* free list connected by next ptrs */
54: char *alloc(); /* get space or die */
55: void initStor(); /* init sotorage functions */
56: char *galloc(); /* alloc and remember it */
57: void umark(); /* forget a galloc() */
58: void freel(); /* free all galloc()ed areas not umarked */
59: void umList(); /* umark a list */
60: expr *xalloc(); /* get an expr block */
61: sym *copySym(); /* make a copy of a sym block */
62: data *gitem(); /* get misc data item space */
63:
64: /* common data */
65: extern char bswitch; /* reverse bracket sense */
66: extern char fswitch; /* reverse order of operands */
67: extern char gswitch; /* make symbols of type S_UNDEF global */
68: extern char lswitch; /* print a listing */
69: extern char mlistsw; /* print macro expansion */
70: extern char pswitch; /* print headers */
71: extern char rswitch; /* don't use % on register names */
72: extern char Qswitch; /* shut down all messages */
73: extern char wswitch; /* shut down as warnings */
74: extern char xswitch; /* don't output local symbols in object */
75: extern char nswitch; /* no fixes for chip errata */
76: extern char Xswitch; /* don't output local .L symbols in object */
77: extern char alignon; /* automatically align data objects */
78: extern char alignonX;
79:
80: extern short errCt; /* count of errors */
81: extern short kind; /* the kind of the current opcode */
82: extern short lastToken; /* last token returned to yacc */
83: extern short longMode; /* Which Mode current 386 or 286 */
84: extern unsigned lflags; /* Addressing mode flags */
85: extern char *title; /* title header */
86: extern char *dTime; /* time of compile */
87: extern char *lastL; /* last line read for printing */
88: extern short lineSize; /* listing line length */
89: extern short linect; /* line counter */
90: extern short nlpp; /* lines per page */
91: extern short pass; /* current pass number */
92: extern int statement; /* statement number */
93: extern inpctl *inpc; /* file stack */
94: extern macro *inMacDef; /* in macro definition */
95: extern macro *macFound; /* the macro found by lex.c */
96: extern macctl *macExp; /* in macro expansion */
97: extern macctl *logic; /* logical level of control */
98: extern macctl *trueMac; /* get the real macro being expanded */
99: extern macline *lastDef;/* last macro line defined */
100: extern short macNo; /* macro expansion number */
101: extern short defCt; /* number of defines */
102: extern char *outName; /* name of output file */
103: extern char lswitchX; /* storage for lswitch from -l */
104: extern char fswitchX; /* storage for fswitch from -f */
105: extern char bswitchX; /* storage for bswitch from -b */
106: extern char wswitchX; /* storage for wswitch from -w */
107: extern char nswitchX; /* storage for nswitch from -n */
108: extern short pcnt, bcnt; /* count op parens and brackets + left - right */
109: extern short choices; /* number of ways to do this op */
110: extern char xpass; /* set if a branch changes size */
111: extern long showSym;
112: extern FILE *errdev; /* Where to put out errors */
113:
114: /* from libs */
115: char *strcpy();
116: char *strstr();
117: char *strchr();
118: char *strrchr();
119: char *memcpy();
120: char *ctime();
121: char *realloc();
122: long atol();
123: long time();
124: double strtod();
125: void free();
126: void exit();
127:
128: /* tables from symtab.c */
129: extern symt typTab[];
130: extern char charLump[];
131: extern opc prefTab[];
132: extern nhash hashCodes[];
133: extern psym symtab[];
134:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.