perm filename PUBDFS.SAI[OK,TES]1 blob sn#112217 filedate 1974-07-16 generic text, type T, neo UTF8
00100	REQUIRE "VERSION" SOURCE!FILE;
00200	DEFINE		NB = "COMMENT", TES = "COMMENT", RKJ = "COMMENT", CMU = "COMMENT",
00300			PLK = "COMMENT", PJ="COMMENT",
00400	
00500		INITSIZES = "ISIZE←1000; SSIZE←200; ITSIZE←200; STSIZE←300; SIZE←100",
00600		REGULAR!SIZE = "1021", COMMENT Must be a prime ;
00700		BIG!SIZE = "2999",
00800		HUGE!SIZE = "8191", COMMENT can't exceed 2↑13-1 ;
00900	
01000	COMMENT All the output lines tentatively placed in the current frame are
01100	        stored in .PUI files and referenced by  sequential  number  from
01200	        the integer array OWLS (OWtput LineS).  Its length is sufficient
01300	        to hold every line of every column of every area in  it.     The
01400	        general   form   of   a   string   referenced   from   OWLS  is:
01500	        {<chars><cr>}...<lf> .   One of the <chars> (the last) may be  a
01600	        line  that needs to be justified in Pass Two. Each word break in
01700	        such a substring is represented by a  '13  (vert-tab)  --  these
01800	        mark  the  places that extra spaces may be added.  Pass Two also
01900	        needs to know about FONT changes -- in the present version, this
02000	        is limited to underlining, superscripts, and subscripts.  A FONT
02100	        change is signalled by the character pair '177 <code>.  Finally,
02200	        Pass Two will fill in forward references marked ALTMODE.
02300	
02400	        Other information must be known about each string in OWLS. There
02500	        must  be  an  indication  of  how  many  spaces  to  add  to   a
02600	        justify-line  during  Pass  Two,  and  there  must  be  mobility
02700	        restrictions to  assure  that  groups  stay  together  and  that
02800	        section  titles stay at tops of pages.  This information is kept
02900	        in an integer array MOLES (MObility of LinES) of the  same  size
03000	        as  OWLS.   MOLES[J]  is  the descriptor for OWLS[J].  To access
03100	        these entries,  the  value  J  is  stored  in  an  "area  array"
03200	        associated  with  the  area  the  line was placed in, at element
03300	        [C,L] for the C'th column and L'th line.
03400	
03500		A Moles descriptor looks like this:
03600	
03700		 --------------------------------------------------
03800		|       |        |L|H|L|R|A|B|              |      |
03900		|       |        |O|O|E|I|B|E|              |      |
04000		| SHORT |  FOOT  |C|R|F|G|O|L|    LABEL     | LEAD |
04100		|       |        |K|I|T|H|V|O|              |      |
04200		|       |        | |Z| |T|E|W|              |      |
04300		 --------------------------------------------------
04400		 0.....6 7.....11-2-3-4-5-6-7-18..........31 32..35 ;
     

00100	COMMENT  To  avoid  calling  POINT  to  generate  byte  pointers, we use
00200	        Swinehart's BBPP and our own BP.  BBPP(N,GLOBAL,N) is like POINT
00300	        but usually   it  will  compile  constants  instead of procedure
00400	        calls.  BP is a macro which creates a byte pointer as the sum of
00500	        a  constant  and  two  variables  or  expressions.   Instead  of
00600	        POINT(6,ARR[J+4],35), say:  BP(6,ARRIDA,J,+4,35).    The  first,
00700	        fourth,  and  fifth  arguments  will  be  ROTed and LORed into a
00800	        constant at compile time, and the second and third will be added
00900	        to  it  at execution time.  Be sure that ARRIDA points to ARR[0]
01000	        at all times, and that the fourth argument either is  absent  or
01100		is a signed integer. ;
01200	
01300		BP(S,A0,J,SIGNED!CONSTANT,P) = "(((35-(P)) ROT 6 LOR S) ROT 24 SIGNED!CONSTANT) +
01400		(A0) + (J)",
01500	
01600		    H1(WD) = "POINT(18,WD,17)", COMMENT, POINT can make constant byte pointers;
01700		    H2(WD) = "POINT(18,WD,35)",
01800		    Q1(WD) = "POINT(9,WD,8)",
01900		    Q2(WD) = "POINT(9,WD,17)",
02000		    Q3(WD) = "POINT(9,WD,26)",
02100		    Q4(WD) = "POINT(9,WD,35)",
02200	
02300	COMMENT  Fields of MOLES ;
02400	
02500		SHORTM(J) = "BP(7,MOLESIDA,""J"",,6)", COMMENT, How far short of the right
02600	            margin ADJUST line is;
02700		FOOTM(J) = "BP(5, MOLESIDA,""J"",, 11)", COMMENT,
02800	            If  this  line has footnotes, then this field is nonzero and
02900	            matches the value in the corresponding  field  of  the  last
03000	            line of its last footnote (a value of 31 means that footnote
03100	            ends in a subsequent column);
03200		LOCKM(J) = "BP(1,MOLESIDA,""J"",,12)", COMMENT, This line can not be moved;
03300		HORIZM(J) = "BP(1,MOLESIDA,""J"",,13)", COMMENT, Only move to same line no. in another column;
03400		LEFTM(J) = "BP(1,MOLESIDA,""J"",,14)", COMMENT, If moved, also move line on my left;
03500		RIGHTM(J) = "BP(1,MOLESIDA,""J"",,15)", COMMENT, ... also line on my right;
03600		ABOVEM(J) = "BP(1,MOLESIDA,""J"",,16)", COMMENT, ... also line above me;
03700		BELOWM(J) = "BP(1,MOLESIDA,""J"",,17)", COMMENT, ... also line below me;
03800			ABV = "'2000000", BLW="'1000000", ABV!BLW="'3000000",
03900		LABELM(J) = "BP(14,MOLESIDA,""J"",,31)", COMMENT,
04000		    Position in ITBL of head of L.L. of page labels of this line;
04100	        LEADM(J) = "BP(4,MOLESIDA,""J"",,35)", COMMENT, Number of lead lines to  assure  if
04200	            moved  --  this is necessary because blank lines that happen
04300	            to show up at the top of a column are deleted,  but  if  the
04400	            paragraph they lead is moved down, they must be restored;
04500	
04600	COMMENT The last subscript used in MOLES and OWLS is stored in MOLES[0];
     

