229 lines
9.5 KiB
OpenEdge ABL
229 lines
9.5 KiB
OpenEdge ABL
00100 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *)
|
|
00110 (**)
|
|
00140 (*-87() (*EXTERNALS TO CODE EMITTER*)
|
|
00144 (**)
|
|
00150 PROCEDURE FIXUPF(ALABL: LABL); EXTERN;
|
|
00152 FUNCTION FIXUPM:LABL; EXTERN;
|
|
00160 PROCEDURE EMITX1 (OPCOD:POP;TYP1:OPDTYP;OPND1:ADDRINT); EXTERN;
|
|
00170 PROCEDURE EMITX2 (OPCOD:POP;TYP1:OPDTYP;OPND1:ADDRINT;TYP2:OPDTYP;OPND2:ADDRINT); EXTERN;
|
|
00180 PROCEDURE EMITX3(OPCOD:POP;TYP1:OPDTYP;OPND1:ADDRINT;TYP2:OPDTYP;OPND2:ADDRINT;TYP3:OPDTYP;OPND3:ADDRINT); EXTERN;
|
|
00190 PROCEDURE EMITX4(OPCOD:POP;TYP1:OPDTYP;OPND1:ADDRINT;TYP2:OPDTYP;OPND2:ADDRINT;
|
|
00200 TYP3:OPDTYP;OPND3:ADDRINT;TYP4:OPDTYP;OPND4:ADDRINT); EXTERN;
|
|
00210 (*+86() (*FOR CODE GENERATOR ONLY*)
|
|
00212 PROCEDURE SETTEXTSTATE; EXTERN;
|
|
00220 PROCEDURE EMITX5(OPCOD:POP;TYP1:OPDTYP;OPND1:ADDRINT;TYP2:OPDTYP;OPND2:ADDRINT;TYP3:OPDTYP;OPND3:ADDRINT;
|
|
00230 TYP4:OPDTYP;OPND4:ADDRINT;TYP5:OPDTYP;OPND5:ADDRINT); EXTERN;
|
|
00240 PROCEDURE EMITX0(OPCOD: POP); EXTERN;
|
|
00250 (*+02()
|
|
00260 PROCEDURE WRITEBYTE(BYT: BYTE); EXTERN;
|
|
00270 ()+02*)
|
|
00280 PROCEDURE EMITXWORD(TYP: OPDTYP; OPERAND: ADDRINT); EXTERN;
|
|
00281 (*+02() PROCEDURE EMITXPROC(TYP :OPDTYP; OPERAND :ADDRINT); EXTERN;
|
|
00282 PROCEDURE EMITRNTAIL(LEN :INTEGER); EXTERN;
|
|
00283 FUNCTION LENOF(SB :PSB) :INTEGER; EXTERN; ()+02*)
|
|
00284 (*+05() PROCEDURE EMITXPROC(TYP: OPDTYP; OPERAND: ADDRINT); EXTERN; ()+05*)
|
|
00290 PROCEDURE EMITALF(OPERAND: BIGALFA); EXTERN;
|
|
00300 FUNCTION GETNEXTLABEL: LABL; EXTERN;
|
|
00320 PROCEDURE FIXUPFIM(ALABL: LABL; VALUE: INTEGER); EXTERN;
|
|
00330 PROCEDURE FIXLABL(OLDLABL,NEWLABL: LABL; KNOWN: BOOLEAN); EXTERN;
|
|
00340 FUNCTION NORMAL(SB: PSB): SBTTYP; EXTERN;
|
|
00360 PROCEDURE LOAD(WHERE:SBTTYP; SB: PSB); EXTERN;
|
|
00364 PROCEDURE UNSTKP1(TYP: OPDTYP; OPND: PSB); EXTERN;
|
|
00370 PROCEDURE EMITBEG; EXTERN;
|
|
00372 FUNCTION EMITRTNHEAD: LABL; EXTERN;
|
|
00380 PROCEDURE EMITEND; EXTERN;
|
|
00400 FUNCTION GETCASE(M: MODE; OLST: OLSTTYP; SB: PSB): STATE; EXTERN;
|
|
00410 FUNCTION GENLCLGBL(VAR OPCOD: POP; SB: PSB): INTEGER; EXTERN;
|
|
00411 ()+86*)
|
|
00412 (*+05()
|
|
00413 PROCEDURE HOIST(HOISTLEN, LEN: INTEGER; ALIGN: BOOLEAN); EXTERN;
|
|
00414 ()+05*)
|
|
00420 PROCEDURE CLEAR(SB: PSB); EXTERN;
|
|
00430 PROCEDURE FILL(WHERE: SBTTYP; SB: PSB); EXTERN;
|
|
00440 PROCEDURE TWIST; EXTERN;
|
|
00450 PROCEDURE LOADSTK(SB: PSB); EXTERN;
|
|
00460 PROCEDURE GENOP(VAR OPCOD: POP; M: MODE; VAR OLIST: OLSTTYP; SB: PSB); EXTERN;
|
|
00470 PROCEDURE GENDP(M: MODE); EXTERN;
|
|
00472 (*+32() PROCEDURE ASERT(ASERTION: BOOLEAN; REASON:ALFA); EXTERN; ()+32*)
|
|
00480 ()-87*)
|
|
00490 (**)
|
|
00520 (*+04()
|
|
00530 MODULE A68S1;
|
|
00540 EXPORTS
|
|
00550 PROCEDURE S1;
|
|
00560 PRIVATE
|
|
00570 IMPORTS A68SCOM FROM A68DEC;
|
|
00580 ()+04*)
|
|
12000 (* EXTERNALS TO THE LEXICAL ANALYSER *)
|
|
12002 PROCEDURE FIND(VAR SEARCHLIST: MODE; RECURSIVE: BOOLEAN; LENGTH: CNTR); EXTERN;
|
|
12010 PROCEDURE FINDPRC(RESMD: MODE; CNT: CNTR; CP:CODEPROC); EXTERN;
|
|
12020 PROCEDURE FINSTRUCT(CNT: CNTR); EXTERN;
|
|
12030 FUNCTION FINDREF(M: MODE): MODE; EXTERN;
|
|
12040 FUNCTION FINDROW(M: MODE; CNT:CNTR): MODE; EXTERN;
|
|
12050 PROCEDURE NEWFIELD(LEX: PLEX); EXTERN;
|
|
12060 PROCEDURE RECURFIX(VAR BASEM: MODE); EXTERN;
|
|
12090 (*+05() PROCEDURE OPENLOADFILE(VAR F: LOADFILE; PARAM: INTEGER; WRITING: BOOLEAN); EXTERN;
|
|
12100 PROCEDURE OPENTEXT(VAR F: TEXT; PARAM: INTEGER; WRITING: BOOLEAN); EXTERN;
|
|
12110 ()+05*)
|
|
12120 PROCEDURE CHECKPAGE; EXTERN;
|
|
12130 PROCEDURE OUTLST(LINE: INTEGER; VAR BUF: BUFFER; PTR: INTEGER); EXTERN;
|
|
12140 PROCEDURE OUTERR(N: INTEGER; LEV: ERRLEV; LEX: PLEX); EXTERN;
|
|
12150 PROCEDURE SEMERR(N: INTEGER); EXTERN;
|
|
12160 PROCEDURE INITIO; EXTERN;
|
|
12170 PROCEDURE SEMERRP(N: INTEGER; LEX: PLEX); EXTERN;
|
|
12180 PROCEDURE SUBREST; EXTERN;
|
|
12190 PROCEDURE SUBSAVE; EXTERN;
|
|
12200 PROCEDURE SCPUSH(M: MODE); EXTERN;
|
|
12210 FUNCTION SCPOP: MODE; EXTERN;
|
|
12220 FUNCTION SRPOPMD: MODE; EXTERN;
|
|
12230 PROCEDURE MODERR(M: MODE; N: INTEGER); EXTERN;
|
|
12240 FUNCTION HASHIN: PLEX; EXTERN;
|
|
12270 PROCEDURE INITLX; EXTERN;
|
|
12280 PROCEDURE NEXTCH(LEVEL: INDEXTYPE); EXTERN;
|
|
12290 PROCEDURE LXERR(N: INTEGER); EXTERN;
|
|
12300 PROCEDURE LEXALF(LEX: PLEX; VAR ALF: ALFA); EXTERN;
|
|
12310 FUNCTION PARSIN: PLEX; EXTERN;
|
|
18808 (**)
|
|
18810 (*-86() (*EXTERNALS TO CODE GENERATOR*)
|
|
18811 (**)
|
|
18812 PROCEDURE STACKSB (SB:PSB); EXTERN;
|
|
18814 PROCEDURE UNSTACKSB ; EXTERN;
|
|
18816 (*+05() FUNCTION SUBSTLEN(SBTS: SBTTYPSET): INTEGER; EXTERN; ()+05*)
|
|
18820 (*+85() (*FOR SEMANTIC ROUTINES ONLY*)
|
|
18840 PROCEDURE CGRTE(R: PROUTN); EXTERN;
|
|
18850 PROCEDURE CGOPAB(OPCOD: POP; RESMODE: MODE); EXTERN;
|
|
18860 PROCEDURE CGRGID(STB: PSTB); EXTERN;
|
|
18870 PROCEDURE CGRGN; EXTERN;
|
|
18880 PROCEDURE CGRGXA(LOCRNG: BOOLEAN); EXTERN;
|
|
18890 PROCEDURE CGOPCALL; EXTERN;
|
|
18900 PROCEDURE CGOPDA; EXTERN;
|
|
18910 PROCEDURE CGOPDC; EXTERN;
|
|
18920 PROCEDURE CGOPDD; EXTERN;
|
|
18930 PROCEDURE CGOPDE(SBLH: PSB); EXTERN;
|
|
18940 PROCEDURE CGLABA(P: PSTB); EXTERN;
|
|
18950 PROCEDURE CGLABB(P: PSTB; WHICH: INTEGER); EXTERN;
|
|
18960 PROCEDURE CGLABC(P: PSTB; WHICH: INTEGER); EXTERN;
|
|
18970 PROCEDURE CGLABD(P: PSTB); EXTERN;
|
|
18980 PROCEDURE CGLABE(P: PSTB; LEVEL: DEPTHR; LEB: OFFSETR); EXTERN;
|
|
18990 ()+85*)
|
|
19000 (*+84() (*FOR MODE HANDLING ONLY*)
|
|
19010 PROCEDURE GENFLAD; EXTERN;
|
|
19020 PROCEDURE STARTCHAIN; EXTERN;
|
|
19030 PROCEDURE COMBINE; EXTERN;
|
|
19040 PROCEDURE LOADTOTAL(SB: PSB); EXTERN;
|
|
19050 PROCEDURE CGBALC; EXTERN;
|
|
19060 PROCEDURE SETTEXTSTATE; EXTERN;
|
|
19070 ()+84*)
|
|
19080 (*+83() (*FOR SEMANTICROUTINE ONLY*)
|
|
19090 PROCEDURE CGRTB; EXTERN;
|
|
19100 PROCEDURE CGRTD(PROCPTR: LABL); EXTERN;
|
|
19110 PROCEDURE CGRTA; EXTERN;
|
|
19120 PROCEDURE CGRTC; EXTERN;
|
|
19130 PROCEDURE CGLEFTCOLL(SB: PSB); EXTERN;
|
|
19140 PROCEDURE CGLEAPGEN(HEAP: BOOLEAN); EXTERN;
|
|
19150 PROCEDURE CGLPA(SB: PSB); EXTERN;
|
|
19160 PROCEDURE CGLPB(SB: PSB); EXTERN;
|
|
19170 PROCEDURE CGLPC(SB: PSB); EXTERN;
|
|
19180 PROCEDURE CGLPD; EXTERN;
|
|
19190 PROCEDURE CGLPE; EXTERN;
|
|
19210 PROCEDURE CGIFA; EXTERN;
|
|
19220 PROCEDURE CGINIT; EXTERN;
|
|
19230 PROCEDURE CGDEST; EXTERN;
|
|
19240 PROCEDURE CGFINCOLL(DEPTH: INTEGER); EXTERN;
|
|
19250 PROCEDURE CGACTBNDS(SB:PSB; N: CNTR); EXTERN;
|
|
19260 PROCEDURE CGASSIGN; EXTERN;
|
|
19270 PROCEDURE CGCALL(SB, SBR: PSB); EXTERN;
|
|
19280 PROCEDURE CGCASA; EXTERN;
|
|
19290 PROCEDURE CGCASC; EXTERN;
|
|
19300 PROCEDURE MARK(L: LABL); EXTERN;
|
|
19310 PROCEDURE CGCOLLUNIT; EXTERN;
|
|
19312 PROCEDURE CGPARM(VAR PTR:PSTB); EXTERN;
|
|
19320 PROCEDURE CGSELECT(OFFST: OFFSETR; M: MODE; SECDRY: INTEGER); EXTERN;
|
|
19330 PROCEDURE CGSLICE(SB: PSB; REFED: BOOLEAN); EXTERN;
|
|
19340 PROCEDURE CGEND; EXTERN;
|
|
19350 ()+83*)
|
|
19360 FUNCTION PUSHSB (PARAM:MODE) :PSB; EXTERN;
|
|
19370 PROCEDURE ASSIGNFLAD; EXTERN;
|
|
19380 PROCEDURE POPUNITS; EXTERN;
|
|
19390 PROCEDURE GETTOTAL(SB: PSB); EXTERN;
|
|
19400 PROCEDURE CGFIRM; EXTERN;
|
|
19430 PROCEDURE BRKASCR; EXTERN;
|
|
19440 PROCEDURE CGDEPROC (SB:PSB); EXTERN;
|
|
19442 PROCEDURE CGFIXRG; EXTERN;
|
|
19450 PROCEDURE CGFLADJUMP; EXTERN;
|
|
19460 PROCEDURE CGIBAL; EXTERN;
|
|
19470 PROCEDURE CGLPG; EXTERN;
|
|
19480 PROCEDURE CGOPR(OPCOD: POP; RESMODE: MODE; DYADIC: BOOLEAN); EXTERN;
|
|
19482 PROCEDURE CGPASC(SB, SBR: PSB); EXTERN;
|
|
19490 PROCEDURE CGRGXB(SB: PSB); EXTERN;
|
|
19492 PROCEDURE CGFLINE; EXTERN;
|
|
19500 ()-86*)
|
|
19506 (**)
|
|
19507 (*-84() (*EXTERNALS FOR MODE HANDLING*)
|
|
19508 (**)
|
|
19509 FUNCTION TX(M: MODE): XTYPE; EXTERN;
|
|
19510 FUNCTION COERCE(M:MODE):MODE; EXTERN;
|
|
29500 FUNCTION LENGTHEN(M: MODE; COUNT: INTEGER): MODE; EXTERN;
|
|
29502 FUNCTION COFIRM(SRCM,DSTM: MODE): MODE; EXTERN;
|
|
29504 FUNCTION COMEEK(SRCM: MODE): MODE; EXTERN;
|
|
29510 (*+85() (*FOR SEMANTIC ROUTINES ONLY*)
|
|
29530 PROCEDURE GETOPDM(PROCM: MODE); EXTERN;
|
|
29540 ()+85*)
|
|
29550 FUNCTION BALMOIDS(M1, M2: MODE): MODE; EXTERN;
|
|
29560 FUNCTION BALANCE(STRENGTH: STRTYP): MODE; EXTERN;
|
|
29570 FUNCTION SOFT: MODE; EXTERN;
|
|
29580 FUNCTION WEAK: MODE; EXTERN;
|
|
29590 PROCEDURE STRONG; EXTERN;
|
|
29600 PROCEDURE SETBALFLAG; EXTERN;
|
|
29610 PROCEDURE INNERBAL; EXTERN;
|
|
29620 PROCEDURE LASTIBAL; EXTERN;
|
|
29630 PROCEDURE MEEKLOAD(M: MODE; ERR: INTEGER); EXTERN;
|
|
29640 FUNCTION FIRMBAL:MODE; EXTERN;
|
|
50010 FUNCTION MEEK: MODE; EXTERN;
|
|
50012 ()-84*)
|
|
50018 (**)
|
|
50020 (*-85() (*EXTERNALS FOR SEMANTIC ROUTINES*)
|
|
50022 (**)
|
|
50030 (*+83() (*FOR SEMANTICROUTINE ONLY*)
|
|
50040 FUNCTION MAKESUBSTACK(N: INTEGER; M:MODE):PSB; EXTERN;
|
|
50050 FUNCTION ALLOC(N: OFFSETR): OFFSETR; EXTERN;
|
|
50052 PROCEDURE DISALLOCIND; EXTERN;
|
|
50060 PROCEDURE RANGENT; EXTERN;
|
|
50070 PROCEDURE ROUTNNT; EXTERN;
|
|
50080 PROCEDURE NECENV(STB: PSTB); EXTERN;
|
|
50090 PROCEDURE RANGEXT; EXTERN;
|
|
50100 PROCEDURE ROUTNXT; EXTERN;
|
|
50110 FUNCTION GETSTB(LEX: PLEX; DEF: DEFTYP; BLK: BLKTYP):PSTB; EXTERN;
|
|
50120 PROCEDURE FILLSTB(STB: PSTB); EXTERN;
|
|
50130 FUNCTION APPLAB(LEX: PLEX): PSTB; EXTERN;
|
|
50140 FUNCTION APPID(LEX: PLEX): PSTB; EXTERN;
|
|
50150 PROCEDURE DEFMI(LEX: PLEX); EXTERN;
|
|
50160 PROCEDURE DEFPRIO(LEX,PRIO: PLEX); EXTERN;
|
|
50170 PROCEDURE DEFLAB(LEX: PLEX); EXTERN;
|
|
50180 PROCEDURE PUTIND(STB: PSTB); EXTERN;
|
|
50190 PROCEDURE PUTDEN(LEX: PLEX); EXTERN;
|
|
50200 PROCEDURE PUTLOOP(LEX: PLEX); EXTERN;
|
|
50210 PROCEDURE ELABMI(LEX: PLEX); EXTERN;
|
|
50220 PROCEDURE PARMSC; EXTERN;
|
|
50230 PROCEDURE OPDSAVE(M: MODE); EXTERN;
|
|
50240 PROCEDURE BALOPR; EXTERN;
|
|
50250 PROCEDURE LHOPBAL(M: MODE); EXTERN;
|
|
50260 PROCEDURE PUTMD(LHM,RHM: MODE); EXTERN;
|
|
50270 PROCEDURE OPIDENT(MONADIC: BOOLEAN); EXTERN;
|
|
50280 PROCEDURE DEFOPM(OP: PSTB; M: MODE); EXTERN;
|
|
50290 PROCEDURE COLLSC(SB: PSB); EXTERN;
|
|
50300 PROCEDURE DEFID(LEX: PLEX); EXTERN;
|
|
50310 PROCEDURE DEFOP(LEX: PLEX); EXTERN;
|
|
50320 ()+83*)
|
|
50322 (*+82() (*FOR PARSER ONLY*)
|
|
50324 PROCEDURE INITSR; EXTERN;
|
|
50326 FUNCTION APPMI(LEX: PLEX): PSTB; EXTERN;
|
|
50328 ()+82*)
|
|
50330 ()-85*)
|
|
50332 (**)
|
|
71290 (*-83() (*+82()
|
|
71292 PROCEDURE SEMANTICROUTINE(SRTN: RTNTYPE); EXTERN;
|
|
71294 (*+21() PROCEDURE MONITORSEMANTIC(SRTN: RTNTYPE); EXTERN; ()+21*)
|
|
71296 ()+82*) ()-83*)
|
|
73918 (**)
|