Trailing-Edge
-
PDP-10 Archives
-
BB-D868D-BM
-
language-sources/begin.bli
There are 18 other files named begin.bli in the archive. Click here to see a list.
SWITCHES LIST;
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
! OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
!
!COPYRIGHT (C) 1972,1973,1974,1977,1978 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 01754
!FILENAME: BEGIN.BLI
!DATE: 26 MARCH 1974
!AUTHOR: M. G. MANUGIAN/FLD/GJB
%4.02% GLOBAL BIND BEGIV=21; !MODULE VERSION NUMBER
!FUNCTION: COMMON PARAMETER FILE FOR ALL BLIS10 MODULES.
! THIS FILE, BEGIN.BLI, DEFINES A BLOCK WHICH MUST EMBRACE
! ANY REAL BLISS COMPILER CODE DURING THE BOOTSTRAPPING PROCESS.
!
! THIS FILE SHOULD BE CONCATINATED TO THE HEAD OF THE FILE
! CONTAINING THE ACTUAL BLISS CODE (AFTER ELIMINATION OF
! MACRO ETC), AND ITS COMPANION FILE END.BLI SHOULD BE
! CONCATINATED TO THE TAIL.
!
! THE FILE END.BLI CONTAINS THE END CORRESPONDING TO THE
! BLOCK BEGIN INTRODUCED IN THIS FILE.
!HERE ARE THE ROUTINES FOR THE COMPILER
!--------------------------------------
! THE FOLLOWING IS FROM H3CCL
EXTERNAL CCLINIT;
! THE FOLLOWING ARE FROM LEXAN
%2.9% EXTERNAL PUNT, RELEASESPACE, GETSPACE, LTINSERT, GETLITVAL, GETADDLIT, SEARCH,
LITLEXEME, STINSERT, BLOCKPURGE, SKAN, IDFIXER, IDFIXFS,
WRUND1, WRUND2, WRUND3, WRUND, SMACRO, EXPMCR, DOCOREUUO,
%2.34% DUMPMACRO, HASH, SCANNER, PURGENSYMS, GSTINSERT,SRUND;
! THE FOLLOWING ARE FROM MACRO
EXTERNAL GETACTUAL, MCSAV, PUSHEXP, POPEXP, PRGSTR;
! THE FOLLOWING ARE FROM SYNTAX
EXTERNAL INITSYNTAX, HRUND, RECOVER, DEMAND, IDCHECKER, SLABEL, SLEAVE,
EXPRESSION, SCOMPOUND, SSET, SOPERATOR, SUSERCALL, SPLIT, SLONGS,
SSQOPEN, SPTR, SCASE, SREP, SESCAPE, SSPLF, SSELECT, SSPUNOP,
SIF, SDO, SWU, SPAROPEN, SML, DECLTEMPREG, SEXCHJ, SCREAT,SPLIT1;
! THE FOLLOWING ARE FROM XREF
EXTERNAL XREFWRITE,XLINE,XEOB,XREFINS;
! THE FOLLOWING ARE FROM DECLAR
EXTERNAL DECSYN, SROUTINE, SFUNCTION, SSTRUCTURE, RFS, GENFCN,
PEXTERNAL, PGLO, WHICHBIND, MKDUMINCA, CHECKEXTER,
SALLMACHOP, SMACHOP, SFORWARD, SLOCAL, SOWN, SGLOBAL,
SEXTERNAL, SREGISTER, SBIND, SMAP, UNMAP, INSTVECTOR,
CHKULA, RELSTRLIST, GSSA, SWITCHER, SMODHEAD, SDECLABEL,
DECSYM, STRECOPY, STRSCOPY, DECSYQ, H1RFS, GLOBALCHECK;
! THE FOLLOWING ARE FROM GTREE
EXTERNAL GENGRAPH, GENERATOR, GTPURGE, SETFUNBIT, RESTORERESULT,
GTINCR, GTDECR, CLEARRTGT, FIXSIDEEFFECTS, GENCODE,
GTHASH, MAKGT, FIXOCCF, GTLEXP, GTORES,
FOCGPH, MAXER, MARKFUNNY;
! THE FOLLOWING ARE FROM ADDRES
EXTERNAL GETVREG, GPA, GMA, RAGLAR, COPTR, LEXRA, FSA,
REGAR, REGAK, TVRP, ITRP, DCRP, READY, GLTM, TVMP,
LITV, LITA, MADRIR, RMA, MEMORYA, USABLEINDEXREG,
VALPTRTYP, PTRTYPP, MPTRTYP, MADDRFRPTRTYP, MCOPTRFRPTRTYP,
MLEXFRPTRTYP, REGP, SMPOSLITVP, SMNEGLITVP;
! THE FOLLOWING ARE FROM REGIST
EXTERNAL GLR, GLTR, GOLTR, GLTR2, GLPR, ACQUIRE, RMFRLST, GETAR, ENTER,
GETRN, DUMPREG, GENLOCAL, MATCH, CODEN, CODE, CLEARALL, GTUPDATE,
CLEARONE, CLEARSOME, DUA, DUN, DUAN, DUM, INCRUSEN, DULEX, RELREG,
FREEVREG, SAVRT, RESRT, COPYTRCT, CLEARTEMP, RMINT, RGINIT, RMREFREG,
GLAR, REGINIT, RELOADTEMP, SAVREG, LIVR, CTRCTH, REGSEARCH;
! THE FOLLOWING ARE FROM ARITH
EXTERNAL GPTR, GDOT, GAT, GSLSH, LEXNPSD, GLSH, GMUL, GDIV, GMOD, GADD, GSUB,
GNEG, GLSS, GEQL, GLEQ, GGEQ, GNEQ, GGTR, GAND, GOR,
GXOR, GEQV, GNOT, GFADR, GFMLR, GFSBR, GFDVR, GFNEG,
GFIX, GFLOAT, FLOATB, GSTO, GSLASH, GOTM, FULLWORD, FALR, CODEDPB,LOG2;
! THE FOLLOWING ARE FROM LSTPKG
EXTERNAL TEMPLATE, SKELETON, HEADER, UNTEMPLATE, UNSKELETON, SYPHON,
LAST, ALLNOS, PREVCODE, SWALABEL, CLASSP, CLASSLAB, ACPR1, ACPR2,
ACPR3, ACPDT, ACPDB, ADVR1, ADVR2, ADVR3, ADVDT, FLATTEN,
ADVDB, PUSHCODE, PUSHCPH, FOLLCPH, LOSECONV, LOCATE, SURFACE,
PRECEDE, PROMOTE, DROP, SCAN, SCAN0, ERASETOP, ERASEBOT, ERASE,
EMPTY, NEWBOT, FOLLOW, PUSHBOT, PUSHTOP, TAKE, FLATFUNC, PCIVR,
POPTOP, NONCLASSP, FIRST, FRONT,
DELCELL, DETCELL, ERASECELL, ERASEDET;
! THE FOLLOWING ARE FROM CNTROL
EXTERNAL TIMEIN, TIMEOUT, GCE0, GCE1, GCE2, GDWU0, GDWU1, GDWU2,
MPTIMIN,MPTIMOUT,DEBIN,DEBOUT,
GWUD0, GWUD1, GWUD2, GID0, GID1, GID2, GID3, GID4,
GITE0, GITE1, GITE2, GITE3, GCOST0, GCOST1, GLEAVE,
GCOST2, GCOST3, GCOST4, GSE0, GSE1, GSE2, GSE3, GSE3O, GSE3A,
GSE4, GSE5, CONVEY, GRETURN, GXBLOCK, GXLOOP, GXCOND,
GXCMPEX, GXSELECT, GXSET, GXCASE, GEXIT, GSPLF, GML,
GSPUNOP, GJFFO, GMOVM, GSGN,
GEPILOG, GPROLOG, GFRC1, GFRC2, GEXCH0, GEXCH1, GCREA0,
GCREA1, GCREA2, GCREA3, GCREA4, GCREA5, H2RFS;
! THE FOLLOWING ARE FROM LDINT
EXTERNAL LDINT, DEFLOW, LIINIT, PSWENT, DEFGLLEX, OFFST,
DEFGBC,DEFGBG,DEFGBR,PUTGBP,CHKGBP,
%2.25% PTTRANS, EXTCOUNT, TEXTHD, RPTTRANS, WRITE9, WRIT10, GETNAM;
%2.25%! THE FOLLOWING ARE FROM H3ASSY
%2.25%
%3.19% EXTERNAL MACOUT, MBLKOUT, MCODEOUT, MCPOUT, MDCLOUT,
%2.25% MENDOUT, MEXTOUT, MLITOUT, MMHDOUT, MPLITOUT,
%2.25% MPLOUT,MREGSOUT, R50TOASCIZ;
! THE FOLLOWING ARE FROM DRIVER
%3.20% EXTERNAL OCHAR, OUTREL, OUTPSTRING, OUTSTR, OUTSTN, OUTBLANK, OUTCONOC,
%3.20% OUTMOC, NEWLINE, EOCHAR, EOUTSTR, EOUTBLANK, OUTNUM,
%3.20% ENEWLINE, EMESSAGE, FORCELINE, ERROR, IDERROR, SAVEMACSRC,
PSWRES, PSWSAV, PSWSPC, EOSTN, WRITEFINAL, DRIVER,
%3.9-1% WARNEM, READALINE, MACHINECODE, WRITECODE, OUTOFFSET;
! THE FOLLOWING ARE FROM H3CNTR
EXTERNAL PSWSTK, PSWTIM, PSWSTT, CNINIT, PSWVER;
! THE FOLLOWING ARE FROM IO AND ONCE
EXTERNAL TTYLIST, INITIO, FINIO, FINLST, FORCE, PAGE, PAGER, READTEXT,
CALLEXECFORSPACE, BIO, ONCEONLY,CCLCTL,CCLBP,
%3.18% ERRDAT, ERROPEN, ERRDEV, ERRPPN, ERRFILE;
! THE FOLLOWING IS FROM REQUIRE
EXTERNAL SREQUIRE;
! THE FOLLOWING IS FROM H3ERR
%3.18% EXTERNAL ERRTABLE;
! THE FOLLOWING ARE FROM H3PEEP
EXTERNAL
NXTINSTR,PEEPER,PEEP00,PEEP01,PEEP02,PEEP03,PEEP04,
PEEP07,PEEP10,PEEP11,PEEP23,PEEP12,PEEP14,PEEP05,
PEEP20,PEEP21,PEEP30,PEEP36,PEEPA0,POPT01,POPT02,
POPT03,POPT04,POPT06,POPT07,POPT09,POPT10,POPT11,
POPT14,POPT15,POPT16,POPT17,POPT18,POPT19,POPT21,
POPT22,POPT23,POPT24,POPT27,POPT29,POPT30,POPT70,
POPT71,POPT72,POPT73,POPT74,POPT75,
NONSKIP,OPTOMEM,AROPTOMEM,DELCODE;
!HERE ARE THE GLOBAL VARIABLES
!-----------------------------
%2.25% EXTERNAL ONAME, GNAME, FNAME, CNAME, LNAME, TNAME, PNAME, XWDOFFSET, NEXTLAB;
EXTERNAL ACCUMLENGTH, AMNTFREE, ACCUM, ARTB,
BODYMC, BREG, BLOCKLEVEL, BUFF, BUF1, BUFPT1, BUF2, BUFPT2, B20FLG,
CODETOG, CHAR, CODEPTR, CODEPROP, COMPILLERERROR, CSTI,
CSTIL, CURST, CURSTI, CURSTE, CURSTAP, CURSTIP, CURSTNP,
DEBFLG, DEPTH, DDEPTH, DEVBPT, DEL, DISPLAYLEN, DSTACK, DEFACTS, DUPPLITFL,
ERRORFOUND, ERRLEVEL, ENLEX, EXPANDMACRO,
ETP, ETL, ETPNXT, ENDOFSPACE, ENDLK, EBUF, ENTHED, EXPINCA,
FBLKMC, FFSEEN, FLAGS, FORGET, FREG, FUNCTIONLEVEL, FREEVHEADER,
FCNSTATE, FNSTAT, FSTRHED, FUTSYM, FUTDEL, FCNLIST, FREEHEAD,
%2.34% GENSYMS, GLLIST, GTL, GTP,
HOLD, HITREGM, RPAGE,
INCA, IBUF, INCASIZE, INDECS,
%2.9% ?.JBVER, JSPREG, ?.JBSYM, ?.JBREL, ?.JBHRL, LTBASE, LTTBASE,
LABIND, LINCNT, LTFULL, LOADECREG, LOC2, LOCC,
LSTART, LXSEMC, LXOPEP, LXPLUS, LXCLOP, LXOPEA, LXCOMMA,
%2.9% LXCLOA, LAHTR,
%5.200.26% LNKSTE,
MUSTDU, MCBUFF, MDEPTH, MDDEPTH, MACRODEF, MACROFORMAL, MPOCDV,
MHTIME, MNAME, MMC, MNAM, MODLENGTH, MAXLOCAL, MODREGM, MAPTB,
%2.14% NEEDDISP, NOSVR, NLINES, NSYM, NDEL, NFUTSYM, NFUTDEL, NCBUFF,
NEXTLOCAL, NEXTGLOBAL, NEXTOWN, NOGBGCOL, NORECVAL, NOWSEG,
NODISC, NOCSAV, NOPSAV, NUMENT, NUMPARS, NOSAVREG, NREG,
OTL, OBUF, OFLAGS, OTYPE, OPAR, OFUN, OEQL, OASS, OPTTOREGADDR,
PGSL, PACCUM, PBUFF, PSTRING, PROGRAM, PDBUF, POSIT, POSITC,
%2.25% PTOVECTOR, PTREFNO, PTLNK, PTTRANST, PGM, PLNEXT, PLHEAD, PLBOOL,
QUOTETYPE,OWNHEAD,GLOHEAD,OWNBLK,GLOBLK,STUTYPE,
RESREGM, REALFS, REALS, REGUSE, RETOT, RENTLEX, RXITLEX,
SACCUM, !V2G-
SAVJBREL, SIZE, SIZEM1, SESTOG, SOSPGC, STKSTAT, STRINFIXED, SREG, SYM, SVREGM,
STRDEF, STRING, STRSTE, STE, STELIST, STEMC, SERRPOS, SERRSTE,
STELAST, STRLXS, STRHED, SSTREX, STREXP, STACK, SFORLABEL,
TEMP, TIMSTAT, TYPE, VECTOR TYPEDOPE, TRBLEVEL, TGRBLEVEL, TOPOFTABLE, TSTACK,
UNDECLEX,
VALIDBUF, VREG, VAL, VECACTS, VTARGET,
XNCBUFF,XTIT1,XTIT2,XHED,
%2.9% WARNINGFOUND, WDVECTOR, ZEROAD,
%3.31% COREGONE,
GBPHDR;
!HERE ARE THE MACROS AND BINDS
!-----------------------------
EXTERNAL LEXERR;
MACRO DISPAD(R)=R$,
ERRLEX=(#177777^18 OR LEXERR)$;
! TRANSFORM VECTORS TO ADDRESSES
MACRO NGOTM=GOTM$,
NSFORWARD=SFORWARD$,
NGDIV=GDIV$,
NGMOD=GMOD$,
NGDOT=GDOT$,
NGAT=GAT$,
NGNEG=GNEG$,
NGPTR=GPTR$,
NSROUTINE=SROUTINE$,
NSCOMPOUND=SCOMPOUND$,
NSEXTERNAL=SEXTERNAL$,
NSGLOBAL=SGLOBAL$,
NSOWN=SOWN$,
NSBIND=SBIND$,
NDRIVER=DRIVER$;
! MASKING AND POSITIONING MACROS:
MACRO
MASK(FIELD)=REALMASK(FIELD)$,
REALMASK(POS,SIZ)=((1^SIZ-1)^POS)$,
FIELDVAL(FIELD,VAL)=REALFIELDV(FIELD,VAL)$,
REALFIELDV(POS,SIZ,VAL)=((VAL)^POS)$,
POSITION(FIELD)=FIRSTPAR(FIELD)$,
SIZEPART(FIELD)=SECONDPAR(FIELD)$,
FIRSTPAR(I,J)=(I)$,
SECONDPAR(I,J)=(J)$;
! SWITCH DEFINITIONS
! ------------------
MACRO
LSTFLG=FLAGS<28,1>$, LUNDEFLG=FLAGS<25,1>$, SVERGFLG=FLAGS<26,1>$,
STATFLG=FLAGS<24,1>$, BINFLG=FLAGS<27,1>$, FINFLG=FLAGS<34,1>$,
NPTFLG=FLAGS<23,1>$, TWOSEGFLG=FLAGS<29,1>$, HGHFLG=FLAGS<32,1>$,
XREFLG=FLAGS<35,1>$, TTYLST=FLAGS<10,1>$, ERRBIT=FLAGS<7,1>$,
EMFLAG=FLAGS<22,1>$, EMFLG=EMFLAG$, MLFLG=FLAGS<30,1>$,
GRFLG=FLAGS<21,1>$, TTFLAG=FLAGS<20,1>$, CCLFLAG=FLAGS<19,1>$,
PROFLG=FLAGS<18,1>$, FSAVFLG=FLAGS<33,1>$, CANLST=FLAGS<31,1>$,
FFFLAG=FLAGS<33,1>$; !FIX UP FREG ON EVERY ROUTINE ENTRANCE AND EXIT
EXTERNAL NOENGLISH, STARTBLOCK; ! 3.18 AND 3.22
! VARIOUS PARAMETERIZED MACROS
MACRO NULL(H)=(.CT[(H),1]<NEXTF> EQL (H))$;
MACRO CASE2(T,P1,P2)=CASE T OF SET P1; P2 TES$;
MACRO TREGNUM(X)=(X<RTEF>)$;
MACRO WORD(X)=(X)<0,36>$;
MACRO LITP(X)=(((X) AND NOT STEM) EQL 0)$;
MACRO NAMP(X)=(((X) AND NOT STEM) EQL (LSM OR ZERO36))$;
MACRO SIGN(X)=(X<NEGF>)$;
MACRO GABS(X)=((X) AND NOT NEGM)$;
MACRO NO(X)=(X<NOTF>)$;
MACRO GYES(X)=((X) AND NOT NOTM)$;
MACRO LEXRN(X)=((X)^16)$;
MACRO FLOATONE=LITLEXEME(#201400^18)$;
MACRO VERYBIG=LITLEXEME(-1 AND NOT 1^35)$;
MACRO ZERONAMP(X)=(((X) AND NOT STEM) EQL LSM)$;
MACRO STACKVARP(X)=STACKVAR^(-.ST[X,0]<TYPEF>)$;
! VARIOUS SIZES AND MASK DEFINITIONS
BIND
PTMASK=#377, GTMASK=#37, HTSIZE=125,
DTSIZE=#100, EOL=#15, MAXSTRING=135,
%2.9% LTMASK=#377, LTSIZE=LTMASK+1, LITLEX1=0,
LITLEX2=(1^14), DEFAULTSTKL=#1000, COROUPREFL=4,
GTLEX=#077777, EXPHTSIZE=31, LONGESTPLIT=200,
%2.9% LTNUM=8, !MAX # OF LT AND LTTRANST MODULES
%2.9% LTLIM=LTSIZE-LTSIZE^(-2), !MAX # OF ENTRIES ALLOWED IN LT MODULE
ALIVEM=1^31, !V2H- ALIVE BIT IN LABEL STES
DEADM=1^30; !V2H- DEAD BIT IN LABEL STES.
MACRO STKLEN(I)=STKSTAT[I]<0,18>$, STKSTE(I)=STKSTAT[I]<18,18>$;
! SYMBOL TABLE TYPE EQUATES
BIND
DELMT=#00, UNDEDT=#01, GLOBALT=#02,
OWNT=#03, EXTRNT=#04, LOCALT=#05,
BINDT=#06, FORMALT=#07, REGT=#20,
GROUTINET=#12, ROUTINET=#10, EXPRT=#11,
RTNT=#10, STFORMT=#14, STRFPT=STFORMT,
FUNCT=#13, FORWT=#17, MACHT=#40,
MACHOPT=MACHT, SPLFT=#41, ABSOLUTET=#42,
STRT=#30, MACROT=#31, PLITT=#15,
LEXEMT=#32, SPUNOPT=#43, PTRT=#44,
GPLITT=#22, !GLOBAL BIND TO LOCATION WITHIN PLITT
GABSOLUTET=#21, !GLOBAL BIND TO COMPILE TIME CONSTANT
GLEXEMT=#32, !GLOBAL BIND TO LINK TIME CONSTANT
LINKAGET=#45, !NAME OF LINKAGE TYPE (5.200.19)
LABELT= #16; !THIS IS A CONTROL EXPRESSION LABEL.
! UNUSED TYPES: 24-27,33-37,46-47
BIND STACKVAR=(1^LOCALT OR 1^FORMALT OR 1^BINDT OR 1^STFORMT);
BIND GLOBALTYPE= (1^GLOBALT OR 1^GABSOLUTET OR 1^GROUTINET
OR 1^GPLITT);
BIND VALIDTYPE= (1^GLOBALT OR 1^OWNT OR 1^EXTRNT OR 1^LOCALT OR 1^EXPRT OR
1^FORMALT OR 1^ROUTINET OR 1^GROUTINET OR 1^FUNCT OR
1^FORWT OR 1^STFORMT OR 1^BINDT OR 1^PLITT OR 1^GPLITT
); !5.200.17 REMOVED "1^STRT OR"
%5.200.18% BIND LOADTIMEAD=
%5.200.18% (1^OWNT OR 1^GLOBALT OR 1^EXTRNT OR 1^EXPRT OR
%5.200.18% 1^GROUTINET OR 1^ROUTINET OR 1^FUNCT OR 1^PLITT OR
%5.200.18% 1^FORWT OR
%5.200.18% 1^GPLITT);
%5.200.19% BIND BADEXPTYPE=(1^STRT OR 1^LABELT
%5.200.19% OR 1^UNDEDT OR 1^LINKAGET);
! VARIOUS FIELD EQUATES
MACRO
FUNNYBIT=35,1$, MARKBIT=34,1$, RESULTF=33,1$,
OCCF=18,8$, SAVGEF=26,7$,
SUBNF=15,3$, ROSF=18,16$,
PREVF=15,15$, NEXTF=0,15$, LEFTM=#777777^18$,
%5.200.27% LINKAGESTF=15,15$, PORTALSWF=30,1$,
LEFTF=18,18$, RIGHTF=0,18$, RIGHTM=#777777$,
BLF=28,6$, FLF=22,6$, TYPEF=16,6$,
LSSTEF=0,16$, LINKF=0,15$, ADDRESSF=0,18$,
STRF=18,15$, NPARMSF=18,6$, MTLF=24,11$,
NRF=33,3$, NEGF=35,1$, NOTF=34,1$,
NGNTF=34,2$, COPF=33,1$, DOTF=33,1$,
POSNF=27,6$, SIZEF=21,6$, POSNSIZEF=21,12$,
USEF=18,8$, DTF=20,1$, TDF=20,1$,
RTEF=16,5$, LRTEF=0,5$, LSF=15,1$,
VEF=14,1$, LTEF=0,14$, STEF=0,15$,
PRIORITYF=30,6$, DNUMF=27,3$, RADDRF=0,18$,
HCLASS=34,2$, LEFTHALF=18,18$, RIGHTHALF=0,18$,
HUNARY=20,1$, HPRIORITY=30,6$, AEMAYFOLLOW=23,1$,
SIMBIT=24,1$, OFFSETF=0,18$, PARSTEF=18,15$,
DEADALIVEF=30,2$, !DEAD AND ALIVE BITS IN LABEL STES.
DEADB=30,1$, !DEADB IN LABEL STES.
ALIVEB=31,1$; !ALIVEB IN LABEL STES.
! DELIMETER CODES
BIND
OPENBRACKET=0, CLOBRAC=2, OPRTR=1,
DCLRTR=3;
! DELIMETER TYPE LEXEME BINDS
BIND
HEMPTY=0, HUNARYM=1^20, HBLOCK=#1560,
HMODULE=#2563, HELUDOM=#400023, HOTHERWISE=#400264,
HALWAYS=#400260, HBEGIN=#2560, HPAROPEN=#3750,
%2.21% HROPEN=#3560, HDOT=#211504, HAT=#212504,
%2.21% HBKSLSH=#213504, HMIN=#262700, HPLUS=#261720,
HNOT=#311514, HNEG=#223504, HEXCHJ=#1542,
HCREATE=#1541, HLENGTH=#400101, HCRAT=#400102,
HWHILE=#5140, HUNTIL=#4140, HSQOPEN=#4750,
HPTOPEN=#2750, HDOOPEN=#3140, HCOMMA=#401060,
HNAMES=#400010, HINDEXES=#400011, HGLOBALLY=#400012,
%5.200.25% HPORTAL=#601013,
HFUNCTION=#601024, HROUTINE=#602024, HEND=#400020,
HSEMCOL=#400060, HDO=#403040, HUNTLCLO=#404040,
HWHLCLO=#405040,
HIFSKIP=#2141, HTHEN=#400040, HELSE=#406040,
HPOINTCLO=#402020, HROCLO=#401020, HPTCLO=#402020,
HSQCLO=#403020, HSTO=#370740, HDECR=#1100,
HTO=#402040, HSELECT=#1240, HNSET=#400100,
HTESN=#400200, HTES=#400000, HSET=#7140,
HOF=#401000, HFROM=#401040, HBY=#402041,
%5.200.19% HENTXIT=#604000,
! (5.200.19) THE KEY WORD FOR THE LINKAGE TYPE: LINKAGE <X>=ENTXIT(<Y>,<Z>)
%5.200.14% HEQL=%407020% HSTO, HCOLON=#403060, HEXITCOND=#1143,
! NOTE: THE CHANGE 5.200.14 ON THE PREVIOUS LINE IS, WITH
! THE CHANGE TO LOONCE, THE EQUIVALENCING OF "=" AND "_".
HEXITLOOP=#1140, HEXITCOMP=#1141, HEXITBLOCK=#1142,
HEXITSELECT=#2141, HEXITCASE=#2142, HEXITSET=#2143,
HEXIT=#3140, HRETURN=#2140, HBREAK=#1140,
HSESEMCOL=#400360,HREQUIRE=#600003, !FOR REQUIRE FILE 4-22-77
HWITH= #405000, !V2H- "WITH" IN A LEAVE EXPRESSION
HLEAVE= #3141, !V2H- "LEAVE" IN A LEAVE EXPRESSION
HLABEL= #600001, !V2H- "LABEL" IN A LABEL DECLARATION
HLABCOLON= #204500; !V2H- ":" AS A LABEL DELIMITER
MACRO
HERRLEX=ERRLEX$;
! MACHINE OP CODE BINDS
BIND
FSC=#132, IBP=#133, ILDB=#134,
IDPB=#136, LDB=#135, DPB=#137,
FAD=#140, FADRR=#144, FADRRI=#145,
FADRM=#146, FSBRR=#154, FSBRRI=#155,
FSBRM=#156, FMLRR=#164, FMLRRI=#165,
FMPRM=#166, FDVRR=#174, FDVRRI=#175,
MOVEI=#201, MOVEM=#202, MOVE=#200,
MOVNI=#211, MOVNM=#212, MOVNS=#213,
MOVN=#210, MOVM=#214, IMULI=#221,
IMULM=#222, IMUL=#220, MULI=#225,
IDIVI=#231, IDIVM=#232, IDIV=#230,
ASH=#240, LSH=#242, EXCH=#250,
JRST=#254, XCT=#256, PUSHJ=#260,
PUSH=#261, POPJ=#263, POP=#262,
ADDI=#271, ADDM=#272, ADD=#270,
SUBI=#275, SUBM=#276, SUB=#274,
CAILE=#303, CAIN=#306, CAI=#300,
CAMLE=#313, CAMN=#316, CAME=#312,
CAMGE=#315, CAM=#310, JUMPE=#322,
JUMPG=#327, JUMP=#320, SKIPE=#332,
SKIPA=#334, SKIPGE=#335, AOJ=#340,
AOJLE=#343, AOJA=#344, AOS=#350,
AOSE=#352, SOJ=#360, SOJA=#364,
SOJGE=#365, SOJG=#367, SOS=#370,
SETZM=#402, SETZ=#400, ANDM=#406,
XORM=#432, IOR=#434, IORI=#435,
ORM=#436, EQVM=#446, SETCAM=#452,
SETCAB=#453, SETCA=#450, SETCMM=#462,
SETCM=#460, SETOM=#476, SETO=#474,
HRLZ=#514, HRLZI=#515, HRLZS=#517,
HRLOI=#525, HRLI=#505, HRLM=#506,
HRL=#504, HLLZS=#513, HLLOS=#523,
HRRI=#541, HRRM=#542, HRRZI=#551,
HRRZM=#552, HRRZS=#553, HRRZ=#550,
HLRZ=#554, HLRZS=#557, HRROS=#563,
HRR=#540, TRNE=#602, TLNE=#603,
TRNN=#606, TLNN=#607, TRZ=#620,
TLZ=#621, TDZ=#630, TLC=#641,
TRO=#660, TLO=#661, TDO=#670,
JSP=#265, JFFO=#243, SKIPLE=#333,
ANDI=#405, SKIP=#330, ANDCMI=#421,
TDNE=#612, TDNN=#616, TDZA=#634,
HRROI=#561, JUMPGE=#325, JUMPLE=#323,
JUMPL=#321, AOJL=#341, HLL=#500,
HLR=#544, FDVRM=#176, ADDB=#273,
SETCMB=#463, SETOB=#477, SETZB=#403,
MOVSI=#205, SKIPL=#331, CAIA=#304,
IORM=#436, ANDCAM=#412, ANDCA=#410,
ANDCAI=#411, ANDCM=#420, ANDCB=#440,
ANDCBI=#441, ORCA=#454, ORCAI=#455,
ORCM=#464, ORCMI=#465, ORCB=#470,
ORCBI=#471;
! DECLARATION FIELDS AND MASKS
MACRO
NFPARMBIT=1^32$, TYPEFP=16$, LSFPLUS=15,21$,
NPARMF=32,4$, LASTF=15,15$, COPYLEX=0,1$,
SIMBITAF=31,1$, SIMBITSF=30,1$, LXTESF=15,15$,
LXTEAF=0,15$, TACCESS=1,1$, NPF=3,4$,
STRXPF=0,15$, STRXF=0,15$, PSZF=32,4$,
STELSTEF=18,18$, STELCPF=0,36$, STELNEXTF=0,18$,
MAPLINKF=0,15$, MAPSTEF=0,15$, MAPSTRF=15,15$,
SIMBITAM=1^31$;
%%
% 3 USEFUL MACROS:
"PUSHGPV(<INDEX>,<NAME>)" SAME AS LCC "NEW NAME"
"POPGPV(<INDEX>,<NAME>)" SAME AS EXITING THE PART IN WHICH
NAME WAS DECLARED "NEW".
"CHECK(<ROUTINE NAME>)" SIMPLY GENERATES A RETURN IF THE
ROUTINE (CALLED WITH NO PARAMETERS) RETURNS A 1.
NOTE: "CHECK(Y) 1;" WILL RETURN A 1 IF Y DOES.
<INDEX> IN GPV MACROS REFERS TO AN OFFSET FROM A LOCAL VARIABLE
DECLARED LOCGPV[<LENGTH>]--I.E. IT MUST BE A VECTOR.
%
%%
MACRO PUSHGPV(INDEX,NAME)=(LOCGPV[INDEX]_.NAME; NAME)$,
POPGPV(INDEX,NAME)=NAME_.LOCGPV[INDEX]$,
CHECK(ROUT)=IF ROUT() THEN RETURN$;
% MAPPING TEST MACROS %
BIND MAPMASK=1^ABSOLUTET+1^GABSOLUTET+1^REGT+1^STRFPT+1^FORMALT+1^PLITT+1^LEXEMT+
1^BINDT+1^LOCALT+1^EXTRNT+1^OWNT+1^GLOBALT+1^GPLITT;
MACRO RELINCA(INCSTE)=RELEASESPACE(INCSTE,.ST[INCSTE,0]<PSZF>)$,
MAPPABLE(TYPE)=(MAPMASK^(-TYPE))$,
MAKEEXTERNAL(STE)=(WARNEM(.NSYM,0);
ST[STE,0]<TYPEF>_EXTRNT;
ST[STE,1]<ADDRESSF>_#777777)$;
! DECLARATION ERROR CODE BINDS
BIND
ERSYNAME=60, ERSYNOEQ=61, ERSYNOFPRD=62,
ERSYMRBRAC=63, ERSYMDEL=64, ERSYMNPRD=65,
ERSYNOCOL=66, ERSYMEQ=67, ERSYMGRLD=68,
ERSYUNMTCH=#142, ERSYMLBRAC=69, ERSMNDEC=86,
ERSMINREG=87, ERSMNOTL=88, ERSMUNMP=89,
ERSMEXPAR=90, ERSMNOTC=91, ERSMINULA=92,
ERSMBADFEXP=93, ERSMBADEXP=94, ERSMNOMAP=95,
ERSMNOTSTR=96, ERSMSIZE=97, ERSMNOFUN=98,
ERSMPREV=99,
ERRUNOP=#400, ERNOCBDEL=#401, ERNOSEMI=#402,
ERINVLEX=#403, ERGBMBCTC=#404, ERTMFP= #405,
ERCANTSHRINK=#406, ERILTL=#407, ERNONAME=#410,
ERNMPREV=#411, ERNOBINDDU=#412, ERALDECGL=#413,
ERDMBIN=#414, ERFEWERACT=#415, ERCANTLABEL=#416,
ERIMPLABEL=#417, ERALUSEDLAB=#420, EROUTLABSCOPE=#421,
ERSMBSVNAME=#422, ERTOBEOBS=#423, ERGLRTOROUT=#424,
ERGLTOOWN=#425, ERREDGLOBAL=#427,
ERRRDLINK=#432,
ERRBADSYM=#426, !(5.200.19)(BAD EXPRESSION CONSTITUENT)
% IN THE MODULE HEAD %
ERSYINVMDEC=#613, ERSMSTKD=#614, ERSYSTKINV=#615,
ERSMINSTKL=#616, ERSMINUSE=#617, ERSMSPRINV=#620,
ERSMSPRPRE=#621, ERSYMODBEG=#622, ERSMTOOM=#623,
ERSYRRINV=#624, ERSMNOPROG=#625, ERSYENTINV=#626,
ERSMNOENT=#627, ERSYNVER=#640,
% IN PLITS AND LONG STRINGS %
ERSYPLMRP=#630, ERSMPLNLI=#631, ERSMPLNLO=#632,
ERSMDUP=#633, ERSMLONG=#634, ERSYMRQ=#635,
ERSYIQC=#636, ERSMEXACT=#637,
% RELATIVE SWITCH TABLE LENGTH LOCATIONS 3.28 %
ALLSWL=-1, SWSWL=0;
! CODE HEADER CLASSES
BIND
CNVEYC=0, RELC=1, XBLOCKC=2,
XLOOPC=3, XCMPEXC=4, XCONDC=5,
XCOSTC=6, XSELECTC=7, XITC=8,
%5.200.29% PORTALC=9,
CODEC=12, LABELC=13, COSTC=14,
SELECTC=15, SELELC=16, EXCHC=17,
CREATC=18, CASEC=21, SETC=22,
NSETC=23, CMPEXC=24, ITEC=25,
DWUC=26, WUDC=27, IDFTDC=28,
BEC=29, FRC=30, CURRENTC=31;
! RELOCATION FIELD VALUES
BIND
NORELOC=0, EXTRELOC=1, CTRELOC=2,
OWNRELOC=3, GLORELOC=4, EXPRELOC=5,
PTRELOC=6, LTRELOC=7, LOCRELOC=8,
PLRELOC=9, CASEJMPRELOC=10, MODRELOC=11,
NOBORELOC=12, LUNDERELOC=13, TTRELOC=14;
! CODE CELL TYPE FIELDS
MACRO
ARTEF=32,4$, HOLYF=31,1$, LOCKF=30,1$,
BLOCKSIZEF=26,4$, RSF=15,1$, FCHAINF=30,6$,
BCHAINF=24,6$, CHAINF=24,12$, FREEF=15,1$,
HDRF=35,1$, CLASSF=30,5$, HDRCLASSF=30,6$,
RELRF=23,4$, RELOCF=30,5$, FUNCF=27,9$,
ACCF=23,4$, IXYF=0,23$, INDRF=22,1$,
INDXF=18,4$;
! CODE GENERATION MASKS
BIND
NEGM=1^35, NOTM=1^34, COPM=1^33,
DOTM=1^33, POSNM=#77^27, SIZEM=#77^21,
IXYM=#37777777, RELOCM=#37^30, INDIRM=1^22,
%2.22% NOTPSMASK=#77^18 + #777777, !BYTE POINTER EXCLUSIVE OF POS & SIZE
INDRM=1^22, DTM=1^20, RTEM=#37^16,
LSM=1^15, LSSTEM=#177777, VEM=1^14,
STEM=#77777, LTEM=#37777, NGNTM=3^34,
ONES=-1, ONE =1 , PRIME=13,
%2.9% RTESTEM=(RTEM OR STEM), COPLTEM=(COPM OR LTEM), ZERO=(#37777 OR VEM),
ZERO36=36^21, RELRM=#17^23, INDXM=#17^18,
NEXTM=#77777, POSNSIZEM=POSNM OR SIZEM,
%4.01% PEEPHOLE=#776, !PEEPHOLE OPCODE
%4.01% PEEPON=#701, !TURN PEEPHOLER ON
%4.01% PEEPOFF=#700, !TURN PEEPHOLER OFF
%4.01% PEEPREV=#702, !REVERT PEEPHOLING TO PREVIOUS STATE
%4.01% PEEPNOP=#704; !PEEPHOLE NO-OP
%4.01% EXTERNAL
%4.01% PX, !CURRENT PEEPHOLE POINTER
%4.01% PEEPHDR, !START OF THE CODE CHAIN FOR PEEPER
%4.01% LNKUP, !LINK TO PREVIOUS CODE WORD
%4.01% LNKUP2, !LINK TO 2ND PREVIOUS CODE WORD
%4.01% LNKDN, !LINK TO NEXT CODE WORD
%4.01% LNKDN2, !LINK TO 2ND CODE WORD FOLLOWING
%4.01% PEEPOK, !BOOLEAN TO ALLOW PEEPING
%4.01% PSTKPTR, !PEEP STACK POINTER
%4.01% PSTACK, !THE PEEP STACK ITSELF
%4.01% PSTOP; !MOVEABLE BEGINNING OF PEEPHOLE WINDOW
%4.01% MACRO
%4.01% PLABEL(I)=CT[I,0]<HDRF>$,
%4.01% PRELOC(I)=CT[I,0]<RELOCF>$,
%4.01% PCODEWD(I)=CT[I,1]$,
%4.01% POPCODE(I)=CT[I,1]<27,9>$,
%4.01% PREG(I)=CT[I,1]<23,4>$,
%4.01% PADDR(I)=CT[I,1]<0,23>$,
%4.01% PRGADDR(I)=CT[I,1]<0,27>$,
%4.01% POFFSET(I)=CT[I,1]<0,18>$;
! MACRO PROCESSOR EQUATES AND MACROS.
MACRO
INUSEBIT=15,1$, CHARF=0,7$, WORDF=0,36$,
NAMEF=15,15$, POSITF=7,29$, ACTUALF=30,5$;
BIND
TERMINATOR=#177, NOBLKS=1, TOOBIG=((NOBLKS*2)*5-1);
! STANDARD STRUCTURE DECLARATIONS AND THEIR EXTERNALS.
BIND TIMXMF=1, TIMXGF=2;
EXTERNAL TABLE;
STRUCTURE STANDARD[I,J]=(TABLE+TIMXMF*.I+.J)<0,36>;
STRUCTURE OLDSTANDARD[I,J]=(.OLDSTANDARD+2*.I+.J)<0,36>;
STRUCTURE BITVECTOR[I]=(.BITVECTOR+.I^(-5))<.I AND #37,1>;
STRUCTURE FORPOC[I,J]=(.FORPOC+.(MPOCDV+.I)<0,36>+.J)<0,36>;
STRUCTURE FOROCE[I,J]=(.FOROCE+4*.I+.J)<0,36>;
STRUCTURE FORDEVBUF[I,J]=(@DEVBPT+3*.I+.J)<0,36>;
STRUCTURE TYPESTR[I]=(.(TYPEDOPE+(.I AND 7)) + .I^(-3));
MAP STANDARD TABLE;
EXTERNAL STANDARD GT:ST:CT:XT:LXT:MAPT:MT,
%VECTOR% ART:RT:HT:XHT:GNAMES:EXPHT:
LT:DT:GRAPHHEAD,
OLDSTANDARD PT,
BITVECTOR AVL,
TYPESTR TYPETAB,
FORPOC POC,
FOROCE OCE,
FORDEVBUF DEVBUF;
STRUCTURE GTVEC[I]=(TABLE+TIMXMF*@.GTVEC+.I)<0,36>;
STRUCTURE STVEC[I]=(TABLE+TIMXMF*@.STVEC+.I)<0,36>;
! MACROS AND BINDS FOR TIMING/TRACING FEATURES
MACRO
TIMSTE=TIMSTAT<18,18>$, TIMLEN=TIMSTAT<0,18>$;
BIND
DEFAULTTIML=4;
%4.01% MAP BITVECTOR PSTACK; !THE PEEPSTACK
! DEFINITION OF DEBUGUUO
BIND DEBUGUUO=#037;
!APPERSON'S MACROS AND STRUCTURES
MACRO
CASEJMPP(I)=(.CTCELTYP[I] EQL CASEJMPRELOC)$,
CELTYPF=HDRCLASSF$,
CF0(NAM)=FSM(CT,NAM,0)$,
CF1(NAM)=FSM(CT,NAM,1)$,
CF2(NAM)=FSM(CT,NAM,2)$,
CLASS1F=CLASSF$,
CONC(A,B)=ID(A)B$,
CTREFP(I)=((1^CTRELOC+1^CASEJMPRELOC)^(-.CTCELTYP[I]))$,
CURRENTP(I)=(.CTCELTYP[I] EQL CURRENTC+32 OR .CTCELTYP[I] EQL SELELC+32)$,
FIRSTP(I)=(.NOFP(I) NEQ (I))$,
FIXEDF=34,1$,
FIXEDP(IND)=(.CTFIXED[IND])$,
FSM(PRE,NAM,WD)=BIND STFSTR CONC(PRE,NAM)[0,WD,CONC(NAM,F)]=TABLE+WD,
PTFSTR CONC(PT,NAM)[0,WD,CONC(NAM,F)]=PT+WD$,
HDR1F=HDRF$,
HEADER1P(I)=(.CT[I,1] LSS 0)$,
HEADERP(I)=(.CT[I,0] LSS 0)$,
ID(A)=A$,
JMPP(I)=(.CTOPLEFT[I] EQL JRST^9 AND LABREFP(I))$,
JUMP0P(I)=(.CTFUNC[I] EQL JUMP)$,
LABELP(I)=(.CTCELTYP[I] EQL LABELC+32)$,
LABSEENF=HDR1F$,
LASTP(I)=(.POFN(I) NEQ (I))$,
LINENOF=0,36$,
LINENOP(I)=(.CTCELTYP[I] EQL 0 AND .CTOPLEFT[I] EQL 0)$,
NEXT1F=NEXTF$,
NEXTOFPREV(I)=(NOFP(I)[FIRSTP(I)]<NEXTF>)$,
NOFP(I)=(CTNEXT[.CTPREV[I]])$,
OPADF=0,18$,
OPF=0,36$,
OPLEFTF=18,18$,
POFN(I)=(CTPREV[.CTNEXT[I]])$,
PREV1F=PREVF$,
PREVOFNEXT(I)=(POFN(I)[LASTP(I)]<PREVF>)$,
PTREFP(I)=(.CTCELTYP[I] EQL PTRELOC)$,
REFEDF=35,1$,
REFEF=PREVF$,
REFRF=NEXTF$,
RELADF=NEXTF$,
RELF=RELOCF$,
REPLACEVAL(A,B)=(REGISTER R;R_.(A);(A)_(B);.R)$,
RPTCNTF=RIGHTHALF$,
SF1(NAM)=FSM(ST,NAM,1)$,
XCTP(I)=(CTREFP(I) AND .CTOPLEFT[I] EQL XCT^9)$;
!STRUCTURES FOR CT AND ST FIELDS
STRUCTURE PTFSTR[I,WD,P,S]=(PT+WD+2*.I)<P,S>;
STRUCTURE STFSTR[I,WD,P,S]=(TABLE+TIMXMF*.I+WD)<P,S>;
CF1(ACC);
CF0(CELTYP);
CF1(CLASS1);
CF0(FIXED);
CF1(FUNC);
CF0(HDR);
CF1(HDR1);
CF1(LABSEEN);
CF1(LINENO);
CF0(NEXT);
CF1(NEXT1);
SF1(OFFSET);
CF1(OP);
CF1(OPAD);
CF1(OPLEFT);
CF0(PREV);
SF1(PARSTE);
CF1(PREV1);
CF1(REFE);
CF1(REFED);
CF1(REFR);
CF0(REL);
CF1(RELAD);
CF2(RPTCNT);
! GESCHKE'S MACROS TO HANDLE THE PTRTYP STUFF
MACRO
NORELOCPTRTYPP(X)=.ST[X,1]<RELOCF> EQL NORELOC$,
PSPTRTYP(X)=VALPTRTYP(X)^(-24)$,
INDPTRTYPP(X)=VALPTRTYP(X)^(-22)$,
LSSTEFPTRTYP(X)=.ST[X,1]<LSSTEF>$;
%V2H% !THESE MACROS HANDLE THE SETTING AND KILLING OF LABELS.
%V2H% !SETLABSIFNECESSARY IS CALLED BY THE MAIN SYNTAX ROUTINE
%V2H% !OF THE LABELED CONTROL EXPRESSION TO SET THE ALIVE BIT
%V2H% !AND THE INDEX FIELD IN THE LABEL STE. NOTE THAT
%V2H% !BOTH THESE MACROS MUST BE CALLED REGARDLESS OF THE STATE
%V2H% !OF CODETOG.
%V2H% MACRO SETLABSIFNECESSARY(CNTRLCLASS)=
%V2H% IF ((LLABIND_.LABIND) NEQ 0)
%V2H% THEN (BIRTHLABEL(IF .CODETOG THEN LOCATE(CNTRLCLASS,0)))$;
%V2H% MACRO KILLLABSIFNECESSARY=
%V2H% IF .LLABIND NEQ 0 THEN KILLLABEL(.LLABIND)$;
SWITCHES LIST; !RE-ENABLE LISTING IF NECESSARY
BEGIN ! THIS IS THE BEGINNING OF THE INNER BLOCK
!END OF BEGIN.BLI