00100	COMMENT The  symbol  table  method  is  hashed  strings  using quadratic
00200	        search. Swinehart's "SYMSER.SAI[1,DCS]"  has  been  used.   That
00300	        package  declares two arrays [-1:SYMNO], where SYMNO+1 is prime.
00400	        One array, SYM, holds the strings, and the other, NUMBER,  holds
00500	        their   descriptors.    The  procedure  SETSYM  initializes  the
00600	        package.  FLAG←LOOKSYM(STRING A) tells whether the string is  in
00700	        the table and sets SYMBOL to its index (or the index of where to
00800	        enter it if not there).  ENTERSYM(STRING A, INTEGER NUM)  enters
00900	        it  in  the table at SYMBOL and makes its descriptor be NUM (and
01000	        sets ERRFLAG to TRUE and prints a message if the table is full).
01100	
01200	        The compiler requires that all symbols be unique  at  any  block
01300	        level,  however,  labels  are  totally  global and although each
01400	        label must have a different name from every other label, it  may
01500	        have  the  same  name  as  another whatsit.  Therefore, before a
01600	        label is looked up or entered in the symbol table,  a  colon  is
01700	        appended to its name to guarantee its distinction.  Furthermore,
01800	        all lower case letters of every identifier are changed to  upper
01900	        case for symbol table purposes.
02000	
02100		The fields of a descriptor D = NUMBER[SYMBOL] are:
02200		 --------------------------------------------
02300		| DEPTH |    SYMBOL    | TYPE |      IX      |
02400		 --------------------------------------------
02500		 0.....4 5...........17 18..21 22..........35 ;
02600	
02700		DEPTHWD(DESC) = "POINT(5,DESC,4)", COMMENT, the block depth;
02800		DEPTHN(S) = "BP(5,NUMBIDA,""S"",+1,4)",
02900		SYMBOLWD(DESC) = "POINT(13,DESC,17)",
03000		SYMBOLN(S) = "BP(13,NUMBIDA,""S"",+1,17)", COMMENT,  This field always equals
03100	            s, its subscript in NUMBER.   When a local  declaration  in  an
03200	            inner  block  forces  an  outer  definition to be stacked, this
03300	            field of the descriptor tells where to restore it;
03400		TYPEWD(DESC) = "POINT(4,DESC,21)",
03500		TYPEN(S) = "BP(4,NUMBIDA,""S"",+1,21)", COMMENT, The symbol type (listed below);
03600		IXWD(DESC) = "POINT(14,DESC,35)", COMMENT, depending on TYPE, this may be a
03700	            case index or a 14-bit pointer to the definition in some array;
03800		IXN(S) = "BP(14,NUMBIDA,""S"",+1,35)",
03900	
04000	COMMENT The descriptor of a label, however, is:
04100		 ---------------------------------------
04200		| PLIGHT | zeroes or ones |     IX      |
04300		 ---------------------------------------
04400		   0..1    2 ......... 21   22 ..... 35 ;
04500	
04600		PLIGHTWD(DESC) = "POINT(2, DESC, 1)", COMMENT,
04700			1: Referenced but not yet defined. IX is the NUMBER posn of the mentioned Unit (or 0).
04800			2: Defined as the string in STBL[IX].
04900			0|3: Defined as a page label, but the exact page is still uncertain--
05000				DESC is a link to another label in the same plight:
05100				>0--ITBL[DESC], <0--NUMBER[-DESC], =-(2↑13)--end L.L. ;
     

00100	COMMENT  Symbol Type → IX array conversion ;
00200	
00300			COMMENT			Type		IX points to
00400						----		------------	;
00500		GLOBALTYPE="1",  COMMENT,   Global Variable	    STBL	;
00600		LOCALTYPE="2",   COMMENT,   Local Variable          SSTK	;
00700		INTERNTYPE="3",  COMMENT,   Internal Variable       none     (this is a case index);
00800		MANTYPE="6",     COMMENT,   MANUS Command Word	    none     (this is a case index);
00900		PORTYPE="10",    COMMENT,   Portion		    ITBL	;
01000		PUNITTYPE="11",  COMMENT,   Print Value of Unit     ISTK (same IX as Counter Value) ;
01100		AREATYPE="12",   COMMENT,   Area		    ISTK	;
01200		UNITTYPE="13",   COMMENT,   Unit		    ISTK	;
01300		MACROTYPE="14",  COMMENT,   Macro		    ISTK	;
01400	
01500	COMMENT  Now the STKs, TBLs, and NESTs will be introduced.
01600	
01700	ISTK....
01800	
01900		In ISTK are stored:
02000			(a) Modes and Variable Values to be restored upon block exit.
02100			(b) AREA, UNIT, MACRO, and Response Declarations local to this block.
02200			(c) Former margin positions in a NARROW/WIDEN nest.
02300		To push an m-word entry of type T onto ISTK, increment IHED by (m+1),
02400			check for stack  overflow, and put the following descriptor
02500			at ISTK(IHED):
02600	
02700			 ---------------------------------------
02800			| T | SYM subscript | old value of IHED |
02900			 ---------------------------------------
03000			0..8 9............21 22...............35
03100	
03200		Now store the entries at IHED-1 to IHED-m.  The header word at IHED is the
03300		one that IX points to. Note that it is in a linked list which is scanned at
03400		block exit to restore former conditions.
03500	
03600		The types T are as follows:	;
03700		COMMENT AREATYPE = "12", COMMENT, Local Area Declaration;
03800		COMMENT UNITTYPE = "13", COMMENT, Local Unit Declaration;
03900		COMMENT MACROTYPE = "14", COMMENT, Local Macro Declaration;
04000			RESPTYPE = "15", COMMENT, Local Response Declaration;
04100			MARGTYPE = "16", COMMENT, Former margin positions in a NARROW//WIDEN Nest;
04200			TURNTYPE = "17", COMMENT, Former <chars><function> pair;
04300			MODETYPE = "18", COMMENT, Mode Words before block entry;
04400			NUMTYPE = "19", COMMENT, Former NUMBER descriptor;
04500			TABTYPE = "20", COMMENT, tab stops ;
04600			MIDTYPE = "21", COMMENT, saved paragraph params for BEFORE|AFTER|footnotes in mid-pgph ;
04700			FONTYPE = "22", COMMENT, Former font settings TES 11/15/73;
04800			PITYPE = "23", COMMENT, Former PiCHAR definitions TES 11/29/73 ;
04900	
05000		IXTYPE(ANYIX) = "(ISTK[ANYIX] ROT 9 LAND '777)",
05100		BIXNUM(NAMED) = "BP(13, ISTKIDA, ""NAMED"", , 21)",
05200		IXOLD(ANYIX) = "(ISTK[ANYIX] LAND '37777)",
     

00100	COMMENT Fields of Entries in ISTK ;
00200	
00300		PIWDS = "2",
00400		PIKEY(PI) = "ISTK[(PI)-1]", COMMENT the char after pi;
00500		PIVAL(PI) = "ISTK[(PI)-2]", COMMENT the string in SSTK that it emits;
00600	
00700		MARGWDS = "4",
00800		LMARGX(MARG) = "ISTK[(MARG)-1]",
00900		RMARGX(MARG) = "ISTK[(MARG)-2]",
01000		OLD!MARGX(MARG) = "ISTK[(MARG)-3]",
01100		AREAX(MARG) = "ISTK[(MARG)-4]", COMMENT, ISTK IX of AREA with these margins ;
01200	
01300		FONTWDS = "4", COMMENT TES 11/15/73 ;
01400		THISFONTX(FONT) = "ISTK[(FONT)-1]", COMMENT OF OUTER BLOCK ;
01500		OLDFONTX(FONT) = "ISTK[(FONT)-2]",
01600		OUTERX(FONT) = "ISTK[(FONT)-3]",
01700		COMMENT TES same as for MARG:  AREAX(FONT) = "ISTK[(FONT)-4]";
01800	
01900		TURNWDS = "1", COMMENT, CHR, FUN 7 bits each, to TURN back ON previous meaning;
02000	
02100		NUMWDS = "1",
02200		OLD!NUMBER(SYM) = "ISTK[(SYM)-1]",
02300	
02400		AREAWDS = "17",
02500		DISD(AREA!UNIT) = "ISTK[(AREA!UNIT)-1]", COMMENT, TRUE if disdeclared ;
02600		FULHIGH(AREA) = "ISTK[(AREA)-2]", COMMENT, 1 iff no LINES clause ;
02700		LINE1(AREA) = "ISTK[(AREA)-3]", COMMENT, Top line number used;
02800		LINECT(AREA) = "ISTK[(AREA)-4]", COMMENT, Number of lines used;
02900		FULWIDE(AREA) = "ISTK[(AREA)-5]", COMMENT, 1 iff no CHARS clause ;
03000		CHAR1(AREA) = "ISTK[(AREA)-6]", COMMENT, Leftmost character position;
03100		CHARCT(AREA) = "ISTK[(AREA)-7]", COMMENT, Width of whole area;
03200		TEXTAR(AREA) = "ISTK[(AREA)-8]", COMMENT, 1=TEXT AREA, 0=TITLE AREA;
03300		COLCT(AREA) = "ISTK[(AREA)-9]", COMMENT, Number of columns;
03400		COLWID(AREA) = "ISTK[(AREA)-10]", COMMENT, Width of each column;
03500		OLD!ACTIVE(AREA) = "ISTK[(AREA)-11]", COMMENT, If Open, array descriptor of active area in OLDPAGE;
03600		NEW!ACTIVE(AREA) = "ISTK[(AREA)-12]", COMMENT, If Open, array descriptor of active area in NEWPAGE;
03700			OPEN!ACTIVE(AREA) = "ISTK[(AREA)-
03800				(IF FRAMEIDA=NEWPGIDA≠0 THEN 12 ELSE 11)]",
03900				COMMENT "≠0" ABOVE ADDED APRIL 22, 1973 BY TES ;
04000		FOOTSTR(AREA) = "ISTK[(AREA)-13]", COMMENT, SSTK subscript of SEND FOOT string ;
04100		MARGINS(AREA) = "ISTK[(AREA)-14]", COMMENT, ISTK IX of MARGTYPE entry ;
04200		FONTS(AREA) = "ISTK[(AREA)-15]", COMMENT TES 11/15/73 ISTK IX of FONTTYPE entry ;
04300		TFONT(AREA) = "ISTK[(AREA)-16]", COMMENT TES 11/15/73 THISFONT;
04400		OFONT(AREA) = "ISTK[(AREA)-17]", COMMENT TES 11/15/73 OLDFONT ;
04500	
04600		UNITWDS = "12",
04700	COMMENT DISD(AREA!UNIT) = "ISTK[(AREA!UNIT)-1]", COMMENT, see area def above;
04800		CTR!INIT(UNIT) = "ISTK[(UNIT)-2]", COMMENT, FROM initial value + 2↑14 ;
04900		CTR!STEP(UNIT) = "ISTK[(UNIT)-3]", COMMENT, BY step-value + 2↑6 ;
05000		PATT!CHRS(UNIT) = "ISTK[(UNIT)-4]", COMMENT, estimate based on chars in patterned TO value;
05100		CTR!CHRS(UNIT) = "ISTK[(UNIT)-5]", COMMENT, estimate based on unpatterned TO value;
05200		PARENT(UNIT) = "ISTK[(UNIT)-6]", COMMENT, IX of parent unit;
05300		PATT!PARENT(UNIT) = "ISTK[(UNIT)-7]", COMMENT, whether ! occurs in pattern;
05400		PATT!ALF(UNIT) = "ISTK[(UNIT)-8]", COMMENT, alphabet to convert CTR!VAL to:
05500			PATT!ALF...	0	1	2	3	4	5
05600			alphabet... template	1	i	I	a	A	;
05700	
05800		PATT!STRS(UNIT) = "ISTK[(UNIT)-9]", COMMENT, pointer to strings in SSTK;
05900		SON(UNIT) = "ISTK[(UNIT)-10]", COMMENT, IX of youngest son unit ;
06000		BROTHER(UNIT) = "ISTK[(UNIT)-11]", COMMENT, IX of brother unit ;
06100		IN!LINE(UNIT) = "ISTK[(UNIT)-12]", COMMENT, TRUE if INLINE option present ;
     

00100		MACROWDS = "4", RESPWDS  = "7", SIGWDS = "9",
00200		BODY(DEF) = "ISTK[(DEF)-1]", COMMENT, points to body string in SSTK;
00300		NAMEPAR(MACRO) = "ISTK[(MACRO)-3]", COMMENT, LAND 2↑(ARGS-n) says n'th arg is by name;
00400		NUMARGS(DEF) = "ISTK[(DEF)-2]", COMMENT, no. of formal parameters;
00500		ODDMAC(MACRO) = "ISTK[(MACRO)-4]", COMMENT, 1 for ODD MACRO, 0 for [EVEN] MACRO;
00600		OLD!RESP(RESP) = "ISTK[(RESP)-3]", COMMENT, former response+200 or (<200) breaktable value;
00700		DEPTH!RESP(RESP) = "ISTK[(RESP)-4]", COMMENT, block level (unimplemented) ;
00800		NEXT!RESP(RESP) = "ISTK[(RESP)-5]", COMMENT, another resp. with similar recognizer;
00900		CLUE(RESP) = "ISTK[(RESP)-6]", COMMENT, encoding of the recognizer;
01000		VARIETY(RESP) = "ISTK[(RESP)-7]", COMMENT, see Table below ;
01100		SIGNAL(RESP) = "ISTK[(RESP)-8]", COMMENT, ASCII of Signal;
01200		RESP!SEP(RESP) = "ISTK[(RESP)-9]", COMMENT, ASCII of seps (up to 5), right byte=last sep;
01300	
01400	COMMENT NEXT!RESP and CLUE for each VARIETY of response declaration:
01500	
01600		Declaration	VARIETY		CLUE		NEXT!RESP with
01700		-----------	-------	----------------------	--------------
01800		AT <e>		   0	Pointer to <e> in SSTK	Same 1st letter & 2d letter|non-letter-ness
01900		AT <n>		   1		  n		Next larger n
02000		AT <signal>	   2     Number of characters	Same first char
02100		AFTER <area|unit>  3    Symb. no. of area|unit  (WAITRESP link only)
02200		BEFORE ...	   4            "                      "
02300	
02400	ITBL....
02500	
02600		Has (1) Labels generated by {PAGE}. The entry looks like a
02700			NUMBER entry for a label, except PLIGHT is never 1.
02800		    (2) Portion declarations--NOTE: no word may have left half = '400000;
02900			PORCH(PORT) = "ITBL[PORT]", COMMENT, 0-15: channel SENDing to,
03000				-1: FOOT, -2: declared but never SENT to, -3: sent to & declared but not RECEIVEd,
03100				-4: already RECEIVEd, -5: only mentioned in INSERT, -6: RECEIVEd AND Alphabetized ;
03200			PORSEQ(PORT) = "ITBL[(PORT)-1]", COMMENT, pointer to next PORTION in collating sequence ;
03300			PORSTR(PORT) = "ITBL[(PORT)-2]", COMMENT, pointer to STBL ;
03400		COMMENT
03500	SSTK....
03600		Has (1) Values of Local Variables
03700		    (2) Macro, Response, and Prepare Bodies
03800		    (3) Unit PATT!STRS;	PATT!VAL(PS) = "SSTK[PS]", COMMENT, current printing value;
03900					CTR!VAL(PS) = "SSTK[(PS)-1]", COMMENT, current counter value ;
04000					PREFIX(PS) = "SSTK[(PS)-2]", COMMENT, before ! OR template;
04100					INFIX(PS) = "SSTK[(PS)-3]", COMMENT, between ! and alphabet;
04200					SUFFIX(PS) = "SSTK[(PS)-4]", COMMENT, after alphabet .
04300		    (4) SEND FOOT Strings for each declared AREA.
04400		    (5) PICHAR Old values. (see PIVAL)
04500	
04600	STBL....
04700		Has (1) Values of Global Variables
04800		    (2) Values of Labels (set to '0&<last unit specified--SYMBOL no.>
04900			if undefined, so MANUS can check consistency of use)
05000		    (3) Current file-block for every generated file getting sent to;
05100			PORFIL(SPORT) = "STBL[(SPORT)]", COMMENT, generated file name ;
05200			PORINT(SPORT) = "STBL[(SPORT)+1]", COMMENT, intermed. file name ;
     

00100		COMMENT
00200	
00300	SNEST...
00400		Has (1) Input strings to scan.  They nest due to macro calls,
00500			responses, argument substitutions, RECEIVEs, and
00600			REQUIREs.  This nesting is not synchronized with that
00700			of blocks, because a macro or argument body or a source
00800			file may have unmatched BEGINs, etc., so a separate
00900			stack is required.
01000		    (2) Saved line number for previous source:
01100			The first six characters are the file name ;
01200		STRSCAN(S) = "SNEST[(S)-1]", COMMENT, a string to scan (STRSCAN(LAST)
01300			is the current one);
01400		LINESCAN(S) = "SNEST[S]", COMMENT, MACLINE or SRCLINE ;
01500	
01600		COMMENT
01700	
01800	INEST...
01900		Has (1) Input channels to scan.  When reading from a file,
02000			just  its channel number is kept instead of the whole
02100			string of course.  However, a whole line at a time is
02200			stripped and scanned as if it were an input string.
02300		    (2) Saved SOS page number for previous input file;
02400		CHANSCAN(S) = "INEST[(S)-1]", COMMENT, the channel number of a file to
02500			scan (CHANSCAN(LAST) is the current one or -1 if none)
02600			TECO files: channel no. stored here excess 100 ;
02700		PAGESCAN(S) = "INEST[S]", COMMENT, LH=PAGEMARKS  RH=PAGEWAS   Negated by RECEIVE if GEN-file;
02800	
02900	COMMENT These are our DEVICE numbers;
03000		LPT = "1",
03100		TTY = "2",
03200		MIC = "3",
03300		XGP = "4",
03400	
03500	COMMENT These are definctions to compare strings;
03600		NULSTR(S) = "(LENGTH(S) = 0)",
03700		FULSTR(S) = "(LENGTH(S) ≠ 0)",
03800		FALSTR(S) = "EQU(S, ""0"")",
03900		TRUESTR(S) = "¬EQU(S, ""0"")",
     

00100	COMMENT A record of each active frame and area is  kept  in  a  dynamically
00200	        created   array.    Swinehart's  ARRSER.SAI  package  creates  such
00300	        arrays.  The array may be  represented  by  an  integer  descriptor
00400	        (we'll  call it the array's IDA) which can be assigned to any array
00500	        of variable upper bound  (the  array's  ALIAS).    Frame  and  area
00600	        records  contain  IDAs of other records and of dynamic MOLES, OWLS,
00700	        and area-arrays.  All these  arrays  must  be  dynamically  created
00800	        because  their  existence is independent of block nests and even of
00900	        their declarations -- for example, a BOX and its areas may be  held
01000	        over for several pages before insertion.  THE FIRST ELEMENT OF EACH
01100	        SUCH STRING ARRAY IS NOT A STRING BUT A GARBAGE-COLLECT LINK!!!
01200	
01300	        Two pages may be open at once, due to group overflow or to  closing
01400	        of one text area while others are still open. ;
01500	
01600	COMMENT	Here are the Aliases of the dynamic arrays:
01700	
01800		IDA		ALIAS		Represents
01900		---		-----		--------------------------------------
02000		OLDPGIDA	OLDPAGE		Partly completed open page.
02100		NEWPGIDA	NEWPAGE		Overflow from OLDPAGE.
02200		FRAMEIDA	THISFRAME	Record of Frame we're PLACing in (PAGE or BOX).
02300		MOLESIDA	MOLES			Its MOLES array.
02400		OWLSIDA		OWLS			Its OWLS array.
02500		AREAIDA		THISAREA	Record of Area we're placing in.
02600				AA			Its Area-Array.
02700		WBOXIDA		WAITBOX		Head of L.L. of Boxes held over.
02800	
02900		A Frame Record is an integer array symbolized THISFRAME[0:PFREC|BFREC]: ;
03000		PFREC = "5", BFREC = "21",
03100			ARF = "THISFRAME[0]", COMMENT, head of LL of its area records;
03200			OWLSF = "THISFRAME[1]", COMMENT, IDA of its OWLS array;
03300			MOLESF = "THISFRAME[2]", COMMENT, IDA of its MOLES array;
03400			HIGHF = "THISFRAME[3]", COMMENT, n HIGH;
03500			WIDEF = "THISFRAME[4]", COMMENT, v WIDE;
03600			SHORTF = "THISFRAME[5]", COMMENT, new SHORTM array for XGP;
03700	COMMENT The rest apply only to a BOX FRAME;
03800			ULLB = "THISFRAME[6]", COMMENT, Upper Left Line covered in containing area INB;
03900			ULCB = "THISFRAME[7]", COMMENT, Upper Left Char covered;
04000			INB = "THISFRAME[8]", COMMENT, symbol no. of containing area;
04100			NEXTB = "THISFRAME[9]", COMMENT, link to next BOX -- two cases:
04200				If this box is held over → next such box in WAITBOX L.L.
04300				Otherwise → next box in this area (BOXA L.L.)	;
04400			comment, NEAR <where> encoded:  about 12 words ;
     

00100	COMMENT An Area Record is an integer array symbolized THISAREA[0:AREC] -- ;
00200		AREC = "13",
00300		AAA = "THISAREA[0]", COMMENT, IDA of Area-Array (a 2-D array);
00400		ARA = "THISAREA[1]", COMMENT, IDA of next area record in this frame (ARF L.L.);
00500		OLD!ACTA = "THISAREA[2]", COMMENT, IDA of area record in up-level frame ;
00600		BOXA = "THISAREA[3]", COMMENT, IDA of first BOX in this area;
00700		INA = "THISAREA[4]", COMMENT, IDA of containing frame;
00800		STATA = "THISAREA[5]", COMMENT, Status:
00900			Unopened=0  Open=1  Closed=2  Dis-Declared=4	;
01000		DEFA = "THISAREA[6]", COMMENT, ptr to definition in ISTK (or 0 if none);
01100		COMMENT If the area is open-- ;
01200			NBOXA = "THISAREA[7]", COMMENT, number of BOXes in the BOXA L.L.;
01300			COLA = "THISAREA[8]", COMMENT, column we're PLACing in;
01400		COMMENT If the area is closed or dis-declared-- ;
01500			LINECA = "THISAREA[9]", COMMENT, LINECT copied from ISTK ;
01600			COLCA = "THISAREA[10]", COMMENT, COLCT copied from ISTK ;
01700			ULLA = "THISAREA[11]", COMMENT, LINE1(AREA) copied from ISTK;
01800			COMMENT and AA[i,0] tells upper left character posn of column i ;
01900		XGENA="THISAREA[12]" , COMMENT, XGENLINES FOR AREA;COMMENT  RKJ;
02000		OVERA="THISAREA[13]", COMMENT TES 11/14/73 OVEREST for col-1 of area;
02100	
02200	COMMENT The Area-Array of a D-column M-line area is an integer array AA[1:2*D,0:M].
02300	
02400		                  	   Column  1	     Column  2	       Column 3	   ...
02500					 "Leg"     Foot	    Leg      Foot     Leg      Foot	  ...
02600		lines already used *	AA[1,0] AA[D+1,0] AA[2,0] AA[D+2,0] AA[3,0] AA[D+3,0]	...
02700		J'th line       	AA[1,J] AA[D+1,J] AA[2,J] AA[D+2,J] AA[3,J] AA[D+3,J]	...
02800				(*): H2=last placed line, H1=lines beneath covered by BOXes;
     

00100	COMMENT These "mode words" are BLT'ed to ISTK upon block entry ;
00200	
00300		MODEWDS = "20" ;
00400	
00500	TERNAL INTEGER	BREAKM ; comment Break Mode ; DEFINE
00600		FILL="(BREAKM=0)", NOFILL = "(BREAKM≠0)", JUSTJUST="(BREAKM=1)", FLUSHL="(BREAKM=2)",
00700		FLUSHR="(BREAKM=3)", CENTER="(BREAKM=4)", IMPOSE="(BREAKM=5)", VERBATIM="(BREAKM=6)",
00800		REGNOFILL = "(BREAKM=7)" ;
00900	TERNAL INTEGER	JUSTM ; DEFINE ADJUST="(JUSTM=1)", NOJUST="(JUSTM=0)" ;
01000	TERNAL INTEGER	SPACEM ; DEFINE COMPACT="(SPACEM=2 ∨ FILL∧SPACEM=1)", RETAIN="(¬COMPACT)" ;
01100	TERNAL INTEGER CRBM ; DEFINE CRBREAK="(CRBM=1)", CRSPACE="(CRBM=0)" ;
01200	TERNAL INTEGER	TWEENLFM, comment, N-1 from SUPERIMPOSE N;
01300			SINCELFM, comment, count no-LF lines;
01400			FIRSTIM, comment, f from INDENT f,r ;
01500			RESTIM, comment, r from INDENT f,r ;
01600			RIGHTIM, comment, g from INDENT f, r, g ;
01700	
01800			GROUPM, comment, GROUP=1  APART=0;
01900			GLINEM, comment, MOLES Posn of 1st output line in the group;
02000			AREAIXM, comment, ISTK posn of Place Area;
02100	
02200			TABTAB, comment either 0 or what TAB is TURNed ON as ;
02300	
02400			LEADFM, comment, PREFACE in FILL mode ;
02500			LEADNM, comment, PREFACE in NOFILL mode ;
02600			SPREADM, comment, SPREAD, e.g., SINGLE SPACE → 1;
02700			ENDCASE, comment, how this block began: BEGIN=1 ONCE=2 BEFORE|AFTER|FOOTNOTES=3 ;
02800			STARTS, comment, clump depth in this block ;
02900			SHED , comment, Top of SSTK ;
03000			OLDIHED; COMMENT TES 11/15/73 OLD ISTK TOP ;
03100	
03200		COMMENT TES 11/15/73 OLDFONT + THISFONT moved to last page ;
03300	
03400	COMMENT Several linked list  scans  use  these  macros  to  generate  code.
03500		LLHEAD symbolizes a variable pointing to the first element.
03600		LLNEXT(x) would determine the successor to x. The global variables
03700	        LLPREV, LLTHIS, and LLPOST display the result of the scan. ;
03800	
03900	DEFINE	LLSCAN(LLHEAD, LLNEXT, LLSTOP) = "
04000			BEGIN LLTHIS ← LLHEAD MAX 0 ; LLPREV ← -1 ;
04100			WHILE LLTHIS ∧ ¬(LLSTOP) DO
04200				BEGIN
04300				LLPREV ← LLTHIS ; LLTHIS ← LLNEXT(LLTHIS) ;
04400				END ;
04500			LLPOST ← IF LLTHIS THEN LLNEXT(LLTHIS) ELSE 0 ;
04600			END",
04700		LLSKIP(LLHEAD, LLNEXT) = "
04800			IF LLPREV<0 THEN LLHEAD ← LLPOST
04900			ELSE LLNEXT(LLPREV) ← LLPOST ",
05000		LLINS(LLHEAD, LLNEXT, LLNEW) = "
05100			BEGIN
05200			IF LLPREV < 0 THEN LLHEAD ← LLNEW ELSE LLNEXT(LLPREV) ← LLNEW ;
05300			LLNEXT(LLNEW) ← LLTHIS ;
05400			END",
     

00100	COMMENT These are for scanners;
00200		LETTS = """!_QWERTYUIOPLKJHGFDSAZXCVBNMzxcvbnmlkjhgfdsaqwertyuiop""",
00300		DIGS = """0123456789""",
00400		CR = "'15", LF = "'12", SP = "'40", TB = "'11", FF = "'14", CRLF = "(CR&LF)",
00500		RUBOUT = "'177", VT = "'13", BAR = "'30", EOL = "'37",
00600		CTLA = 1, CTLS = 19, CTLV = 22,
00700		ALTMODE=IFC TENEX THENC "'33" ELSEC
00800			IFC VERSION=SAILVER THENC "'175" ELSEC "'176" ENDC
00900			ENDC,
01000		RCBRAK=IFC VERSION=SAILVER THENC "'176" ELSEC "'175" ENDC,
01100	
01200	COMMENT For the parser;
01300		SPASS(X) = "((X&NULL)&PASS)",
01400		IPASS(X) = "((X+0)+PASS)",
01500		DPASS = "BEGIN DCLR!ID←TRUE ; PASS; DCLR!ID←FALSE END",
01600		EMPTYTHIS = "BEGIN THISTYPE ← -EMPTYQ ; THISWD ← NULL END",
01700		EMPTYTHAT = "BEGIN THATTYPE ← -EMPTYQ ; THATWD ← NULL END",
01800		THISISFULL = "(THISTYPE ≠ -EMPTYQ)", THATISFULL = "(THATTYPE ≠ -EMPTYQ)",
01900		THISISID = "(THISTYPE ≥ 0)", THATISID = "(THATTYPE ≥ 0)",
02000		THISISCON = "(THISTYPE = -1)", THATISCON = "(THATTYPE = -1)",
02100		ITS(LIT) = "EQU(THISWD,""LIT"")", ITSV(EX) = "EQU(THISWD,EX)",
02200		NEXTS(LIT) = "EQU(THATWD,""LIT"")", NEXTSV(EX) = "EQU(THATWD,EX)",
02300		ITSCH(CHR) = "THISWD = ""CHR""", NEXTSCH(CHR) = "THATWD = ""CHR""",
02400	
02500	COMMENT  The  character  Table  CHARTBL  categorizes  each of the 128 ASCII
02600	        characters for both the  Parser  and  the  Filler.    SPCODE  is  a
02700	        variable  field  set  by TURN ON (and reset by TURN OFF) to a value
02800	        fetched from the constant field SPCHAR.;
02900	
03000		UPCASE(CH) = "BBPP(7, CHARTBL[0], 6) + (CH)",
03100		FAMILY(CH) = "BBPP(5, CHARTBL[0], 11) + (CH)",
03200		SPECIES(CH) = "BBPP(5, CHARTBL[0], 17) + (CH)",
03300		SPCODE(CH) = "BBPP(6, CHARTBL[0], 35) + (CH)",
03400		SPCHAR(CH) = "BBPP(6, CHARTBL[0], 26) + (CH)",
03500		COMMENT and Bit 29 is set for Invisibles ;
03600	
03700			COMMENT   Table of Character Families and Species
03800	
03900					    S       P       E       C       I       E       S
04000	       F  A  M  I  L  Y		0	1	2	3	4	5	6 .....	26
04100	       ----------------	      -----  ------- ------- -------- -----   -----   -----    ----	;
04200		LETTQ	= " 0",COMMENT 	Aa	Bb	Cc	Dd	Ee	Ff	Gg ....	!_	;
04300		DIGQ	= " 1",COMMENT 	0	1	2	3	4	5	6 ...  		;
04400		EMPTYQ	= " 2"	  ,
04500		TERQ	= " 3",COMMENT 	}      ; COMMENT )	,	]	⊂			;
04600		QUOTEQ	= " 4",COMMENT 	"	'							;
04700		DOLLARQ	= " 5",COMMENT 	$								;
04800		BROKQ	= " 6",COMMENT 	[								;
04900		MULQ	= " 7",COMMENT 	*    / DIV %   MOD	&					;
05000		ADDQ	= " 8",COMMENT 	+	-    EQV≡ABS	↑    XOR⊗LENGTH				;
05100		BOUNDQ	= " 9",COMMENT  MAX     MIN							;
05200		ODDQ	= "10",COMMENT  EVEN    ODD							;
05300		RELQ	= "11",COMMENT 	<	>	=     ≤ LEQ   ≥ GEQ   ≠ NEQ			;
05400		NOTQ	= "12",COMMENT¬ NOT								;
05500		ANDQ	= "13",COMMENT∧ AND								;
05600		ORQ	= "14",COMMENT∨ OR								;
05700		MISCQ	= "15",COMMENT rest	:	←	(	∞	@	|	ε	;
05800				MISCMAX = "7", COMMENT, Highest numbered species in MISCQ ;
     

00100	COMMENT Run-of-mill defines;
00200		TWO(X) = "(1 LSH (X))",
00300		THRU = "STEP 1 UNTIL",
00400		DOWN = "STEP -1 UNTIL",
00500		FALSE = "0", TRUE = "-1",
00600		LOPP(STR) = "DUMMY ← LOP(STR)",
00700		COPY(STR) = "BEGIN STR ← 0&STR ; LOPP(STR) END",
00800		LH(X) = "((X) LSH -18 LAND '777777)",
00900		RH(X) = "((X) LAND '777777)",
01000		LHRH(X,Y) = "((X) LSH 18 LOR (Y))",
01100		WDBRK = "ALTMODE", FONTCHAR = "'177",
01200		CVSR(N) = "CVS(N) & ALTMODE",
01300	
01400	COMMENT Break Tables;
01500		TO!VT!SKIP = "15",
01600		TO!COMMA!RPAR = "14",
01700		TO!TERQ!CR = "13",
01800		TO!SEMI!SKIP = "12", COMMENT, for COMMENT comments;
01900		NO!CHARS = "11",
02000		ONE!CHAR = "10", COMMENT, break on aything and append;
02100		LOCAL!TABLE = "9", COMMENT, Do a SETBREAK before using this one;
02200		TO!TB!FF!SKIP = "8", COMMENT, to scan a line number (ignores line feed);
02300		TO!LF!TB!VT!SKIP = "7", COMMENT, to swallow a whole line;
02400		TO!VISIBLE = "6",
02500		ALPHA = "5",
02600		DIGITA = "4",
02700		TO!QUOTE!APPD = "3",
02800		TO!NON!SP = "2",
02900		TEXT!TBL = "1",
03000		TO!CR!SKIP = "16", COMMENT for VERBATIM text lines ;
03100		TO!VBAR!SKIP = "17",
03200		DEFN!TABLE = "18",
03300	
03400	COMMENT Buggy Printout ;
03500		DARN = "WARN",
03600		λ = "& "","" &",
03700		VS(SVAR) = " "" SVAR="" & SVAR ",
03800		VI(IVAR) = " "" IVAR="" & CVS(IVAR) ",
03900		MESSMAX = "3",
04000	
04100		VIRGIN = "NULL" ; NB End DEFINE ;
     

00100	TERNAL SAFE INTEGER ARRAY
00200		COMMENT PHRASED ARRAY REMOVED TES 11/15/73;
00300		SIGNALD[0:127], COMMENT, detect last character of signal to trigger response search;
00400		CHARTBL[0:150], COMMENT, current classification and mapping of characters;
00500		INPG[0:10], COMMENT, 1 to 10 mTnP options;
00600		TABSORT[1:28], COMMENT, tab stops in increasing order;
00700		ETCIARRAYS[0:0];
00800	
00900	DEFINE MAXBLNMS = IFC VERSION=CMUVER THENC "180" ELSEC "40" ENDC ; TES 11/20/73 ;
01000	RKJ: 5-30-74 - Newcomer does much recursion with blocknames ;
01100	
01200	PRELOAD "MONTH TABLE", "January ", "February ", "March ", "April ",
01300			"May ", "June ", "July ", "August ", "September ", "October ",
01400			"November ", "December " ;
01500	TERNAL STRING ARRAY
01600		MONTH[0:12], COMMENT MUST BE FIRST!! To compute DATE for macros to print ;
01700		BLKNAMES[0:MAXBLNMS], COMMENT, clump and block names ;
01800		PICHAR[0:127], COMMENT, Current meanings of PI CHARacters,
01900			in the form: F N k B1 ... Bk		TES 11/29/73
02000			where WIDTH = if F='177 then CW[N] else FN ;
02100		MESSAGE[1:MESSMAX], COMMENT, Short error messages to print on document in D mode. ;
02200		NULLS[0:10], COMMENT, always NULLs;
02300		ETCSARRAYS[0:0] ;
02400	
02500	PRELOAD
02600		"ADJUST",	"AFTER",	"APART",	"AREA",		"AT",
02700		"BEFORE",	"BEGIN",	"BELOW",	"BLANKPAGE",	"BOXFRAME",
02800		"BREAK",
02900		"CC",		"CENTER",	"CLOSE",   "COMMANDCHARACTER",	"COMMENT",
03000		"COMPACT",	"CONTINUE",	"COUNT",	"CRBREAK",	"CRSPACE",
03100		"DEVICE",
03200		"END",
03300		"FILL",		"FLUSHLEFT",	"FLUSHRIGHT",	"FONT",
03400		"GROUP",	"GROUPSKIP",
03500		"IF",		"INDENT",	"INSERT",
03600		"JUSTJUST",
03700		"LET",		"LOCK",
03800		"MACRO",
03900		"NARROW",	"NEXT",		"NOFILL",	"NOJUST",
04000		"ONCE",
04100		"PACK",		"PAGEFRAME",	"PICHAR",	"PLACE",
04200		"PORTION",	"PREFACE",
04300		"RECEIVE",	"RECURSIVEMACRO",		"REQUIRE",	"RETAIN",
04400		"SELECT",	"SEND",		"SHOW",		"SKIP",		"START",
04500		"SUPERIMPOSE",
04600		"TABS",		"TEXTAREA",	"TITLEAREA",	"TURNOFF",	"TURNON",
04700		"USERERR",
04800		"VARIABLE",	"VERBATIM",
04900		"WIDEN",
05000		NULL ;
05100	TERNAL STRING ARRAY MANWD[0:66] ; comment, Only first words of commands are reserved ;
05200	
05300	PRELOAD NULL, " ", "  ", "   ", "    ", "     ", "      ",
05400		"       ", "        ", "         ", "          " ;
05500	TERNAL SAFE STRING ARRAY SPSARR[0:10] ;
     

00100	DEFINE DSCR="COMMENT ";
00200	DSCR **** DYNAMIC ARRAY MANIPULATION PACKAGE ****
00300	
00400	
00500	
00600	;
00700		
00800	
00900	DEFINE TEMPO="'14", LPSA="'13";
01000	EXTERNAL INTEGER SIMPLE PROCEDURE LRMAK(INTEGER L,H,D);
01100	EXTERNAL INTEGER SIMPLE PROCEDURE LRCOP(INTEGER A);
01200	EXTERNAL SIMPLE PROCEDURE ARYEL(INTEGER I);
01300	
01400	DSCR PTR ← CREATE(LOWBND,HIBND)
01500	CAL MACRO -- EXPRESSION
01600	PAR LOWBND IS LOWER BOUND FOR INTEGER ARRAY
01700	 HIBND IS UPPER BOUND
01800	RES PTR IS AN ARRAY DESCRIPTOR
01900	DES CALLS LRMAK TO GET AN UNMARKED ARRAY
02000	;
02100	
02200	DEFINE CREATE(L,H)= "LRMAK(L,H,1)";
02300	
02400	DSCR MAKEBE(PTR,ARRAY)
02500	CAL MACRO -- STATEMENT
02600	PAR PTR IS INTEGER HOLDING ARRAY DESCRIPTOR
02700	 ARRAY IS DUMMY TO RECEIVE DESCRIPTOR (DON'T LEAVE THAT BLOCK!)
02800	DES EFFECT IS "ARRAY←PTR", BUT SAIL WON'T DO THAT DIRECTLY
02900	;
03000	
03100	DEFINE MAKEBE(I,A)="
03200	 START!CODE
03300	  MOVE TEMPO,I;
03400	  MOVEM  TEMPO,A;
03500	 END ";
03600	
03700	DEFINE IDASSIGN(EX,ALIAS)="BEGIN DUMMY←EX; 
03800		IF DUMMY ≤ 0 THEN WARN(NULL,""NEGATIVE ALIAS FOR INTEGER ARRAY"") ELSE comment ************* ;
03900		MAKEBE(DUMMY, ALIAS) END" ;
04000	
04100	DEFINE SMAKEBE(I, A) = "START!CODE HRRO TEMPO,I ; MOVEM TEMPO, A ; END",
04200		SIDASSIGN(EX, ALIAS) = "BEGIN DUMMY←EX ; SMAKEBE(DUMMY, ALIAS) END" ;
     

00100	TERNAL INTEGER
00200		SYMNO, comment, size of hashed SYMBOL Table;
00300		XSYMNO, comment, size of SYM and NUMBER--first SYMNO elemts hash-searched, rest linear- searched;
00400		ISIZE, SSIZE, ITSIZE, STSIZE, SIZE, comment of ISTK,SSTK,ITBL,STBL,NESTs;
00500		IHED,         IHIGH,  SHIGH,  LAST, comment last used (highest unavailable) subscript;
00600		OLX,NOLX,GRPOLX,GRPTOP, OLXX, OLMAX, comment,
00700			used words of OWLS, LENGTH(OWLS), total of all declared areas;
00800		EOF, BRC, FLAG, comment, I/O control variables;
00900		CONTENTS, DEBUG, DEVICE, comment, RPG-derived switches;
01000		LMARG, RMARG, comment, margin settings in this area;
01100		ODDLEFTBORDER, EVENLEFTBORDER, comment, TES 6/11/74 XGP side margins in mills ;
01200		OAKS,POSN, BRKPT,BRKPOSN,BRKXPOSN,BRKFAKE,  BRKABX, BRKBLX,
01300		BRKSPCS, JUSTIFY, LASTWDBRK,  BRKPLBL, TABI,RBOUND,
01400		MAXIM,FMAXIM,NMAXIM, comment, Line-Filler (OWL) variables;
01500		STANDARD, comment, ptr to def in ISTK of MACRO !STANDARD;
01600		INSETS, comment, ptr to AT <n> of smallest n (ISTK ptr);
01700		INPUTCHAN, TECOFILE, comment, current input channel ;
01800		INPGS, INPGX,comment, last and current subscript in array INPG of mTnP options;
01900		SWDBACK, comment, -1=just SWICHBACKed from a file, +1=just WARNed ;
02000		PUBSTD, comment, whether compiling PUBSTD.DFS (suppress pgno display) ;
02100		ONE, comment, 1 for variable upper bound of ALIAS arrays;
02200		TAG, comment, STBL address of variable TAG;
02300		MANUS!SKIP!, comment, !SKIP! value after execution of MANUS substring operation;
02400		INF, comment, ∞ value for current MANUS substring spec;
02500		I, J, K, L, M, N, DUMMY, comment, short-term loan currency ;
02600		DEPTH, comment, block depth -- MANWDS are at 0, main program at 1;
02700		ON, comment, FALSE if parsing false part of conditional or if defining a response body;
02800		FHIGH, FWIDE, PHIGH, PWIDE, comment, Dimensions of the current Frame and Page Frame;
02900		EPSCHAR, comment, char serving { function ;
03000		PAGEMARKS, PAGEWAS, comment, no. of PM's on this page: passed, responded to ;
03100		RESP!BODY, comment, TRUE if defining a response body;
03200		DCLR!LET, comment, TRUE if scanning after = of `LET X=..';
03300		DCLR!ID, comment, TRUE if in a declaration scanning an identifier that is to be declared;
03400		DEFINING, comment TRUE if reading ⊂definition⊃ ;
03500		WAITRESP, comment, head of LL of Responses to undeclared areas and units;
03600		LEADRESPS, comment, head of LL of "AT n" responses, in ascending order by n ;
03700		COMMAND!CHARACTER, TAB!CHARACTER,
03800		PORTS, THISPORT, SEQPORT, PORTLL, comment, Portions: # of, last declared, last in seq, seq LL;
03900		INTER, SINTER, INTERS, comment Intermediate output channel, no. of intermediate output files ;
04000		STATUS, comment, Current place area UNOPENED (0), OPEN (1), CLOSED (2), GONE (3) ;
04100		OLDPGIDA, NEWPGIDA, FRAMEIDA, MOLESIDA, SHORTIDA, OWLSIDA, AREAIDA, WBOXIDA,
04200		SYMIDA, NUMBIDA, ISTKIDA, SSTKIDA, ITBLIDA, STBLIDA, INESTIDA, SNESTIDA,
04300		BYTEWD, comment, lots of byte pointers point here ;
04400		COLS, COL, PAL, LINES, LINE, PINE, COVERED, UNDEAD, comment, Current position in place area ;
04500		NULLAREAS, comment, LL of Made but Unopened areas (Status=0) ;
04600		PREFMODE, comment, n from nS option ;
04700		BLNMS, comment, top of BLKNAMES stack ;
04800		MYEND, comment flag for END routines (see TOEND in MAN.SAI) ;
04900		FOOTTOP, comment TRUE iff expecting 1st line of 1st footnote belonging to a body line;
05000		OWLSEQ, comment, counts total output lines red'd by OWLS arrays ;
05100		WISTK, WITBL, WINEST, WSSTK, WSTBL, WSNEST, WSYM, WNUMBER,
05200			WOLDPAGE, WNEWPAGE, WTHISFRAME, WMOLES, WNMOLES,
05300			WOWLS, WNOWLS, WTHISAREA, WWAITBOX, WAVAILREC,
05400			WAA, WNAA, WSHORT, WNSHORT, comment, WHATIS(dummy arrays) ;
05500		SWFLG, comment, used only in SWICHF TES 12/3/73 ;
05600		INPICHAR, comment for DPICHAR and RDENTITY/OCTAL TES 12/6/73 ;
05700		INCHAN, COMMENT CHANNEL INFILE OPENED ON ;
05800		AGENFILE, COMMENT BOOLEAN FOR SWICHFILE ;
     

00100		UPCAS3, UPCAS5, UPCAS6, comment, byte pointers for CAPITALIZE,STRLSS;
00200		SYMTYPE, SYMIX, comment, fields of a descr. looked up by SIMLOOK or SIMNUM;
00300		LONG, comment TRUE in a LONG etc. command;
00400		SYMPAGE, IXPAGE, PATPAGE, comment, SYM subscript, IX field, counter subscript for PAGE;
00500		IXCOMMENT, IXEND, IXFOOT, IXTAG, comment, IX fields for reserved words;
00600		SYMTEXT, IXTEXT,
00700		LLPREV, LLTHIS, LLPOST, comment, results of LLSCAN (a macro) ;
00800		AMSAND, LBRACK, UARROW, DARROW, UNDERBAR, LCURLY, DOLLAR,
00900			comment SPCHAR codes of & [ ↑ ↓ _ { $ ;
01000		EXNEXTPAGE, comment TRUE while executing NEXT PAGE (prevents recursion) ;
01100		MESGS, comment, how many messages in MESSAGE[] ;
01200		LDEFN!BRC, comment, initial LENGTH(DEFN!BRC) ;
01300		GENSYM ;
01400	
01500	TERNAL STRING
01600		C!, !, comment C and P-values of incremented counter after NEXT statement;
01700		INPUTSTR, comment, current input string;
01800		LIT!ENTITY, LIT!TRAIL, comment,
01900			for the entity in THATWD: its literal input form & trailing spaces;
02000		TEXT!BRC, comment, break characters (always including CR LF SP ALTMODE RUBOUT -.?! );
02100		DEFN!BRC, comment, break characters (char serving as {, also }, LF, ⊂, ⊃, ∃, letters) ;
02200		SIG!BRC, comment, break characters for Signals (first char of each signal) ;
02300		PAGEVAL, comment, the P-value of this PAGE when it was opened ;
02400		SRCPAGE, SRCLINE, MACLINE, LSTOP, comment, input file line nos.;
02500		INFILE, OUTFILE, TMPFILE, comment, RPG-determined file names;
02600		IFILENAME, comment first name of INFILE for TENEX ;
02700		MAINFILE, comment first name of INFILE, filled out with colons to 6 chars ;
02800		THISFILE, comment, the first name of the file being read now, colon-filled ;
02900		LIBPPN, comment usually [1,TES], but [2,TES] if logged in as [2,TES] ;
03000		OWL, LBF, OLBF, comment, Line-Filler variables ;
03100		DUMMYSTR, S, comment, just strings to throw around;
03200		THISWD,THATWD, comment, this (ITS) and sometimes next entity from scanner;
03300		CHARSP, comment, SPCHAR to character convert table ;
03400		FOOTSEP, comment, line to draw above footnotes ;
03500		FSFONT, FOOTGAP, comment 11/30/73 TES ;
03600		STR1, STR2, STR3, comment temporaries ;
03700		DELINT, comment, Delete Intermediate Files Option Y/N/A ;
03800		JOBNO, CONDIR, comment, job number & connected dir (TENEX only--else NULL) TES 10/25/73;
03900		VUNDERLINE, COMMENT TES 10/22/73 The UNDERLINE character ;
04000		INPPN, COMMENT DIRECTORY INFILE IS ON ;
04100		ETCS;
04200	
04300	EXTERNAL INTEGER RPGSW, !SKIP! ;
04400	
04500	TERNAL INTEGER
04600		comment, BEGINBLOCK BLT's these to ISTK (keep them together):  ;
04700		THISTYPE,THATTYPE, comment, THATTYPE is parser type of THATWD:
04800			-2=EMPTYQ  ≥0=IDENTIFIER(exact value is no. of trailing spaces)
04900			    THISTYPE is parser type of THISWD:
05000			1..15=TYPEN(ID symbol)  0=Undeclared ID
05100			-1=CONSTANT  -2=EMPTYQ  ≤-3=SP.CHAR.(-FAMILY no.);
05200		SYMB, comment, the SYM subscript of THISWD, if THISISID;
05300		IX, comment, the IX field of NUMBER for THISWD, if THISISID;
05400		STARPOSN, RIPTPOSNS, AMPPOSN,
05500		PLBL,FIRST,NOPGPH,SPCS,ABOVEX,BELOWX,HEIGHT,SUPERSUB,
05600		UNDERLINING,FAKE,MIDWORD,PUNC,INDENT,LBP,XLBP,LBO,LBK,ILBF,
05700		BRKFONT, BRKUNDER ; TES 11/20/73, 12/28/73 ;
05800	DEFINE SOMEWDS="4",MIDWDS="27" ; comment, how many variables in above list ;
     

00100	TERNAL INTEGER PJ 5/27/74 XMAXIM, COMMENT LDX LINE WIDTH;
00200			DOPASS3 , comment RKJ CMU flag for pass 3;
00300			OLDFONT , comment last XGP font ;
00400			THISFONT , comment current XGP font ;
00500			KSETCON, COMMENT KSET OFFSET IN CW;
00600			XGENLINES, COMMENT NUMBER OF LINES GENERATED BY LDX MACROS;
00700			XPOSN, COMMENT LDX EQUIV OF POSN;
00800			XCRIBL, COMMENT TRUE IF IN XCRIBL MODE;
00900			XCMDCHR, COMMENT SPCHAR CODE FOR ⊗;
01000			XNJB, COMMENT SPCHAR CODE FOR #;
01100			KSETSWAP, COMMENT SPCHAR CODE FOR %;
01200			FSHORT; COMMENT FAKE SHORT FOR XCRIBL MODE SPACES;
01300	
01400	TERNAL INTEGER CHARW; COMMENT AVERAGE CHAR WIDTH (WIDTH OF '177);
01500	
01600	TERNAL INTEGER WCW ; COMMENT WHATIS CW;
01700	TERNAL INTEGER ARRAY FONTFIL[1:35] ; COMMENT HOLDS CW POINTERS ;
01800	TES 1/7/74 ADDED 2 LINES: ;
01900	TERNAL STRING ARRAY FNTNAME[1:35] ;
02000	TERNAL INTEGER HIFONT ;
02100	TERNAL SAFE INTEGER ARRAY FNTINF[1:35] ; comment font info ;
02200		DEFINE CHARH="FNTINF[THISFONT]", STDCHARH="FNTINF[DEFAULTFONT]";
02300	DEFINE XMAXIM="(MAXIM*CHARW)";	RKJ: 1-5-74;
02400	TERNAL INTEGER BASELINE;
02500	TERNAL INTEGER OVEREST; COMMENT SHORT FONT KLUDGE! ;
02600	
02700	TERNAL STRING XGPCMD , comment XGP commands to go on next line ;
02800		CMDFILE; COMMENT TEXT OF XGP COMMAND FILE ;
02900	
03000	DEFINE CHARTORAST(VAL)="IF XCRIBL THEN CHARW*(VAL) ELSE VAL";
03100	
03200	COMMENT  INSTALLATION DEPENDENT DEFAULTS ;
03300	
03400	PJ 5/28/74 ; DEFINE
03500		EXTSEP = IFC VERSION=ITSVER THENC """ """    ELSEC """."""    ENDC,
03600		PUIEXT = IFC VERSION=ITSVER THENC """ PUI""" ELSEC """.PUI""" ENDC,
03700		PUZEXT = IFC VERSION=ITSVER THENC """ PUZ""" ELSEC """.PUZ""" ENDC,
03800		PUGEXT = IFC VERSION=ITSVER THENC """ PUG""" ELSEC """.PUG""" ENDC,
03900		DFSEXT = IFC VERSION=ITSVER THENC """ DFS""" ELSEC """.DFS""" ENDC,
04000		DOCEXT = IFC VERSION=ITSVER THENC """ DOC""" ELSEC """.DOC""" ENDC,
04100		PUBEXT = IFC VERSION=ITSVER THENC """ >"""   ELSEC """.PUB""" ENDC,
04200		OCTEXT = IFC VERSION=ITSVER THENC """ OCT""" ELSEC """.OCT""" ENDC,
04300		RPGEXT = IFC VERSION=ITSVER THENC """ RPG""" ELSEC """.RPG""" ENDC,
04400		TXTEXT = IFC VERSION=ITSVER THENC """ TXT""" ELSEC """.TXT""" ENDC;
04500	
04600	IFC VERSION=ITSVER THENC
04700		DEFINE	DEFAULTFONT ="1",
04800			LFTMARDEFAULT = """0""", comment TES 6/11/74 next 4 ;
04900			INTRADEFAULT = """3""",
05000			ODDLEFTBORDERDEFAULT = "1000",
05100			EVENLEFTBORDERDEFAULT = "1000",
05200			FONTEXT="'536364000000", COMMENT KST ;
05300			FONTPPN="'465756646300"; COMMENT FONTS ;
05400	ENDC
05500	IFC VERSION=SAILVER THENC
05600		DEFINE	FONTPPN = "'704760637163", COMMENT [XGP,SYS];
05700			DEFAULTFONT = "1",
05800			LFTMARDEFAULT = """0""", comment TES 6/11/74 next 4 ;
05900			INTRADEFAULT = """3""",
06000			ODDLEFTBORDERDEFAULT = "1000",
06100			EVENLEFTBORDERDEFAULT = "1000",
06200			FONTEXT = "'465664000000"; COMMENT FNT ;
06300	ENDC
06400	IFC VERSION=CMUVER THENC
06450		TERNAL BOOLEAN ERRLF;
06500		DEFINE	FONTPPN = "'001343303360", COMMENT [A730KS00] ;
06600			DEFAULTFONT = "10",
06700			LFTMARDEFAULT = """0""", comment TES 6/11/74 next 4 ;
06800			INTRADEFAULT = """3""",
06900			ODDLEFTBORDERDEFAULT = "1000",
07000			EVENLEFTBORDERDEFAULT = "1000",
07100			FONTEXT = "'536364000000"; COMMENT KST ;
07200		DEFINE	LIBDEV = """DSK""";
07300	ENDC
07400	IFC VERSION=PARCVER THENC
07500	    IFC TENEX THENC
07600		DEFINE	DEFAULTFONT="1",
07700			LFTMARDEFAULT = """0""", comment TES 6/11/74 next 4 ;
07800			INTRADEFAULT = """3""",
07900			ODDLEFTBORDERDEFAULT = "1000",
08000			EVENLEFTBORDERDEFAULT = "1000",
08100			FONTPPN="""<FONTS>""",
08200			FONTEXT=""".XH""",
08300			GENEXT= """.GEN""",
08400			ALFEXT= """.ALF""";
08500	    ELSEC
08600		DEFINE	DEFAULTFONT="1",
08700			LFTMARDEFAULT = """0""", comment TES 6/11/74 next 4 ;
08800			INTRADEFAULT = """3""",
08900			ODDLEFTBORDERDEFAULT = "1000",
09000			EVENLEFTBORDERDEFAULT = "1000",
09100			FONTPPN="1",
09200			FONTEXT="CVSIX(""XH"")";
09300	    ENDC
09400	ENDC