perm filename SYM[S,AIL]58 blob sn#293961 filedate 1977-07-11 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00037 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00004 00002	HISTORY
C00012 00003	SCAN
C00015 00004	BITDATA (SCNWRD -- LISTING CONTROL, ETC.)
C00021 00005	DATA (SCANNER PARSE TOKENS)
C00033 00006	DSCR main SCANNER Dispatch loop
C00046 00007	 ID -- RESET FOR SCAN
C00054 00008	  COMMENT -- throw out everything to next semicolon
C00056 00009	DSCR -- USID
C00063 00010	DSCR -- SCNACT
C00073 00011		PUSH	PNT,PNEXTC-1	STRING NUMBER
C00077 00012	DSCR STRNG, etc.
C00081 00013	 
C00084 00014	DEFCHK:
C00096 00015	DSCR SCNUMB -- number scanner
C00109 00016	
C00114 00017	 Print the last character, then stack the result
C00118 00018	DSCR CSPEC, SEOL, SEOM, SEOB -- Special handling routines
C00122 00019	Cspec, Seol
C00123 00020	 CALL SPECIAL ROUTINE, BUT FIRST MAKE SURE CHARACTER COUNT IS
C00130 00021
C00138 00022	 END OF BUFFER CODE.
C00140 00023	 Parameter delimiter or end of message 
C00148 00024	DSCR ADVBUF -- new input buffer routine
C00160 00025	BAIL <
C00163 00026	DSCR --HERE IS THE CREFFINF STUFF (STRANGE PLACE N'EST CE PAS?)
C00170 00027	DSCR HDR, HDROV 
C00181 00028	DSCR ENTERS -- make new symbol entry
C00185 00029	↑ENTERS:	
C00191 00030	 
C00196 00031
C00197 00032	DSCR ADCINS, CREINT, CONINS
C00201 00033	DSCR SHASH, NHASH -- look up symbol entries in hashed buckets.
C00207 00034	SEMBLK Allocation Routines
C00214 00035	RNGVRB, RNGSTR, etc. -- `Ring' Linkage Routines
C00217 00036
C00220 00037	 Mark insertion routine for counter routines
C00223 ENDMK
C⊗;
COMMENT ⊗HISTORY
AUTHOR,REASON
021  102100000046  ⊗;


COMMENT ⊗
VERSION 17-1(38) 4-14-75 BY JFR ANOTHER PASS AT BAIL COORDINATE FIXES P.6
VERSION 17-1(37) 3-1-75 BY RLS CHECK FOR END OF BUFFER IN TENEX ADVBUF (PROB. SHOULD BE ADDED TO DEC ALSO)
VERSION 17-1(36) 2-8-75 BY JFR BAIL SOURCE POINTERS P.6
VERSION 17-1(35) 11-17-74 BY JFR BAIL SOURCE FILE POINTER BUGS P. 6,21
VERSION 17-1(34) 10-16-74 BY JFR FIX BAIL SOURCE FILE COUNTING
VERSION 17-1(33) 10-10-74 BY JFR REVISE WAY BAIL PUTS OUT TEXT FILE POINTERS
VERSION 17-1(32) 9-26-74 BY JFR BAIL INSTALLED 9-19-74.  FIX VERSION, AUTHOR, REASON STUFF
VERSION 17-1(31) 9-15-74 BY HJS BUG #TG# PREVENT PARSE STACK OVERFLOW WHEN SCANNING ACTUAL PARAMETERS TO MACROS 
VERSION 17-1(30) 5-30-74 BY RLS TENEX FIX #SI# BETTER LISTING FORMAT
VERSION 17-1(29) 5-30-74 
VERSION 17-1(28) 5-28-74 BY RHT BUG #SD# NEEDED A FLAG TO DETECT EXTERNAL-INTERNAL CHANGES
VERSION 17-1(27) 4-12-74 BY RHT %BI% ASS RECORD STUFF TO ENTID
VERSION 17-1(26) 3-17-74 BY RLS INSTALL TENEX
VERSION 17-1(25) 3-17-74 
VERSION 17-1(24) 2-5-74 BY HJS BUG #RA# ALLOW TEXT PAST FINAL END OF PROGRAM 
VERSION 17-1(23) 1-29-74 BY HJS BUG #QV# ASSIGNC PROBLEMS
VERSION 17-1(22) 1-25-74 BY RHT BUG #QO# PNAME MAY BE SPLIT BY STRING SPACE EXPANSION
VERSION 17-1(21) 1-11-74 BY JRL CHANGE MACRO EXPANSION LIST CHARACTER
VERSION 17-1(20) 12-14-73 BY RHT BUG #PZ# A KLUGE THAT NO LONGER WORKED FIXED BY NEW DCS KLUGE
VERSION 17-1(19) 12-14-73 
VERSION 17-1(18) 12-7-73 BY JRL REMOVE SPECIAL STANFORD CHARACTERS
VERSION 17-1(17) 11-27-73 BY RLS BUG #PF# AVOID DYING IF SOURCE FILE ENDS IN FF
VERSION 17-1(16) 11-27-73 
VERSION 17-1(15) 11-25-73 BY JRL FEAT %AN% HAVE SOURCE!FILE SWITCHING CHECK ARG AS STRING CONSTANT
VERSION 17-1(14) 11-16-73 BY HJS BUG #PC# OVERWRITNG FIRST LINE IN CREF 
VERSION 17-1(13) 11-10-73 BY KVL MERGE:CORERR
VERSION 17-1(12) 9-24-73 BY HJS BUG #OH# NO CREFFING OF MACRO FORMALS ALLOWED
VERSION 17-1(11) 9-24-73 
VERSION 17-1(10) 9-21-73 BY HJS INHIBIT LISTING IN FALSE PART OF CONDITIONAL COMPILATION 
VERSION 17-1(9) 9-21-73 BY RHT PATCH UP VERSION STUFF
VERSION 17-1(7) 9-21-73 BY HJS MAKE BUG OG FIX RIGHT
VERSION 17-1(6) 9-19-73 BY HJS BUG #OG# SAVE PNAME COUNT BEFORE SGCOL
VERSION 17-1(5) 9-19-73 
VERSION 17-1(4) 9-17-73 BY HJS BUG #OF# MAKE SURE PARSE TOKEN IN AC A WHEN GOING TO STACK
VERSION 17-1(3) 9-17-73 
VERSION 17-1(2) 9-17-73 
VERSION 17-1(1) 8-14-73 BY RHT TURN JRST .CORERR AT GETTOP BACK TO JRST CORERR
VERSION 16-2(48) 7-12-73 BY HJS SAVE CHARACTER COUNT IN CASE GARBAGE COLLECTION HAPPENS DURING MACRO ACTUAL SCANNING
VERSION 16-2(47) 6-20-73 BY HJS IFCR, REDEFINE, EVALDEFINE, AND ASSIGNC IMPLEMENTATION 
VERSION 16-2(46) 6-10-73 BY JRL BUG #MQ# LPNT NOT PROPERLY SAVED FOR BACKUP WHEN SAVCHR=0
VERSION 16-2(45) 6-1-73 BY DCS BUG #MP# KEEP REMCHR HONEST (STRNGC BUG)
VERSION 16-2(44) 3-19-73 BY HJS ALLOW TEMPORARY OVERRIDING OF NULL DELIMITERS MODE
VERSION 16-2(43) 3-13-73 BY JRL REMOVE REFERENCES TO WOM,SLS,GAG,NODIS
VERSION 16-2(42) 3-12-73 BY RHT BUG #LS# OWN THINGS GETTING THE WRONG LEVEL INFO
VERSION 16-2(41) 1-31-73 BY HJS ADD NOEMIT, ACKSAV, AND SBSAV FOR EXPR!TYPE
VERSION 16-2(40) 1-17-73 BY HJS BUG #LC# MACRO FORMALS ARE NOT MACRO REDEFINTION
VERSION 16-2(39) 1-17-73 
VERSION 16-2(38) 12-11-72 BY HJS DISABLE ENDC PARSER SWITCH TRIGGER IN WHILEC, CASEC, FORC, AND FORLC BODIES
VERSION 16-2(37) 12-2-72 BY HJS SAVE BITS DURING CONDITIONAL COMPILATION AND MACRO DEFINITIONS (CBTSTK AND DBTSTK)
VERSION 16-2(36) 11-20-72 BY JRL FIX SUGG BY R. SMITH AT CHKPRC
VERSION 16-2(35) 11-19-72 BY HJS BUG #JZ# CORRECTION - MACRO REDEFINITION AND RESERVED WORD REDEFINITION IN ENTERS
VERSION 16-2(34) 11-15-72 BY HJS INSERT DEFDLM QSTACK FOR DEFLUK BIT OF FF FOR COMPILE-TIME MACROS WITHIN MACROS
VERSION 16-2(33) 11-5-72 BY DCS BUG #JZ# CHANGE MACRO SCOPE RULES
VERSION 16-2(32) 11-3-72 BY DCS SIMILARLY, ALLOW ALL EXTERNALS TO OVERRIDE
VERSION 16-2(31) 11-2-72 BY DCS BUG #JX# ALLOW INTRNL PROC TO OVERRIDE EXTRNL ONE.
VERSION 16-2(30) 10-24-72 BY HJS EMIT ERR MSG FOR UNINIT MACRO VAR USE
VERSION 16-2(29) 7-5-72 BY DCS BUG #IF# FIX SOME GOERGE BUGS
VERSION 15-6(18-28) 7-5-72 
VERSION 15-6(17) 3-10-72 BY DCS REPLACE RING,ULINK MACRO WITH VARIOUS ROUTINES
VERSION 15-6(8-16) 3-9-72 
VERSION 15-6(7) 2-21-72 BY HJS THE BRAVE NEW PARSER WORLD
VERSION 15-2(6) 2-18-72 BY DCS BUG #GP# CHECK OLD FORMALS AGAINST NEW FORMALS
VERSION 15-2(5) 2-5-72 BY DCS BUG #GJ# ADD LSTON LIST-CONTROL STUFF
VERSION 15-2(4) 2-5-72 BY DCS BUG #GI# REMOVE TOPSTR
VERSION 15-2(3) 2-1-72 BY DCS BUG #GE# LPSBOT FROM USER TABLE TO COMPILER DATA
VERSION 15-2(2) 12-22-71 BY DCS BUG #FT# PROVIDE LINE NUMBER IF NOT SOS FILE
VERSION 15-2(1) 12-2-71 BY DCS INSTALL VERSION NUMBER

⊗;

SUBTTL	SCAN
	LSTON	(SYM)
BEGIN SYM

DSCR SCANNER -- get next "ATOM" from source file
CAL PUSHJ from PARSE (or recursively)
PAR PNEXTC is bp to next input char (from file or macro)
 SAVCHR, if non-zero, is a scan-ahead char which should
  be considered first.
 File variables, Listing variables used by I/O part.
 Define stack, variables, macro semantics used when
  recurring into macros

RES The ATOM will be either:

1. An operator or other character atom, in which case
	the Parse token representing it will be placed in the
	parse stack, a 0 in the generator stack (null entry).

2. A reserved word, in which case the Parse token will be 
	placed on the parse stack from the word's symbol 
	entry, and again a null semantic entry will be stacked.

3. An IDENTIFIER, in which case the Parse token for the appro-
	iate class of IDs will appear on the parse stack, the
	Semantics for the symbol on the generator stack. If the
	symbol is undefined, a 0 is represents null Semantics.

4. A STRING or numeric constant. These entities are ENTERed 
	in their respective symbol tables if previously 
	undefined, and the stacks are set up as above.


 In all cases, the semantic entry will be repeated in the cell
	NEWSYM. In those cases where a hash was made, the
	MOVE or MOVS instr to fetch the list on which the symbol
	appears (or will appear after ENTERy) is located in
	the cell HPNT. For string constants or identifiers, the
	string	identifier is left in PNAME, PNAME+1. For numeric
	arguments, the value is left in SCNVAL. DBLVAL is zeroed
	in these cases.

SID SCANNER uses temporary ACs indiscriminately, so look out for it.
 Many variables are changed as a result of calling SCANNER.
⊗

BITDATA (SCNWRD -- LISTING CONTROL, ETC.)

Comment ⊗ SCAN table -- good bits that make the whole thing work ⊗

↑↑LSTEXP←←400000		;ON IF "<"-">" PAIRS TO BE PRINTED
↑↑MACEXP←←200000		;EXPAND MACRO TEXTS
↑↑MACLST←←100000		;LIST MACRO NAMES BEFORE EXPANSION
↑↑LINESO←← 40000		;ON IF LINE NUMBERS SHOULD BE PRINTED
↑↑PCOUT ←← 20000		;ON IF PCNT SHOULD BE PRINTED
↑↑CREFIT←← 10000		;ON IF A CREF S HAPPENING
↑↑MACIN ←←  4000		;ON IF IN A MACRO EXPANSION
↑↑EOFOK ←←  2000		;ON IF CAN GET EOF WITHOUT FATALITY
↑↑BACKON←←  1000		;ON IF LISTING BACK ON AFTER PARAM RESCAN
↑↑LOKPRM←←  400			;ON IF LOOKING FOR POSSIBLE MACRO PARAM
↑↑RDYPRM←←  200			;GETTING READY FOR MACRO PARAM (RANSCN)
↑↑INLIN ←←  100			;TREAT @ AS DELIMITER IN IN-LINE CODE
↑↑INSWT ←←   40			;WE'RE SCANNING A SWITCHED-TO SOURCE FILE
 ↑↑NOLIST←←     1		;ON IN RH IF NO LISTING HAPPENING NOW

BITDATA (SCANNER TABLE)

SPCL  ←←400000		;NOT A LETTER OR DIGIT
ATSIGN←← 20000		;@ -- REAL EXPONENT COMING
AOSSOS←← 20000		;BIT DIFFERENTIATING BETWEEN AOS AND SOS FOR NESTING
			;   DELIMITERS COUNT
DOT   ←← 10000		;. -- DECIMAL POINT
NUMB  ←←  4000		;NUMBER OR NUMBER PART (ONE OF ABOVE TWO)
DIG   ←←  2000		;0 THRU 9
LETDG ←←  1000		;REQUIRES SPECIAL TREATMENT
QUOTE ←←   400		;" -- STRING CONSTANT DELIMITER
↑NEST  ←←   200		; NESTABLE CHARACTER
↑LNEST ←←   100		; LEFT NESTED CHARACTER
QUOCTE←←    40		;' -- OCTAL NUMBER COMING

; BITS FOR NUMBER SCANNER

INTOV ←←200000		;INTEGER OVERFLOW
REALOV←←100000		;REAL OVERFLOW
EXPNEG←← 40000		;NEGATIVE EXPONENT
NUMNST ←←3		; NUMBER OF NESTABLE CHARACTERS
RPAROF ←←2		; RIGHT PAREN OFFSET FOR LOCNST ENSTRY
↑NUMCHA ←←200		; NUMBER OF CHARACTERS
↑DELNUM ←←4		; NUMBER OF DELIMITERS AS INPUT TO REQ. DEL.


TABCONDATA (SCANNER CHARACTER TABLE)

DEFINE IGL <XWD SPCL,IGLCHR>
DEFINE OPER <.-SCNTBL>
DEFINE LTR <XWD LETDG,.-SCNTBL>
DEFINE NESTED <<XWD NEST,0>>
DEFINE LNESTD <<XWD NEST+LNEST,0>>

↑SCNTBL:
	XWD	SPCL,SEOB		;0 -- END OF BUFFER
	LTR 				;DWNARROW
	LTR 				;ALPHA
	LTR 				;BETA
	RAND				;AND
	RNOT				;NOT
	RIN				;ELEMENTOF
	REPEAT 2,<LTR >			;PI, LAMBDA
	0				;TAB
	XWD SPCL,SEOL		;LF -- END OF LINE
	0				;VTAB
	XWD SPCL,SEOP			;FF -- END OF PAGE
	0				;CARRIAGE RETURN
	RINF				;INFINITY.
	LTR 				;PARTIAL, LEFTHORSESHOE,RGHTHORSESHOE
	REPEAT 2,<LTR >
	RINTER				;INTERSECT
	RUNION				;UNION
	LTR 				;FOREACH
	LTR 				;EXISTS
	RXOR
	RSWAP				;BOTHWAYSARROW
	LTR 				;UNDERLINE ?
	LTR				;RGT ARRW
	RAND				;STANFORD TILDE (AND)
	RNEQ 				;NTEQUAL
	RLEQ				;LTEQUAL
	RGEQ				;GTEQUAL
	REQV				;EQUIVALENCE
	ROR				;OR
	0				;SPACE
 	XWD LETDG,30			;! -- SAME AS UNDERLINE.
	XWD	QUOTE,.-SCNTBL		;   "
	LTR				;#
	LTR				;$ 
	TPRC				; %
	TANDD				;&
	XWD	LETDG+NUMB+QUOCTE,.-SCNTBL	;   '
	LNESTD+TLPRN			; (
	NESTED+TRPRN			; )
	TTIMS				;*
	TPLUS 				;+
	TCOMA				;,
	TMINUS				;-
	XWD	LETDG+NUMB+DOT,.-SCNTBL		; .
	TSLSH					;  /
	REPEAT 12,<XWD LETDG+NUMB+DIG,.-SCNTBL>	;DIGITS
	TCOL				; :
	TSEMI	 			;  ;
	TLES				; <
	TEQU       			; =
	TGRE				; >
	TQUES				;?
	XWD	LETDG+NUMB+ATSIGN,.-SCNTBL	;  @
	REPEAT =26,<LTR>			;UPPER CASE LETTERS
	LNESTD+TLBR			; [
	LTR  				; TILDE
	NESTED+TRBR			; ]
	TUPRW				;↑
	TLARW				;←
	RASSOC				;`
	REPEAT =26,<LTR-40>			;LOWER CASE LETTERS
	LNESTD+RSETO			; {
	TVERT				; |
	NESTED+RSETC			; RIGHT CURLY BRACKET
	NESTED+RSETC			; RIGHT CURLY BRACKET
; 175 AND 176 WILL BOTH BE CURLY BRACKETS FOR A WHILE.
	XWD	SPCL,EOM			;177 -- END MACRO OR PARAM
ENDSCN←.

DATA (SCANNER PARSE TOKENS)

COMMENT ⊗
  These variables provide symbolic access to the PARSE token
 numbers for several delimiter characters -- they are used in
 those cases where the SCANNER or some EXEC needs to examine
 a value directly
⊗
%ATS:	TINDR		;BITS FOR @ DELIMITER IN INLINE(SEE SCNUMB)
%COMMENT: RCOMME+1B0
↑↑%ID:	TI
α%NUMCON: TICN		;ARITHMETAC CONSTANT.
%SEMICOL: TSEMI
↑↑%STCON:TSTC		;STRING CONSTANT.

ZERODATA (SCANNER VARIABLES)

BAIL<
↑↑BCORDN: 0	;DEBUGGER COORDINATE NUMBER.  RIGHT HALF CONTAINS CURRENT
		;COORDINATE, LEFT HALF IS ZERO IF WE ARE NOT NOW PUTTING OUT
		;COORDINATES TO THE .SM1 FILE, AND NON-ZERO IF WE ARE.
BCRDW1:	0	;SPACE TO SAVE COORD INFO TO BE WRITTEN TG .SM1 FILE, SINCE
BCRDW2:	0	;  LOCATION MUST BE MARKED AT BEGINNING OF STATEMENT, BUT
		;  WE DONT KNOW IF WE WANT A COORD UNTIL THE END OF STATEMENT
>;BAIL

↑↑DEFRN2: 0	;TEMP RING-VARIABLE WHILE SCANNING MACRO ACTUAL PARAMS

;FLTVAL -- collect floating point equiv while scanning number
?FLTVAL: 0

COMMENT ⊗
HPNT, HSPNT -- When the hashing routines (SHASH, NHASH) locate the
  right bucket pointer in the appropriate bucket Semblk, they create
  a [HRR LPSA,addr] or [HLR LPSA,addr] instruction which will fetch
  this pointer, and put it into HPNT -- also leaving it in LPSA. They
  then execute the instruction to begin their lookup phases.  ENTERS
  again uses this pointer when adding a new Semblk to a bucket -- first
  as is, to fetch the old pointer, then modified to HRRM or HRLM, to 
  update the bucket.
  HSPNT is the saved HPNT value for the last string constant scanned.
  The "string constant as comment" EXEC uses it to remove the constant
  from the bucket (provided, of course, that it hasn't also been used
  as a string constant).
⊗
↑HPNT: 0

↑HSPNT: 0

↑↑LOCMBD:  BLOCK 2		; MACRO BODY DELIMITERS BLOCK
↑↑LOCMPR:  BLOCK 2		; MACRO PARAMETER DELIMITERS BLOCK
BAKDLM:	   0			; A FLAG WHICH IS SET TO -1 IF DLMSTG IS ON
				;  (I.E. ONE WANTS A DELIMITED MACRO BODY)
				;  AND QUOTES ARE USED INSTEAD BECAUSE A 
				;  REQUIRE NULL DELIMITERS STATEMENT WAS NOT
				;  USED.
↑↑CURMBG:  0			; CURRENT MACRO BODY BEGIN DELIMITER
↑↑CURMED:  0			; CURRENT MACRO BODY END DELIMITER 
↑↑CURPBG:  0			; CURRENT PARAMETER BEGIN DELIMITER
↑↑CURPED:  0			; CURRENT PARAMETER END DELIMITER
↑↑DELSTK:  0			; DELIMITER "BLOCK-STRUCTURE" STACK
↑↑LOKDLM:  0			; DLMSTG (LOOKING FOR DELIMITERS FLAG) QSTACK
↑↑DEFDLM:  0			; DEFLUK (SCANNING A MACRO BODY OR LOOKING FOR
				;  ACTUAL PARAMETERS) QSTACK
↑ZCBTSTK:  0			; POINTER TO QSTACK FOR SAVING BITS WHILE SCANNING 
				;  CONDITIONAL COMPILATION EXPRESSIONS
↑NDBTSTK:  0			; POINTER TO QSTACK FOR SAVING BITS WHILE SCANNING 
				;  MACRO DEFINITIONS
↑↑ENDCTR:  0			; POINTER T@≡AE')βπ,A∪≥	%πβ)∪9∞A/⊃∃)⊃$↓∨$A≥=(A≥⊃ε@~∀$∩∩∩vA'⊃∨U→λA)I∪∂∂HAαA!¬%'$↓'/∪)
⊂@Q≥<A∪A=≥∃αM→4(HH$%mααN∞εtr&:≥∧	α↑"Lb⊗
1∧~εN⊗~aα~>∀→1α>∩α~>Jd→α
>%I$4*urJ⊗F$b5i↓β$$%ZαJ⊗F,JJ∃α$*2&6M"⊗Iα≥"εR⊗l*:Qα≤*⊗)α4bε≤4UrzN↑∀z∩eiα↓@$$KYαNB,~&ε1∧"⊗2εlJR⊗I∧"⊗~&tJR&>rαN⊗⊗ph*zz∀rNR∞sQ↓↓@HH%mαt*NR⊗"α∩⊗2Lj&R⊗∩α∞>Vu 4*ztb>∞:≥!i↓α∀b>∞-∧rV6:≥!↓%Zα:⊗N$

2∃∧~"εJ~R⊗J~α
2>≤X4*ztrNRε∀ai↓α∀b>∞-∧rV6∞Dλ$%m∧r⊗NR∩2¬α≤BεJε≥"⊗JM∧
∩∩J-~Mα&t"⊗aα∀b>∞,hP4*zβid|,Y~CRαε↓⊂HK4λD|rzD∧,l~D∧≤|HT∧4d_t∧4⎇$
DD
λYTM%HZ hUih∀≤]8~cRαλ)D|≤4ε∪_H↔4¬≤
hT∧≤8H∀∩∧λZ$*¬y	∀d*λZdeX~DLttλUE¬$~EM∧QQ%uu8*4
3$∧α∧∀Ix4Zβ⊗1⊂KZ
8∃4*∧J4∀MJ4∧≤⎇*(U≥∧yhDLtt
Dz∧_95≤
d
deXZ2¬<	→D*Q!⊂HH↔4α∧-h→E,
I→d:∧[
¬∩
K~∧*αλ~d|LJ4∧D
)Xe,b
9∀$*↓Q HH⊃↔2α∧Xhd,≥J4∧|2λ9t$*λxTt-(~D⎇∃5⊃PUuh_E¬%:g"αβ↓⊃⊂KZλ_D-¬I∧¬4JXR∧∀Xiu∀*λ[¬¬∩~K∃∧*

$|≤Z:4LtqQ%uuλ9e%≥g$αβ⊃⊃∪Z¬λ9e"¬h→E,*λ(T4⎇(T∧-E
$∃%MλT¬¬∀x8U≥≤→hphUkj4%¬J:cRαε↓⊂HK4
4$-λIα¬4→JT*∧(Xd⎇∀TλUE¬$~EM∧T
¬∀|8Z5≤LhqPUuj*5$$IW"αβ↓⊃⊂KZ
HTm∧z(∃∃J	zd-∃)_DLtt	t2∧jYDb∧HYDLl~HU∃~	Yt$*λiD8Q+eu∀X:5$[$∧βH⊃↔2¬∧y→e$-$
Dz¬~:D≤4	∀t$_8∃$Lht¬<DZI∧-∩	X∀≥∀z4¬≤DzYD"Q!⊂HH↔4α∧∀TλUE∧→hD,"	→b¬$λT∧4J8R¬∧~*B∧|dλ4|TI~DL|h→Bh!⊃⊂HK4∧∧≤|Z	∀d
I→trQ+etLh:$,≠$∧βH⊃↔2∧4H_r∧LhI∀≤
I→d:¬yλU$DZ$∧l:)u~¬9	u,dDλ$*∧[
∧tHXB∧Ld↓PPH⊃⊃∪Zα
I∧*∧h→E≤*
λ∃∃"	xb∧≤yhDM$→ydbλ9tm∧→H∃$LydhTjYD≤uG!∩ααε↓⊂HK4λ4⎇,jHU∩∧→hDL≤~I∀t:
I∧*∧jYT∀-$	t2∧_:E,D
∧
∀→XU$-*4hP⊃⊃⊂KZ∧
DD
D	∧
4T	d⎇"λ(T,r
:∧,≤_i∀,"λ~B¬$λT∧,tD	t2¬IλR∧d~:B∧|d↓PPH⊃⊃∪Zαλ_5%,→J2∧Ldλ∩∧l_:$z∧8→Dbr∧
DD-∀λ∃∀*
J$,
HXB∧
4	∀2¬IλUJQ!⊂HH↔4α∧D_D∧∀,Yd¬$DT	e,dD
5%∀→hrαD~4∧$|hT∧
"λ9U*J↓Q$e¬J*53P∀∧αβ⊃⊃∪Z¬8~d*¬yz$"∧iz"∧d~:DLttλ%,4hZ"¬∧y→e$-$
4z¬Iλ∃"Q!⊂HH↔4α∧4→J4*¬λ~%"∧xd∧≤|hI∃$Lyh∀b∧9yU∧LH~DL|dλD|-4	d⎇"↓Q HH⊃↔2α∧xZB∧d~:D,"↓Q%utJ:E≥$7$αβ⊃⊃∪Z¬	y∀u$Z$¬$z
~5$94∧LtI_4
$→hr¬<λZDD-$	u∩∧izB∧|hThP⊃⊃⊂KZ∧	∃~∧→d¬$DTλde8T¬∧
*D∧|2λ9tt$~I∀|t→D∧≤|Z	∀d
I→trQ+et≤hIE≥#$∧βH⊃↔2∧4H_r∧LhI∀≤
I→d:∧_d∧|tT	∃~∧→d¬$DTλde8T¬∧
*D∧|2↓Q HH⊃↔2α∧9yd$MI→ttDλ4|m	→D
$→ybh'72,≤∀TαC
vU∩∧Tj$β:k↔¬S;(Q*E∀\X:#PK↓⊃∪\HJ"∧|d∧E∧t→XR[
	xb∧≥Z*$,uD	T≥)t∧tXQPU%)9T≥≠!⊗HK:8∀l*λiu∩∧H~5"∧X_5∀z	→b¬≤zZ$≤*λi∀d(Q*E∀\UjβPK↓⊃∪]∧_xRα~	xb∧d~:B∧l_:$z∧→d¬≤⎇Z(4*∧i→D(h*J$\jiG K⊃↔4
≤9I∀rα4	t2∧H~5"∧X_5∀z	→b¬≤zZ$≤*λi∀d(Q+eu%)8$,;!⊗K]
J"¬$t
4,≤yhB∧∀Ix4Z¬8YT∀d4	t2∧:Z%∀,jD∧∀dx90hP⊃↔44⎇$	∀t4z)T
$~hR∧-*)u∩∧XZ5≤xZ2bα(h∃$DλT|2!Q#[ZX9∩*¬aQ#[Z∧:$
_∃ε∩∧|dε"Jα∀↓PUuhYt4≤YG"αβ↓⊃⊂KZλiD:	→d$L8~DLttλdLt→D∧,tD	t2¬
)t=∀→T¬≤,YdhPQ($LDπ@hUkh%≥∀8h3Rβ↓⊃⊂KZλ*T44Z$∧$J%Bd∀Ix4Z∧9zTu"∧λd⎇∩
9u-∀8T∧4LHQPUuh)e≥∀7$αβ⊃⊃∪Z∧jYT∀-$	t2¬9zU∀≤TλdLdZ4¬≤,YaPUuh*5∀≤ig"β⊃⊃∪Z∧:Z%∀,jD¬≤⎇Z(4*∧i→D*∧jYT∀-!Q%ut*:$≤5↔$βH⊃↔2¬
:H∀≤Zλiu∩α
(U
,~(Rα¬8~dLtqQ%ut)J5$47$βH⊃↔2¬<z(B∧≤zYe"∧iz"∧d~:DLttλdLdQQ%ut*
∧≤uG$βH⊃↔2¬¬(ZdL⎇Z4¬¬∀xz$jλ9u,uHZ hSg8$LAQ"h)_dr∧jIB$$(uC`h+kdb$9jCPK↓⊃∪Z≤9λ∃∃~	HT5"	→b∧e:H%,0Q'c\Lid∧5$DHD∀8Q!PT,hHD
$⊃Q hTJ85∩α	J5$%λ!PQ0Q!PT$Xi∀t*	J5$%λ!∪`H↔9u-%
ZB∧≤λ~"¬$t	DM≥I→d:∧i→D*∧_d¬∀-_APPMJ)dpMH)∃%≠%Id|d~:@K\~4∧dM:I∀t:	λ∃¬∧Yi∀t:Dλ$∃↔qPPLYDD≤E!⊃⊂K]_Z2b∧It¬$DT
$-
Y~$,"
I∧LtqQ#ph!Q$L4Tλe$bHH$:cAQ L$Xi∀t*	YB$≤
$βdLJλ"∧∩IJ∧u#aQ L$Xi∀t*	YB$∀→4βdlzhTj¬8)∃%≠%IE∧uGaPSs9_d*∧jIB$$(qPTLid∧5$DHD∀:GAPPLHXdLtT	Tb$9
"βe
Z4DR
¬Db$9
#ph!_D,4→hR∧lDH$ZπJ¬-≤	$¬αdDH$[aQ hTDH4E∪!~4⎇≤xQ∀b$9j@HK8_D"∧9λ∃∩∧→d∧∩¬It∧e≥H*T2bλ9∧,≤9→d:∧zhU∀4IzphP∀λU∃⊂↔IE≥$*Xb∧⎇hZ$4dzwbcλQ!∀L%λ!∀∩dJ	e h!~∧⎇∧!~α`h!Q K*'J∧|LjDβ:c¬ESrVT↓:β∧αrβααtβα↓tεhTDJD∪!⊗RSe	y∀u"εuCαc6Gbk Q!∪*SJ	tLuDεrcαF&srk1Q K*'J∧|LjDβ:c¬F#βrV!PPKU'E∧|→jBβ:F¬C≠eV⊂hP⊗U#e∧y→e"βuFαcβgeSh!Q$b$(→3PH⊃⊃∪\∀_92¬-∧	E∧uD
Dz¬8)∃%≠%D∧≤DX94Lttλ∀t"λ9u,uI→d8h!_4la~4∀MJ6"de	j@hP∀
∧⎇∧!~α`H↔8e∀-~XTu"
:∧,≤ CASE
	PUSH	P,LPSA
	PUSH	P,LPSA+1
	MOVE	LPSA,SBITS2	;SUPPOSED BACK BP
	MULI	LPSA,5		;HAKMEM STRIKES AGAIN (PROG. HAX,ITEM 165-FREIBERG)
	SUB	LPSA+1,L$TAB(LPSA)	;LPSA+1 IS NOW CHAR ADDR
	PUSH	P,LPSA+1
	MOVE	LPSA,LPNT	;CURRENT BP
	MULI	LPSA,5
	SUB	LPSA+1,L$TAB(LPSA)
	CAML	LPSA+1,(P)	;CURRENT CHR ADDR MUST BE ≥ BACKUP
	 JRST	L$BAK1
	ERR	<LPNT FORWARD "BACKUP">,1
	JRST	L$BAK2
L$BAK1:	MOVEM	SBITS2,LPNT	;BACKUP BP
	SUB	LPSA+1,(P)
	ADDM	LPSA+1,L$CNT	;AND CNT
L$BAK2:	SUB	P,X11
	POP	P,LPSA+1
	POP	P,LPSA
	POPJ	P,
>;IFN FTL$DBG

;;#YV# JFR 2-4-77 SET 'NOLIST' FROM ABSOLUTE BEARINGS
↑↑L$SET:TLNE	FF,LISTNG	;.LST FILE EXIST?
	SKIPE	CNDLST		;CHECK FOR EXPLICIT NO LIST OF COND. COMP.
	 JRST	L$NO
	MOVE	TEMP,FMTWRD
	TLNE	FF,PRMSCN
	TLNE	TBITS2,MACLST	;SCANNING PRMS, NOT LISTING MACRO NAMES, DONT LIST ARGS EITHER
	TRNE	TEMP,40		;USER MIGHT HAVE EXPLICITLY TURNED IT OFF
	 JRST	L$NO
	TLNE	TBITS2,MACIN
	TLNE	TBITS2,MACEXP	;IN A MACRO, NOT LISTING EXPANDED TEXTS
	TLNE	TBITS2,LOKPRM
L$NO:	 TROA	TBITS2,NOLIST	;HUNTING PRM, OR IN MACRO AND NOT LISTING EXPANSIONS
	TRZ	TBITS2,NOLIST	;YES LIST
	POPJ	P,
DSCR main SCANNER Dispatch loop
RES gets first char from SAVCHR or PNEXTC, dispatches to
 routine to handle what it found (IDENT, STRING, DELIM, etc.)
⊗
↑SCANNER:	
	MOVE	TBITS2,SCNWRD	; SET UP SAANNER PARAMS
;; #RA# (2 OF 2) 
	SKIPE	EOFCEL		; FINAL END OF PROGRAM SEEN? 
	JRST	[TLO TBITS2,EOFOK ; 
		 MOVEM TBITS2,SCNWRD ; 
		 JRST .+1]; 
;; #RA# 
	TLZE	FF,BAKSCN	;IS SCANNER BACK ONE CHARACTER ??
	 JRST	 GOAGAIN	; DO IT.
	MOVE	USER,GOGTAB	;USER DATA TABLE ADDR FOR STRING STUFF
	TLNE	TBITS2,INLIN	;SPECIAL START!CODE FEATURE?
	SETZM	PNAME		;YES, ASSURE NO PNAME USED
;;#MQ# SET UP SBITS2 FOR BACKING UP LPNT EVEN IF HAVE SAVCHR≠0
	MOVE	SBITS2,LPNT
	MOVEM	SBITS2,LPTRSV	; SAVE IN CASE IN FALSE PART OF COND. COMP. 

	MOVEI	C,0		;WILL COUNT CHARS FOR IDENTS
	SKIPE	B,SAVCHR	;IS ANYTHING LEFT OVER?
	 JRST	 SPCHAR		;YES, DISPATCH AS FIRST CHAR

	TLNN	FF,PRMSCN	;SCANNING MACRO PARAMETERS?
	 JRST	 DISPT		; NO
	 TRNA			;SKIP IDPB
¬
	ML$CHR			;TO LISTING FILE
DSPRM:	ILDB	B,PNEXTC	;SKIP IGNORABLE CHARACTERS
	SKIPGE	A,SCNTBL(B)	;ANYTHING SPECIAL REQUIRED?
	PUSHJ	P,(A)		;YES, DO IT
	JUMPE	A,DSPRM-1(TBITS2) ;MAYBE LIST, GET NEXT IGNORABLE

DSPR1:	TLO	FF,PRMXXX	;SET SPECIAL PARAM SCANNING BIT
	TLNE	A,QUOTE		;DOES HE WANT COMPLETE FREEDOM?
	 JRST	 STRLST		; YES, GIVE IT TO HIM (FIRST LIST `"')
	PUSHJ	P,INSET		;NO, SPECIAL MODE -- "," OR ")" WILL BREAK
	JRST	BAKSTR		;AROUND QUOTE DELETION

	ML$CHR			;TO LIST FILE
DISPT:	ILDB	B,PNEXTC	;GET FIRST CHAR
	SKIPGE	A,SCNTBL(B)	;GET GOOD BITS, CHECK SPECIAL
	PUSHJ	P,(A)		;SPECIAL, HANDLE IT
	 JUMPE	 A,DISPT-1(TBITS2) ;BLANKS AND OTHER IGNORABLES
	MOVE	SBITS2,LPNT	;SAVE IN CASE BACKUP MUST HAPPEN
	MOVEM	SBITS2,LPTRSV	; SAVE IN CASE IN FALSE PART OF COND. COMP. 
STRLST:	LSTDPB			;TO LISTING FILE IF REQD

SPCHAR:	SETZM	SAVCHR		;NOTHING LEFT OVER YET
	SETZM	LSTCHR
	JUMPL	B,[TLZN	TBITS2,EOFOK	;OK FOR EOF HERE?
		   ERR  <FATAL END OF SOURCE FILE>	;NO
		   MOVE	A,%EOFILE	;YES, RETURN `EOF'
		   JRST	CHAROUT]	;NULL SEMANTICS
	SKIPN	A,SCNTBL(B)	;GET GOOD BITS (DON'T DISPATCH AGAIN!)
	JRST	DISPT		; IGNORABLE, FIND ONE THAT ISN'T
	SKIPE	DLMSTG		; LOOKING FOR SPECIALLY DELIMITED STRING?
	CAME	B,CURMBG	; POSSIBLY, MACRO BODY BEGIN DELIMITER?
	JRST CONCHK		; GO DO A NORMAL SCAN
	SETZM	BNSTCN		; SET DELIMITER NEST COUNT TO ZERO
	JRST	STRNG		; GET MACRO BODY

BAIL<
↑↑BMKSRC:
	MOVE	TEMP,BAILON
	TRNN	TEMP,BBCRD	;SKIP IF WE WANT COORDS
	 POPJ	P,
	PUSH	P,A
	PUSH	P,B
	PUSH	P,C		;WE ARE IN THE HEART OF THE SCANNER, SO BEWARE
;;%##% 1! JFR 4-18-76
	PUSH	P,D

	MOVE	TBITS2,SCNWRD		;PICK UP SCANNER FLAGS
	TRNN	TBITS2,NOLIST		;LISTING IN PROGRESS?
	 JRST	BCRDLS			;YES
;;#%%# JFR 2-8-75 FIX THIS CRUFFT FOR MACROS AND CONDITIONAL COMPILATION
	TLNE	TBITS2,MACIN		;IN A MACRO?
	 JRST	BCRDN2			;YES, UPDATE COUNTERS ONLY, NOT POINTERS
	HRRZ	TEMP,PNEXTC
	HRRZ	SBITS,SRCPNT
	SUBI	TEMP,(SBITS)
	CAIL	TEMP,1
	CAILE	TEMP,200		;SRCPNT IS A WORD EARLY
	 JRST	BCRDN2			;PNEXTC IS OUT IN THE BOONIES
;;#%%# ↑
	MOVE	TEMP,PNEXTC
	MOVEM	TEMP,BPNXTC		;SAVE BYTE POINTER

	HRR	SBITS,BSRCFC		;BLOCK COUNT FOR SOURCE FILE
	HRRZ	A,BPNXTC		;ADDR OF CURRENT WORD IN BUFFER
;;#%%# BY JFR 11-17-74  CORRECT COMPUTATION OF WORD OFFSETS
	HRRZ	B,SRCPNT		;WORD EARLY POINTER
	ADDI	B,1			;CORRECT
;;#%%# ↑
	LDB	C,[POINT 5,BSRCFN,35-0]	;FILE NUMBER
	LDB	D,[POINT 6,BPNXTC,35-30]	;"P" PORTION OF BYTE POINTER
	JRST	BCRDN1
BCRDLS:
NOTENX<
	LDB	SBITS,[POINT 18,BLSTFC,35-7]	;BLOCK COUNT FOR LIST FILE
	ADDI	SBITS,1			;FIRST BLOCK IS 1, NOT 0
	HRRZ	A,LPNT			;ADDR OF CURRENT WORD IN BUFFER
	HRRZ	B,LSTBUF		;ADDR OF FIRST WORD
	LDB	D,[POINT 6,LPNT,35-30]	;"P" PORTION OF BYTE POINTER
>;NOTENX
TENX<
	MOVE	A,BLSTFC		; CHAR COUNT FOR LIST FILE
	IDIVI	A,5			;WORD COUNT IN A, REMAINDER IN B
	SUBI	B,5			;BEGIN CONSTRUCTION OF "P" OF BYTE POINTER
	MOVM	D,B
	IMULI	D,7
	ADDI	D,1			;FINISHED
	LDB	SBITS,[POINT 18,A,35-7]	;BLOCK COUNT FOR FILE
	ADDI	SBITS,1
	ANDI	A,177			;WORD OFFSET IN A
	SETZ	B,			; FAKE IT FOR BCRND1
>;TENX	
	SETZ	C,			;LIST FILE IS NUMBER 0
BCRDN1:	SUBI	A,(B)			;WORD OFFSET IN BUFFER
;;
	TLCE	TBITS2,PCOUT!LINESO
	 ADDI	A,2			;PC OR SOS LINE NUMBER GIVES 2 EXTRA WDS
	TLCN	TBITS2,PCOUT!LINESO
	 ADDI	A,1			;BOTH GIVE 3
;;
	DPB	A,[POINT 7,SBITS,35-18]	;INSERT WORD OFFSET
	DPB	C,[POINT 5,SBITS,35-25]	;INSERT FILE NUMBER
	DPB	D,[POINT 6,SBITS,35-30]	;INSERT "P" POINTER
	MOVEM	SBITS,BCRDW1		;SAVE
BCRDN2:	HRL	SBITS,BCORDN		;COORD NUMBER
				;SEE IF ANYTHING IS IN THE ACS
	MOVSI	TEMP,-20		;LENGTH OF ACKTAB
	MOVE	A,ACKTAB(TEMP)
	JUMPE	A,.+3			;JUMP IF VACANT
	ADDI	A,1
	JUMPN	A,.+3			;JUMP IF NOT PROTECTED, I.E. BUSY
	AOBJN	TEMP,.-4		;LOOP
	TLO	SBITS,400000		;MARK AS ALLSTO

	HRR	SBITS,PCNT
	MOVEM	SBITS,BCRDW2		;SAVE

BXCRD:
;;%##% 1! JFR 4-18-76
	POP	P,D
	POP	P,C
	POP	P,B
	POP	P,A
	POPJ	P,

↑↑BCROUT:			;PUT COORD OUT TO .SM1 FILE IF NECESSARY
;;%##% 1! JFR 4-18-76
	SKIPE	TEMP,BPNXTC	;DONT PUT ONE OUT IF TEXT NOT MARKED YET
	SKIPLE	TEMP,BAILON	;SKIP IF BAIL OFF
	TRNN	TEMP,BBCRD	;SKIP IF WE WANT COORDS
	 POPJ	P,
	MOVE	TEMP,PCNT
	SKIPN	NOEMIT		;NO COORDS FOR EXPRTYPE
	CAMN	TEMP,BPPCNT	;NO SKIP IF PCNT SAME AS BEFORE
BCRPJ:	 POPJ	P,
	SETZM	BPNXTC		;REMEMBER TO MARK SOURCE AT NEXT TOKEN¬
	EXCH	TEMP,BPPCNT	;UPDATE, KEEP OLD VALUE
	JUMPE	TEMP,BCRPJ	;FIRST TIME THROQGH IS JUST SETUP
	PUSH	P,A
	PUSH	P,B
	PUSH	P,C		;TAKE CARE IN SCANNER
;;%##% 1! JFR4-18-76
	PUSH	P,D
	AOS	A,BCORDN	;INCREMENT COORD COUNT
	TLOE	A,1		;IS CURRENT TABLE OF .SM1 FILE A COORD TABLE?
	 JRST	BCROU1		;YES
	MOVEM	A,BCORDN	;UPDATE
	SETZ	SBITS,
	PUSHJ	P,VALOUT	;END PREVIOUS TABLE OF .SM1 FILE
	MOVEI	SBITS,BAICRD
	PUSHJ	P,VALOUT	;STARTCOORD TABLE
BCROU1:	MOVE	SBITS,BCRDW1
	PUSHJ	P,VALOUT	;FIRST WORD
	MOVE	SBITS,BCRDW2
	PUSHJ	P,VALOUT	;SECOND WORD
	JRST	BXCRD
>;BAIL
	
αCONCHK:
;;%DI% 3! JFR 12-2-75 CLEAN UP BEGINNING OF COORDINATE, ESP. FOR "CASE"
BAIL<	SKIPN	BPNXTC		;IF SOURCE NOT MARKED
	 PUSHJ	P,BMKSRC	; THEN DO SO
>;BAIL
	TLNE	A,LETDG		; LETTER OR NUMBER?
	JRST	CHKNUM		; YES, GO SEE WHICH
BAIL<
	CAIN	B,";"		;TEST FOR END OF STATEMENT
	 PUSHJ	P,BCROUT	;YES. PUT OUT COORDINATE
>;BAIL
;;\UR#4\ ALLOW := FOR ←, >= FOR GEQ, <= FOR LEQ , ** FOR ↑
        CAIN    B,":"
	 JRST    [PUSHJ P,[SJEAKC:
			ILDB B,PNEXTC	; PICK UP NEXT CHARACTER
			SKIPGE A,SCNTBL(B); MAKE SURE NOT END OF BUFFER ETC.
			PUSHJ P,(A)	; IF IS. HANDLE IT.
			TRNN TBITS2,-1	; LISTING?
			ML$CHR		; YEP.
			POP P,TEMP	;RETRIEVE PTR TO ARGS
			MOVE A,@(TEMP)	;ASSUME THIS
			CAMN B,1(TEMP)	;DOES 2ND CHAR MATCH?
			JRST CHAROUT	;YES, ASSUMPTION CORRECT
			MOVEM B,SAVCHR	;ASSUMPTION WRONG. SAVE 2ND CHAR
			MOVEM B,LSTCHR 
			MOVE A,@2(TEMP)	;GET ORIGINAL SEMANTICS
			JRST   CHAROUT]	;AND LEAVE
		SCNTBL+"←"	;ASSUME SEMANTICS OF ←
		0,,"="		;2ND CHAR OF := IS "="
		SCNTBL+":"	;SEMANTICS IN CASE ASSUMPTION OF ← FAILS
                ]
        CAIN    B,76		;a  GREATER THAN CHAR
	 JRST    [PUSHJ P,SNEAKC
		SCNTBL+"≥"	;ASSUME WE REALLY HAVE GEQ
		0,,"="		;2ND CHAR IS "="
		SCNTBL+76]	;ASSUMPTION FAILS, WE HAVE GTR
        CAIN    B,74
	 JRST    [PUSHJ P,SNEAKC
		SCNTBL+"≤"
		0,,"="
		SCNTBL+74]
        CAIN	B,"*"
	 JRST    [PUSHJ P,SNEAKC
		SCNTBL+"↑"
		0,,"*"
		SCNTBL+"*"]
;;\UR#4\
	TLNN	A,QUOTE		;STRING CONSTANT?
	 JRST	CHAROUT		; NO, OPERATOR, OUTPUT ID, NULL SEMANTICS
;;#XO# ! JFR 10-14-76
	TLZ	TBITS2,EOFOK	;saw a " char, must see another
				; (particularly after final END "FOO )
	SKIPN	DLMSTG		; HAS A QUOTE BEEN USED TO DELIMIT A MACRO
				;  BODY WHILE IN REQUIRE DELIMITERS MODE?
	JRST	STRNG		; NO, SCAN A STRING CONSTANT IN NORMAL MODE.
	SETZM	DLMSTG		; YES, TURN OFF DLMSTG FLAG AND TURN ON 
	SETOM	BAKDLM		;  BAKDLM FLAG SO THAT WHEN SCANNING THE 
	JRST	STRNG		;  MACRO BODY A QUOTE WILL BREAK THE SCAN.

CHKNUM:	TLNE	A,NUMB		;NUMBER PART?
	 JRST	 SCNUMB		; YES, SCAN NUMBER


; ID -- RESET FOR SCAN

DSCAN:	PUSHJ	P,INSET		;CLEAR PNAMES, COUNT, ALIGN TO FW
BAIL<
	SKIPN↓BPNXTC		;DOES DEBUGGER KNOW WHERE WE ARE?
	 PUSHJ	P,BMKSRC	;NO -- GO MARK PLACE
>;BAIL
	MOVE	TBITS2,SCNWRD	;MAKE SURE THE BITS ARE RIGHT
	TLO	TBITS2,EOFOK	;EOF CAN END THE WORLD WITHOUT KILLING IT
	MOVEI	C,1		;ACCOUNT FOR FIRST CHARACTER
	TRNA
	ML$CHR			;TO LISTING FILE
IDSCAN:	IDPB	A,TOPBYTE(USER)	;STORE CONVERTED CHAR
	ILDB	B,PNEXTC	; GET NEXT CHARACTER
	SKIPGE	A,SCNTBL(B)	;GET GOOD BITS, CHECK SPECIAL
	PUSHJ	P,CSPEC		;SPECIAL, DO SOMETHING
	TLNE	A,LETDG		;DONE WITH ID?
	 AOJA	 C,IDSCAN-1(TBITS2) ;NO, GO GET MORE.

Comment ⊗ Now the symbol is in string space, pointed to
	by the string descriptor in PNAME, etc. Store the
	count, make the lookup, set up the results ⊗

	CAIE	B,12		;IF LF, ALREADY HANDLED, LEAVE SAVCHR 0
	MOVEM	B,SAVCHR	;SAVE THE BREAK BITS (0 IF BLANK OR CR BROKE)
	MOVEM	B,LSTCHR	;ALSO HERE ANY TIME
	TLZ	TBITS2,EOFOK	;DONE WITH THIS MODE

	PUSHJ	P,UPDCNT	;UPDATE PNAME CNT, REMCHR CNT, COLLECT IF NECC.
	MOVE	LPSA,SYMTAB	;TRY TO FIND IT
	PUSH	P,B		;SAVE FOR LATER
	PUSHJ	P,SHASH		;LIKE SO
	POP	P,B		;GET IT BACK
	MOVEM	TBITS2,SCNWRD	;SAVE ANY CHANGES
	TLNE	TBITS2,LOKPRM	;STACK IT?
	 POPJ	 P,		; NO, IN STRING CONSTANT MODE

;  GET RELEVANT DATA TO STACKS

	MOVE	A,%ID		;IT IS AN IDENTIFIER
	SKIPG	LPSA,NEWSYM	;IF IT IS UNDEFINED,
	 JRST	 LSTACK		;   PUSH TO STACKS

	MOVE	TBITS,$TBITS(LPSA)
;IF CREFFING, DO IT NOW...
	TLNE	FF,CREFSW	;
	PUSHJ	P,LCREFIT

	 JUMPGE	 TBITS,USID	; NO, USER ID
	LSTDPB
	MOVE	A,TBITS		;RESULTANT PL-ID
;;%CI% ! JFR 7-26-75
	MOVEI	TEMP,$PNAME+1(LPSA)	;ADDR OF B.P. TO RES WORD
	MOVEI	LPSA,0		;MAKE NULL SEMANTICS
	CAMN	A,%COMMENT	; COMMENT?
	 JRST	 CHKSAV		; YES, GO PROCESS IT
	TLNN	TBITS,CONRES	; PARSER SWITCHING RESERVED WORD?
	JRST	STACK		; NO, RETURN RESERVED WORD
;;%CI%
	MOVEM	TEMP,TRKMCR	;CURRENT "MACRO"
	SKIPN	SWCPRS		; YES, NEED TO SWITCH PARSERS?
	 JRST	STACK		; NO, RETURN RESERVED WORD
	TLNE	TBITS2,MACIN	;IN A MACRO??
	 JRST	.+5		;YES, DON'T RECORD
	MOVEM	TEMP,TRKMCS	;	SOURCE-FILE TOKEN
	MOVEI	TEMP,TRKM.P-1
	PUSH	TEMP,FPAGNO	;	PAGE #
	PUSH	TEMP,ASCLIN	;	LINE #
;;%CI% ↑
	TLNE	TBITS,DEFINT	; PARSER INTERRUPT (I.E. NO SWITCHING)?
	JRST[SKIPE NODFSW	; DEFER DEFINE HANDLING FOR BLOCK EXECUTION?
	JRST	STACK		; YES, RETURN RESERVED WORD
	MOVE 	TEMP,SCNNO	; YES, SAVE NUMBER OF SCANS REMAINING IN LEFT HALF 
	MOVE	B,PCSAV		;  OF TOP OF PRODUCTION STACK, UNPACK $TBITS ENTRY 
	HRLM	TEMP,(B)	;  OF THE RESERVED WORD TO GET AN INDEX OF ADDRESS 
	JRST	CONDAD]		;  TO PUSHJ TO, AND SET SCNNO TO ONE.
	TLNE	TBITS,CONDIN	; CHECK IF EN@C HAS OCCURRED AS THE END OF A WHILEC,
	JRST	ENDCOK		;  CASEC, FORC, OR FORLC BODY AND IF SO, THEN DO NOT
	HLRZ	TEMP,ENDCTR	;  SWITCH PARSERS.  ENDCTR IS A POINTER TO A QSTACK 
	SKIPE	(TEMP)		;  INDICATING SUCH INFORMATION.  
	JRST	STACK		;
ENDCOK:	MOVEI	TEMP,CGPSAV-1		; DETERMINE WHICH PARSER ONE IS CURRENTLY IN AND 
	SKIPN	PRSCON		;  GET THE ADDRESS TO SAVE ITS PARSER DESCRIPTOR.
	MOVEI	TEMP,SGPSAV-1	;  SAVE SEMANTIC STACK POINTER, PARSE STACK POINTER,
	PUSH	TEMP,GPSAV	;  NUMBER OF SCANS REMAINING IN LEFT HALF OF TOP OF 
	PUSH	TEMP,PPSAV	;  PRODUCTION STACK, PRODUCTION STACK POINTER, 
	MOVE	SP,SCNNO	;  CURRENT SCNWRD, AND A POINTER TO THE SCNWRD 
	MOVE	B,PCSAV		;
	HRLM	SP,(B)		;  STACK.
	PUSH	TEMP,PCSAV	;
	MOVE	B,SCWSV		;
	MOVEM	TBITS2,(B)	; SAVE SCNWRD
	PUSH	TEMP,SCWSV	;
	HRROI	TEMP,SSCWSV ; DETERMINE WHICH PARSER IS TO BE RESUMED AND GET 
	SKIPN	PRSCON		;  THE ADDRESS OF ITS PARSER DESCRIPTOR.
	HRROI	TEMP,CSCWSV	;
	POP	TEMP,B		; RESTORE SCNWRD STACK POINTER
	TLNE	TBITS,CONDIN	; IF ONE IS SWITCHING PARSERS VIA A PUSHJ INSTEAD OF
	JRST[TLZ TBITS2,INLIN	;  PROPER SCANNING OF INLINE STARTCODE.  COMPENSATE
	TRO	TBITS2,NOLIST	;  FOR NOT POPPING TEMP.
	PUSH	B,TBITS2	;
	JRST	.+2]		;
	MOVE	TBITS2,(B)	; RESTORE SCNWRD AND TBITS2
	MOVEM	B,SCWSV		;
	MOVEM	TBITS2,SCNWRD	;
	ML$BAK			; DON'T LIST PARSER SWITCH TRIGGERING RESERVED WORDS
	POP	TEMP,B		; RESTORE CONTROL STACK POINTER
	POP	TEMP,SP		; RESTORE PARSE STACK POINTER.  MUST BE IN AC AS 
	MOVEM	SP,PPSAV	;  WELL AS IN MEMORY.
	POP	TEMP,GPSAV	; RESTORE SEMANTIC STACK POINTER
	SETCMM	PRSCON		; COMPLEMENT PARSER IN CONTROL FLAG
	MOVEI	C,1001		; ASSUME A RESUME TYPE SWITCH
	TLNN	TBITS,CONDIN	; RESUME TYPE SWITCH?
	JRST	SWTPRE		; YES
CONDAD:	HLRZ	C,TBITS		; CONDAD IS CALLED WITH THE $TBITS ENTRY 
	TRZ	C,RES+CONBTS	;  OF A PARSER INTERRUPT RESERVED WORD IN 
	LSH	C,-IF0SHF	;  TBITS.  IT INSERTS THE ADDRESS OF THE 
	MOVEI	C,PRODGO(C)	;  PRODUCTION WHICH ONE IS TO EXECUTE NEXT
	PUSH	B,C		;  IN THE PRODUCTION CONTROL STACK.  TBITS
	MOVEI	C,4001		;  IS UNPACKED TO GET AN INDEX TO A TABLE
				;  STARTING AT PRODG0 (BITS 6-8).  SET 
				;  REMAINING NUMBER OF CALLS TO SCANNER TO 
				;  ONE SO THAT THE PARSER WILL NOT SCAN 
				;  AGAIN AND SET A BIT TO DO A PUSHJ.
SWTPRE:	MOVEM	B,PCSAV		; RESTORE CONTROL STACK POINTER IN CORE
	MOVEM	C,SCNNO		; SET REMAINING NUMBER OF CALLS TO SCANNER
	JRST	STACK		; GO STACK


Comment ⊗  COMMENT -- throw out everything to next semicolon
⊗

CHKSAV:	MOVE	B,SAVCHR	;BE SURE SAVCHR IS NOT ";"
	SETZM	SAVCHR
	SETZM	LSTCHR
;; #PC#! OVERWRITING FIRST LINE IN CREF 
	JUMPE	B,COMLUP	; NULL HAS ALREADY BEEN HANDLED 
	SKIPGE	A,SCNTBL(B)	;GET BITS, CHECK SPECIAL
	PUSHJ	P,(A)		;SPECIAL, GET PAST PROBLEM
	JRST	COMLUP		;GET THEM ALL

	ML$CHR			;TO LISTING FILE
NOBAIL<
COMLUP:	CAIN	B,";"		;DONE?
	 JRST	 SCANNER		; YES
>;NOBAIL
BAIL<
COMLUP:	CAIE	B,";"		;DONE?
	 JRST	COMILD		; NO
	SETZM	BPNXTC		;YES. MARK SOURCE AT NEXT TOKEN
	JRST	SCANNER
>;BAIL
COMILD:	ILDB	B,PNEXTC	;GET NEXT CHAR
	SKIPGE	A,SCNTBL(B)	;USUAL
	PUSHJ	P,(A)
	 JRST	 COMLUP-1(TBITS2) ;GO PUT AWAY, GET ANOTHER

DSCR -- USID
DES An identifier has been found.  If it is a macro name, go
  expand it.  Otherwise call TYPDEC routine to provide the
  proper parse token for this identifier (differentiates 
  ARRAYS from PROCEDURES from STRINGS from ....
SEE TYPDEC in GEN, for providing correct parse token.
⊗

USID:	SKIPN	SWCPRS		; IN FALSE PART OF CONDITIONAL COMPILATION? 
	SKIPN	IFCREC		; YES, SHOULD MACROS BE EXPANDED? 
	JRST	TSTDEF		; YES, GO EXPAND MACROS 
;; #OF# ! MAKE SURE A IS VALID BEFORE GOING OFF TO STACK
	MOVE	A,%ID		
	JRST	STACK		; NO, DON'T EXPAND MACROS OR CHECK TYPES AND RETURN
TSTDEF:	TLNE	TBITS,DEFINE	;NEED TO EXPAND MACRTO?
	JRST	DEFRG		;YES
GOHEQ:	LSTDPB
	PUSHJ	P,TYPDEC
	JRST	STACK

DSCR DEFRG -- prepare to expand a macro
DES The Ident is a DEFINE Ident.  The steps are
1.	Save current Parse and Semantic Stack state,
	 other state which will be destroyed.
2.	If no parameters to get, go to step 5.
3.	Get a parameter (special form string constant,
	 see manual), via SCANNER (recursive call, also
	 ENTERS); place on special VARB-RING whose ring
	 variable is VARB, and whose starting element is
	 in DEFRN2.
4.	If comma, go to step 3 for more, else check for 
	 right paren.
5.	Save previous SCANNER information on DEFPDP stack,
	 set up DEFRNG for actuals, put macro body descrip-
	 tor in PNEXTC, restore stacks and VARB, etc.
6.	Handle macro expansions in listing.
7.	JRST to SCANNER for another try with the new PNEXTC
⊗

DEFRG:	HLRZ	A,%TLINK(LPSA)	; CHECK IF MACRO HAS BEEN INITIALIZED.
	JUMPN	A,DEFRG1	;
	ERR <MACRO WAS NOT INITIALIZED - INITIALIZE TO ZERO AND CONTINUE>,1; 
	SETZM	A		; SOLVES PROBLEMS SUCH AS:
	PUSHJ	P,CREINT	;  DEFINE NAME=NAME+1 WITHOUT A DEFINE NAME=0 
	MOVE	LPSA,PNT	;  OR ANOTHER INITIAL VALUE.
	MOVE	A,%NUMCON	;
	JRST	STACK		;
DEFRG1:				;CREATE A NEW DEFINE ELEMENT
	TLNE	FF,NOMACR	;EXPAND MACROS??
	JRST	[LSTDPB
		 MOVE A,%ID
		 JRST STACK];NO -- USER ID.

; IF WE DON'T WANT TO SEE MACRO NAMES IN OUTPUT LISTING, BACK UP OUTPUT PTR.
; ALSO TURN OFF LISTING FOR PARAMS

	TLNN	TBITS2,MACLST	;LIST MACRO NAMES?
	 JRST	 [ML$BAK	;NO, NULLIFY ALL TO DATE
		  TRO	TBITS2,NOLIST ;LIST NO MORE FOR A WHILE
		  JRST	.+1]

	PUSHJ	P,SCNACT	; GET ACTUAL PARAMETER LIST
	PUSHJ	P,ACPMED	; FINISH OFF THE MACRO CALL PREPARATION
	JRST	SCANNER		; TRY AGAIN (SCAN THE MACRO BODY!)

; SPECIAL DELIMITER MODE ACTUAL PARAMETER SCANNING ROUTINE

SCNPMR:	PUSHJ	P,INSET		; SET UP STRING SPACE ENTRY
	TRNA			; SKIP
	ML$CHR			; LIST MAYBE
DSPRMS:	ILDB	B,PNEXTC	; GET NEXT CHAR.
	SKIPGE	A,SCNTBL(B)	; SPECIAL?
	PUSHJ	P,CSPEC		; DO IT
	JUMPE	A,DSPRMS-1(TBITS2) ; AGAIN IF IGNORABLE
	CAME	B,CURPBG	; PARAMETER BEGIN DELIMITER?
	JRST	BALCHK		; NO, NESTED-BALANCED COMMA OR RPAR WILL BREAK
	LSTDPB			; LIST IT?
	SETZM 	BNSTCN		; SET NEST COUNT TO ZERO
	JRST	PSCAN+3		; CONTINUE SCAN
PSCAN:	LSTDPB			; LIST IT?
	IDPB	B,TOPBYTE(USER)	; DEPOSIT
	ILDB	B,PNEXTC	; GET NEXT CHAR.
	SKIPGE	A,SCNTBL(B)	; SPECIAL?
	PUSHJ	P,CSPEC		; DO IT
	CAMN	B,CURPED	; PARAMETER END DELIMITER?
	JRST    SPMEND		; YES, CHECK IF DONE
	CAMN	B,CURPBG	; PARAMETER BEGIN DELIMITER?
	AOS	BNSTCN		; INCREMENT NEST COUNT
	AOJA	C,PSCAN		; SCAN AGAIN
SPMEND: SOSL	BNSTCN		; DECREMENT NEST COUNT AND CHECK IF DONE
	AOJA	C,PSCAN		; NO, SCAN AGAIN
	ILDB	B,PNEXTC	; ADVANCE CHAR. TO KEEP IN SYNCH.
	SKIPGE	A,SCNTBL(B)	; SPECIAL?
	PUSHJ	P,CSPEC		; DO IT
	JRST 	ENDSTR		; GO TO END
DEPOSB:	CAIN	B,")"		; RIGHT PAREN WITH NONZERO NEST COUNT?
	SOS	LOCNST+RPAROF	; DECREMENT NEST COUNT
DEPOSA:	LSTDPB			; LIST IT?
	IDPB	B,TOPBYTE(USER)	; DEPOSIT
	AOJ	C,		; INCREMENT CHARACTER COUNT
	ILDB	B,PNEXTC	; GET NEXT CHAR.
	SKIPGE	A,SCNTBL(B)	; SPECIAL?
	PUSHJ	P,CSPEC		; DO IT
BALCHK:	CAIE↓B,","		; END OF PARAMETER?
	CAIN	B,")"		; 
	JRST	ENDCHK		; POSSIBLY, GO CHECK
	TLNN 	A,NEST		; NESTED CHARACTER?
	JRST 	DEPOSA		; NO, GO DEPOSIT
	MOVE 	TEMP,[AOS LOCNST-1(LPSA)] ; SET UP INSTRUCTION TO UPDATE APPROP. NEST COUNT
	TLNN	A,LNEST		; LEFT NESTED?
	TLO	TEMP,AOSSOS	; NO, CHANGE INSPRUCTION TO SUBTRACT
	HRRZ	LPSA,NSTABL(B)	; LOAD CHAR'S NESTED COUNT INDEX
	XCT	TEMP		; MODIFY COUNT
	JRST 	DEPOSA		; GO DEPOSIT
ENDCHK:	MOVEI	TEMP,NUMNST-1	; SET UP COUNT
EDLOOP:	SKIPN	LOCNST(TEMP)	; NEST COUNTEQUAL ZERO?
	SOJGE	TEMP, EDLOOP	; YES, AND TRY NEXT IF NOT DONE
	JUMPGE	TEMP,DEPOSB	; GO DEPOSIT IF NOT ALL NEST COUNTS EQUAL ZERO
	JRST 	ENDSTR		; GO TG END


DSCR -- SCNACT
DES This procedure is used to scan a list of actual parmeters for a macro
  or a conditional compilation FORLC statement.  When the latter happens
  SCNACT is called from the EXEC routine GETACT which appears in GEN. 
  FORLC statements have a body which is sCanned as many times as one has
  parameters in the actual list;in each case a different actual is used
  as the parameter.
PAR LPSA contains the semantics of the macro name or macro pseudonym in
  case a FORLC list is being scanned (address of semblk of name).
RES DEFRN2 contains the address of the first actual parameter in the list.
⊗

↑SCNACT: PUSH	P,LPSA		;SAVE SEMANTICS OF DEFINE SYMBOL
	PUSH	P,VARB		;WILL MAKE NEW ONE FOR MACRO ARGUMENTS
	PUSH	P,PPSAV	;SAVE THE STACKS
	PUSH	P,GPSAV
	SETZM	DEFRN2		;INITIALIZE FOR NEW MACRO
	SETZM	VARB
;;%CI% (2,3/5) JFR 7-25-75
	MOVEI	TEMP,$PNAME+1(LPSA)	;ADDR OF B.P. TO MACRO NAME
	MOVEM	TEMP,TRKMCR	;CURRENT MACRO
	TLNE	TBITS2,MACIN	;IN A MACRO??
	 JRST	.+5		;YES, DON'T RECORD SOURCE-FILE INFO
	MOVEM	TEMP,TRKMCS
	MOVEI	TEMP,TRKM.P-1
	PUSH	TEMP,FPAGNO
	PUSH	TEMP,ASCLIN
;;%CI% ↑
	HLRZ	TEMP,$VAL(LPSA)	;ANY PARAMETERS NEEDED?
	JUMPE	TEMP,NOPRMS	 	; NO
	MOVEM	TBITS2,SCNWRD	;NOTE CHANGES
SCNAGN:	PUSHJ	P,SCANNER	;LOOKING FOR "("
	MOVE	TEMP,(SP)	;SYNTAX OF SCANNED ELEMENT
	POP	P,GPSAV		;KEEP STACKS IN SYNCH
	POP	P,PPSAV
	ADD	P,X22
	CAMN	TEMP,%STCON	; A SPECIAL DELIMITER DECLARATION?
	SKIPE 	SWBODY		; YES, COULD WE POSSIBLY HAVE SEEN A SPEC DEL DECL.
				;  I.E. DID WE SEE ONE ALREADY?
	JRST	TSLPRN		; NO, GET LEFT PAREN.
	SKIPN	REQDLM		; TRYING TO OVERRIDE NULL DELIMITERS MODE?
	SETOM	RSTDLM		; YES, SET APPROPRIATE FLAGS
	SETOM	REQDLM		;
	SETOM 	SWBODY		; SET SWITCH DELIMITER DECLARATION FLAG
	MOVE	TEMP,[XWD -2,2]	; SET UP A COUNT
	MOVE	PNT,$PNAME+1(LPSA) ; PNT HAS BYTE POINTER TO DELIM. STRING
	HRRZ	LPSA,$PNAME(LPSA) ; LPSA HAS DELIMITER STRING LENGTH
	PUSHJ	P,GETDL2	; GET SPECIAL DELIMITER DECLARATION
	JRST 	SCNAGN		; GO BACK AND GET LEFT PAREN.
TSLPRN:	CAME	TEMP,[TLPRN&17777777]	;PARAMS? 
;;%CU% (1/2) JFR 8-16-75 make this error continuable
	 JRST	[ERR	 <MISSING "(" IN MACRO CALL>,1
		MOVEI TEMP,SCANNER
		MOVEM TEMP,-4(P)
		JRST CONACT+2] ; NO
;;%CU% ↑
	MOVEI	B,"("
	LSTDPB
	TLO	FF,PRMSCN 	; PRIME THE SCANNER FOR PARAMETER
	PUSHJ	P,FFPUSH	; SAVE OLD DEFLUK BIT OF FF AND TURN IT ON IN FF
;;#TG#	9-15-74 HJS RESTORE PARSE STACK POINTER 
PRMLUP:	MOVE	SP,PPSAV	; RESTORE SP SINCE IT POINTS TO THE PARSE STACK 
				;  SINCE OTHERWISE MAY GET OVERFLOW SINCE STACK 
				;  IS CALLED AT THE END OF EACH PARAMETER SCAN 
;;#TG# 
	SKIPN 	REQDLM		; IN SPECIAL DELIMITER MODE? 
 	JRST	PRMOLD		; NO	
	PUSHJ	P,SCNPMR	; YES, GET THE PARAMETERS
	TRNA
PRMOLD:	PUSHJ	P,SCANNER	;GET A PARAMETER
	POP	P,GPSAV		;SYNCH STACK
	POP	P,PPSAV
	ADD	P,X22

; WE KNOW RESULT IS STRING CONSTANT, SCANNER WILL RETURN NO OTHER

	SKIPN	TEMP,DEFRN2	;PUT PTR TO FIRST ARG IN DEFRN2
	 MOVE	 TEMP,NEWSYM
	MOVEM	TEMP,DEFRN2

	PUSHJ 	P,SCANNER	;GET NEXT PUNCTUATION
	MOVE	TEMP,(SP)
	POP	P,GPSAV
	POP	P,PPSAV
	ADD	P,X22		;SYNCH STACKS
	CAMN	TEMP,[TCOMA&17777777]	;LOOPING?	
	 JRST	 PRMLUP		;YES
	CAME	TEMP,[TRPRN&17777777]	;DONE?  
;;%CU% (2/2) JFR 8-16-75 make this error continuable; even recoverable
;;	 JRST	[ERR	 <MISSING "," OR ")" IN MACRO CALL>,1
;;		MOVEI TEMP,SCANNER
;;		MOVEM TEMP,-4(P)
;;		JRST CONACT]
	 PUSHJ	P,[PUSHJ  P,ER40	;inserted missing )
		   JRST	SCNBAK]		;scanner is ahead
;;%CU% ↑
	MOVE	LPSA,DEFRN2	; DETERMINE IF ALL PARAMETERS HAVE BEEN 
	MOVEI	TEMP,0		;  SPECIFIED AND IF NOT FORM NULL'S FOR 
DEFLNK:	HRRZ	LPSA,%RVARB(LPSA);  ALL THOSE LEFT OUT SO THAT ASSIGNC 
	ADDI	TEMP,1		;  WILL WORK PROPERLY 
	JUMPN	LPSA,DEFLNK	;
	MOVE	LPSA,-3(P)	; 
	HLRZ	LPSA,$VAL(LPSA)
	SUB	TEMP,LPSA	; NUMBER OF UNSPECIFIED PARAMETERS
	MOVEM	TEMP,NULCNT	; 
TSTDON:	AOSLE	NULCNT		; ALL PARAMETERS SPECIFIED? 
	JRST	CONACT		; YES, 
	PUSHJ	P,INSET		; SET UP STRING SPACE ENTRY 
	ADDI	C,2		; APPEND 177¬0 TO NULL STRING AND LINK 
	MOVEI	TEMP,177	;  ON VARB AND STRING RINGS 
	IDPB	TEMP,TOPBYTE(USER) ; 
	MOVEI	TEMP,0		; 
	IDPB	TEMP,TOPBYTE(USER) ; 
	PUSHJ	P,UPDCNT	; 
	GETBLK	NEWSYM		; 
	HRROI	TEMP,PNAME+1	; 
	POP	TEMP,$PNAME+1(LPSA) ; 
	POP	TEMP,$PNAME(LPSA) ; 
	MOVE	TEMP,[XWD CNST,STRING] ; 
	MOVEM	TEMP,$TBITS(LPSA) ; 
	PUSHJ	P,RNGSTR	; 
	PUSHJ	P,RNGVRB	; 
	JRST	TSTDON		; 
CONACT:	TLZ	FF,PRMSCN 	; DONE WITH THESE
	PUSHJ	P,FFPOP		; RESTORE DEFLUK BIT OF FF
	SKIPE 	REQDLM		; IN SPECIAL DELIMITER MODE?
	SKIPN	SWBODY		; YES, HAVE TO REVERTTO OLD DELS?
	JRST	NOPRMS		; NO
	SETZM	SWBODY		; RESET SWITCH DELIMITER DECLARATION FLAG
	SKIPN	RSTDLM		; RESTORING NULL DELIMITERS MODE?
	JRST	.+4		; NO
	SETZM	RSTDLM		; YES, RESTORE APPROPRIATE FLAGS
	SETZM	REQDLM		;
	JRST	NOPRMS		;
	HRROI	TEMP,LOCMPR+1	; GET RESTORING ADDRESS
	POP	TEMP,CURPED	; RESTORE START DEL.
	POP	TEMP,CURPBG	; RESTORE END DEL.
NOPRMS: POP	P,GPSAV		; GET SEMANTIC STACK BACK
	POP	P,PPSAV		; GET PARSE STACK BACK
	POP	P,VARB		; GET OLD VARB BACK
	POP	P,LPSA		; SEMANTICS FOR DEFINE
	MOVE	SP,PPSAV	; RESTORE SP IN CASE IT GOT FOULED UP IN
				;   SCANNER CALLS
	POPJ	P,		; RETURN



DSCR -- ACPMED
DES ACPMED prepares for a macro call once the actual parameters have been
  scanned.  It is also used to prepare for the first instantiation of the
  body of a conditional compilation WHILEC, CASEC, FORC, or FORLC statement.
PAR LPSA contains the semantics of the macro name or macro pseudonym in
  case a conditional compilation WHILEC, CASEC, FORC, or FORLC body is
  being scanned for the first time.  DEFRN2 contains the address of the
  actual parameter list in case of a FORLC statement, the address of the
  loop variable semblk in case of a FORC statement, and zero in the case
  of a WHILEC or CASEC statement.
RES At the end of this procedure one has effectively switched PNEXTC and
  PNEXTC-1 to scan the macro body or the conditional compilation body.
  Relevant information is saved on the DEFPDP stack.
⊗



↑ACPMED: MOVE	PNT,DEFPDP	;RESTORE NOW
	PUSH	PNT,DEFRNG	;SAVE OLD RING OF PARAMETERS

	PUSH	PNT,PNEXTC-1	;STRING NUMBER
	PUSH	PNT,PNEXTC	;INSTEAD SAVE THOSE WHICH
	PUSH	PNT,SAVCHR	; PARAMETERS
	MOVEM	PNT,DEFPDP
	MOVE	PNT,PLINE	;WILL SAVE IN IPLINE IF LEAVING INPUT LEVEL

	HLRZ	LPSA,%TLINK(LPSA) ; STORE THE LENGTH OF THE MACRO BODY IN THE LEFT 
	HRLZ	TEMP,$PNAME(LPSA) ;  HALF OF DEFRNG SO THAT WHEN FINISH SCANNING AN
	HRR	TEMP,DEFRN2	;  ACTUAL PARAMETER THERE WILL BE SOME INDICATION OF 
	MOVEM	TEMP,DEFRNG	;  THE MINIMUM AMOUNT OF STRING SPACE NECESSARY FOR
	PUSHJ	P,CONTX2	;  THE SCANNING OF THE REMAINDER OF THE MACRO

; DECIDE WHETHER MACRO EXPANSION SHOULD BE LISTED.

	MOVEI	B,"<"		;MARK EXPANSAON IF MACRO NAME
;;#YV# JFR 2-4-77
	TLNN	TBITS2,LSTEXP	; IS ALSO BEING LISTED
	 JRST	ACPM.1
	LSTDPB			;LISTING MIGHT BE OFF FOR OTHER REASONS
ACPM.1:
	TLGN	TBITS2,MACIN	;IN A MACRO NOW
	MOVEM	PNT,IPLINA	;CAN GET CURRENT LINE LOC FROM HERE
	TLNN	TBITS2,MACEXP	;IF MACRO EXPANSION SHOULD NOT BE LISTED,
	 TRO	TBITS2,NOLIST	; INDICATE IT
;;#YV# ↑
	MOVEM	TBITS2,SCNWRD	;UPDATE IN CORE
	POPJ	P,		; RETURN



DSCR -- CONTXT
DES CONTXT iq usEd to switch the input pointers before a macro call or
  prior to each invocation of the body of conditional compilation WHILEC,
  CASEC, FORC, or FORLC statement.  If conditional compilation is the case
  then this is virtually all thatneed be done for the reinvocation of the
  body and thus it is clearly cheaper than calling the macro in the old
  sense several times with different variables (this statement is only true
  for the WHILEC, FORC, and  FORLC statement since the body of a CASEC
  statement is only scanned once).
PAR LPSA contains the semantics of the macro name or macro pseudonym in the
  case of a conditional compilation WHILEC, CASEC, FORC, or FORLC statement.
RES PNEXTC, PNEXTC-1, PLINE, and PLINE-1 are set.
⊗



↑CONTXT: HLRZ	LPSA,%TLINK(LPSA)	;SEMANTICS FOR MACRO BODY
CONTX2:	PUSHJ	P,SGCOL1	  ;MAKE SURE THERE'S ENOUGH ROOM
	HLLZ	TEMP,$PNAME(LPSA) ;STRING NUMBER -- NULL STRING
	MOVEM	TEMP,PNEXTC-1
	MOVEM	TEMP,PLINE-1
	MOVEW	PNEXTC,$PNAME+1(LPSA) ;SET UP NEW INPUT POINTER
	MOVEM	TEMP,PLINE
	SETZM	SAVCHR		; NOTHING SCANNED AHEAD AT THIS LEVEL
	SETZM	LSTCHR		; NOTHING SCANNED AHEAD AT THIS LEVEL
	POPJ	P,		; RETURN

DSCR STRNG, etc.
DES Input a string constant. Check all identifiers to see if
  they are formal parameters to a DEFINE (macro). If so,
  replace them by their internal identifiers (delete <177>
  followed by unique code). Store string constant in string
  space, place entry in table, results to HPNT and NEWSYM. 
SEE Comments on following page for details of actual param thing.
⊗

STRNG:
	PUSHJ	P,INSET		;CLEAR AND RESET AS ABOVE
	TLZ	FF,PRMXXX	;IF " WAS FIRST CHAR, NOT IN SPECIAL MODE
STSCAN:
	ILDB	B,PNEXTC	;PRESERVE NEXT CHARACTER
BAKSTR:	SKIPGE	A,SCNTBL(B)	;DO SPECIAL THINGS
	PUSHJ	P,CSPEC		;IF REQUIRED
BAKST1:	TLNN	A,LETDG		;THINK HARD ONLY ON QUOTE, LETTDIG
	JRST 	MORSTR		; NOT LETTER OR DIGIT
	TLNE	FF,DEFLUK	; SCANNING A MACRO BODY?
	TLNE	FF,PRMSCN	; YES, SCANNING MACRO PARAMETERS
	JRST 	MORSTR		; YES, CHECK DELIMITERS
	SKIPN 	REQDLM		; SPECIAL DELIMITER MODE?
	JRST	DEFCHK 		; NO, THINK HARD
	CAMN 	B,CURMED	; MACRO BODY END DELIMITER?
	JRST	LTDEND		; YES, CHECK IF DONE
	CAMN	B,CURMBG	; MACRO BODY BEGIN DELIMITER?
	AOS	BNSTCN		; YES, INCREMENT NEST COUNT
	JRST	DEFCHK		; THINK HARD
LTDEND:	SOSL	BNSTCN		; DECREMENT NEST COUNT AND CHECK IF DONE
	JRST	DEFCHK		; THINK HARD
	JRST 	LTDCON		; TERMINATE MACRO BODY SCAN

MORSTR:	TLNN	FF,PRMXXX	;IN SPECIAL PARAMETER-SCANNING MODE?
	 JRST	 MORST1		; NO, CONTINUE

	CAIE	B,","		;END OF PARAMETER?
	CAIN	B,")"
	 JRST	 ENDSTR		; YES
	JRST	DEPOSIT		;LET SINGLE QUOTES THRU IN THIS MODE
MORST1:	SKIPN	DLMSTG		; A SPECIALLY DELIMITED STRING?
	JRST 	MORST2		; NO, GO CHECK FOR QUOTES
	CAMN	B,CURMED	; MACRO BODY END DELIMITER?
	JRST	MBDEND		; YES
	CAMN	B,CURMBG	; MACRO BEGIN DELIMITER?
	AOS	BNSTCN		; YES, INCREMENT NEST COUNT
	JRST 	DEPOSIT		; DEPOSIT
MBDEND:	SOSL	BNSTCN		; DECREMENT NEST COUNT AND CHECK IF DONE
	JRST 	DEPOSIT		; DEPOSIT
LTDCON:	LSTDPB			; PUT IT AWAY
	ILDB	B,PNEXTC 	; GET NEXT CHAR. TO KEEP IN SYNCH.
	SKIPGE	A,SCNTBL(B)	; SPECIAL?
	PUSHJ	P,CSPEC		;DO IT
	JRST	ENDSTR		; GO TO END
MORST2:	TLNN	A,QUOTE		;END OR DOUBLE-QUOTE ?
	 JRST	 DEPOSIT	; NO, PUT IT AWAY

	LSTDPB			;PUT IT AWAY
	ILDB	B,PNEXTC	;TRY NEXT
	SKIPGE	A,SCNTBL(B)	; DO THE USUAL IF SPCL
	PUSHJ	P,CSPEC
	TLNN	A,QUOTE		;IS IT ONE?
	JRST[SKIPE BAKDLM	; YES, CHECK IF NEED TO RESTORE DLMSTG
	SETOM	DLMSTG		; YES
	SETZM	BAKDLM		; TURN OFF BAKDLM
	 JRST	 ENDSTR]	; DONE

DEPOSIT:
	LSTDPB			;TO LISTING FILE IF REQD
DEPO1:	IDPB	B,TOPBYTE(USER)	;STORE CHARACTER AS IS
	AOJA	C,STSCAN	;LOOP ON RANDOM CHARACTERS


COMMENT ⊗ 
We come here if a letter or number has been seen.  If we are not
 scanning a macro body, we simply scan the rest of the characters
 which could be an identifier into the string constant, and return
 to the main string constant scanning loop.

If we are scanning a macro body, this may be a parameter name.
 The following algorithm is used:
   1. If not a letter, continue as if were not scanning macro body.
   2. Save the length of the string up to the start of the ident.
   3. Scan this (poqsible) param into the constant, no case conversion.
   4. Save the Length of the string up to the end of the ident.~∀@@j\↓'CmJ↓giCi∀A←LAMGC]]∃d@QG!CdXA	SifR0AiQK8AeKiUe\A!91)ε↓i↑Ai!J~∧@@@@A%IK]h↓oSiQ%\AiQ∀Agie%]NAG=]gh\AπCY0A↓'π¬≤@QS⊃K]hAMGC]]∃dRAi<AG←\4~∀@@@@Am∃ehAC9HAY←=Wk`AQQSfA%IK]i%MSKdQg←[∀AgaK
SCXA	SifAMKhAi<ACm←%H~∀@@@@AMiCGW%]NAe∃gkYiLXAKi\R~∀@@l\↓∪LA]=hABA⊃
∪≥∀AaCe¬[KiKHXAeKMKhA)=!¬3)∀AC]H↓!≥β≠∀Aa←S9iKef↓i↑~∀@@@@↓iQKSHAgiCQJACh↓iQJA∃]HA←_AgiK@@fXA
YKCd↓gaCG∀AkgK⊂AIke%]NA	Mββ≤X4∀@@@@AC]⊂AeKiUe\Ai<A[CS8Agie%]NAG=]giC9hAY←=`\
∀@@n\↓¬CGV↓)∨!¬e)
Aa=S]iKHAk`AQ↑AiQ∀AYK]≥iPA←_AgiK@@dXA%]gKeP@Nbn\~∀@@@@@QACeCZ↓[CeW∃dRXA→←YY←]KHAEdAaCe¬ZA]k5EKdA%]i↑AMieS]≤XAGY∃CdAgACGJ~(@@@@AkgK⊂AIke%]NAgQKaf@LAC]HhXAkAICiJ↓!≥β≠∀AG←k9hAae=aKeYdXAC]⊂AeKiUe\~∀@@@@↓i↑A[¬S\AY=←`\~(~∀A'UEgie%]NA←AKeCi%←]fA¬eJAkMKHAi<AeKiISKmJ↓iQJAIKYKm¬]hAEeiJ~∀↓a←S]QKefA→e←ZAQQJAg¬mKHA1K]Oi!fXAC9HA←]1rAoQ∃\AiQ∃rACe∀AeKC1Yr~∀↓]KKI∃HXAi<ACm←%HAiQ∀AOCe	COJA
←YYK
hAae=EYK[LAoSi A[kYQSaYJ4∀AgCYKHAa=S]iKIfAoQ%GPAa1COkK⊂AaCgβ!β'7εc↔7↔w#πS'}sM1β∞s⊃β7∞#∀4)π##∃βo+3S'εc∃βO'∪';≥π≠Cπ∂*β'7Cf+7↔;&S'?rβ'7C␈≠O'f)84(hR∃β>K;↔"↓#π∨∞K9%β&CπQβ&C∃β∂/∪K↔;"βO↔S/↓β'Mπ##∃β⊗+OW3"β?→β≡+[↔K∞`4)↓BYE%β↑K33↔"βW∨~↓↓55αβ↔π∂B↓βS#␈+∨#Qπ#=↓β⊗)βS#*↓β3π∨!9↓αvx4)β?+πKπw#↔↔MεK∃βπ∪?≠↔↔∪↔⊃β&CπQβvyβ7?⊗)β↔cO≠Q1β↔+Qβ∂F;∂↔~βπK∀hQ↓#↔6+9%β⊗+SS↔∩βS#πrβ↔[↔∩p4(XhP4(2∩⊗4~"-hhP&R2t(&¬2u*6λ$KZ6VN"α
∃α
α2⊗R$*H4(Jα*JN Iα∩⊗∧zN&PKYα∩&<JQα>∩α>R"-⊃α:Vl∩⊗Iα∧
JQ1∧:=α>ph(&B-~ &Ad_%oO∂3∃β3.s∨S!εSWOQε∪↔≠?⊗)βO∂∞s;';:β'∪↔w 4*JrN∞9PJε∩∩HJ
1DHIn∞>,rQα~M∩NQα≤BεH4PJ2NR%αλ$$KZ2&N"α&→αt*∞⊗N≤
Jd4U∩ε:N≠	h&&%αλ&	e">B
M"∃"V≤*I$%\Z:>]∧2&JN"α>:∃∧JMα>Xh(&&d"λ&	eα:⊗b$_4(&≤Z&B≡(J¬2N≤rR
1D⊃$%n-~Vε1¬"⊗NPhP%αB-~"(%¬↓2∞N∧*4(M"2:8L	22⊗$"≤4(LRJNPM~⊗⊗B∀h$%m∧r>Qα
α2⊗R$*Iα>∩α∩&≡M 4(&≤Z&B8M∩⊗F∩dh$%m¬~B⊗∞L
1α∩,b&6&$*Iα6|"∀4(LRJNQJ∞".≤z8$%Zα:<4PJ∞ε6pJ	2∞-∩6⊗⊂KYα6ε≥∩=α
|"eα⊗t!α∩⊗dJ6&R-⊂4(&U∩NP&l∩⊗∩∞XH%mαL*L4(L~ε68L⊃2∞V∀j
≤%Zα6ε∞∀yα
>%Iα
⊗<J9α∩,b&6&$*H4(L
>L&∀rNR∞pH%mαL*M1αLr∞J⊗l*:Qαt*NQα≤zV:PhP&*J≥ &∞"\~>8$KYα∞>u"&:V*α&⊃α≤~ε84Tj
⊗∩≤Yh&N⎇~1&∀rNR∞pH%mα$z:∃α<JR!αl
∞J=∧∩>∩dhR∞".≤z9h%∧
>*∧Jα
2JrN
Ek	"R
M"MI%βYα∞>,rQαεt!α2yzhPQ'2∧tzt∧≤|jhU∃"	_D,uD
Dz¬Z
∧-∩λ8∃≤*Dλ∀dLyeB∧≤→IB¬≤8→dt-$
Dz∧IytZ∧~D¬-Q!PU≤XZ¬∀k!⊃PPM
Z4@M¬H⊂HK:8∃4*λ)∃%~AQ M¬Z9MαH!⊂KZλ9∧
∀_:D-∩Dλ∀t"λ:U∃∀YjB¬$zH∀`h!~¬-≤↓~αd_⊃↔2∧l_:$z∧)xEJ¬:J$Lttλ4⎇,jAPPL
*$hL5J∧tXQ⊂KZλYd"¬	y∀u$Z$∧⎇∀Z$∧<_Q'2¬α∞>F∞≡4
↔≠PQ'2ααV4αjj
LVv?M∧ε⊗.m}&*ε≤LVw"∞<6∞vl\BεNnMrπ∨N-⊗v:=vw∨AQ#Zα¬V"αjT&O'4f␈∩=ε∂∩≤g&/$
⊗&.nE`hS4∧αk
¬URε≡≡"ε∞nLW∩ε≤LVw"aQ#Zα∧εααjT
F.v}Mαε∞nLW∩ε≤LVw"∞<6∞vl\BεNnMrπ∨N-⊗v:=vw∨AQ LE*+ M$)~E~bV5¬αK>↑6*εL]f?&¬
⊗"J6Tε6␈$∞7'⊗≥lrπ∨≤6*εl\V h!~5,∀Q_2e$)~E_HQ!∃¬-9↓∃αeH)∃%_↔>6∂6T
⊗"εL]f?&∧f␈∩∞,Vn≡∞$π/εL≡F(h!_∀$$⊃~D∀MJ5C(H↔:tLdβλ∪)zQ(∪jZλ∃∪dλ5Sr(D⊂(∀
)pS⊃)Q ¬!gS'"a]αh*id∩∧h⊗)Qagf→α]agf∪"aj⊂∩c⊂'"Pbii`T,FE≥H"2{2[7x4w→P9z9~w3P1[w9z0[:⊂4yH77{P_z⊂:4→P2w2λ7s⊂:~2P1z\92w:βE≥P⊂≤z94w→P9x0XrV⊂;Zz4⊂)≠wvP1→|ww2λ37y≥42P4Y2w:4Y4ry⊂≤qpw↔βE≥P(λ)z0qZP0yP_2s7y→V⊂;t]4⊂4r→w:⊂&→w3z4λ0r22Y⊂:7P≥7xεEα`giDU'h!,U"T*iQi∀D]Rb(!⊗Rf"!⊂⊃bj)P∩g*'P∪'gh⊂∩g⊂")P`g⊂$Q⊂''jβE≥]QUg⊃P%⊃)⊂→VL~⊗[[λ*$"i⊃P'g!QP+`iH P!$QP$ dT,P&`Pi'P*∩ j⊂'⊃bb"bλ*$$iH( j!R↔εE≥BDibbSiP#bS"i f∪,P)$Qd*⊗⊂∃'gV⊂∩g⊂&$Qd*⊂'Q⊂ a'U P⊂ SiW⊂⊂∪g&,P∀'iidP&"FE∞DDidQ"P"c⊃ aj⊂∩iP)j∀$g#P⊃`i! QbP!gS&"aj∩gg⊂&Si"P'Q*"g⊗λ!*j⊂∃`j!d∩g#FE∞DDagS)gf"H& cd∃)P$g⊃$a`j⊃b⊂*$⊂j⊂*$∩iP"$Q⊂''jλ$ h(⊃g↔εEαfgk"RDj"fT⊗~FEα`b"&Bj"fh)"faR)∀*iQi∀D]Rbbh⊂⊂gjg*λ&gi"H$'g"TjεE≥NQkg⊃H/εE∧Ql!d∧Th⊗)j∀)`k∧Nyp{2H9z94[3P1w[9z0w≥⊂9z0]2P4wλ892x_y0z4[w⊂37\εE∧fSk)iDT'k* P∃[∧]H4r2w≥4s4r\⊂92yXpw⊂∀_yP4r→w:4s~ry∀FB∧h*iR∧ih⊗∀'"l*⊂VXD]Tp{2P∀qpw7→y⊂4w≤:z⊂9]0z2Vλ0w2⊂∀' fbCE∧h*Td∧ih('"l∃!D]P
9z94[3P1w[9z0w≥∀P9z_z2WεB∧h*iR∧ih⊗∀' fbCE∧h*Td∧ih(' fQUXFEαh*idαih⊗(∪ fbDNg7{P≤2z94Y{2P∀≤7yytX6<P6[{2r∀H18⊂:≠P12sZw74w→FE∧h∃id∧iT⊗(' SbUXDNP7s⊂≤7z2w≥4pv⊂→7y6p[⊂70vYP4w⊂_ww9z_w:εEαh*idαh⊗-XWD]h'⊂fbm↑_2s7y→P4r⊂≠2w3z~∨⊂37\⊂_nFB∧h*iR∧h⊗⊗MT(∀FB∧e)hαa⊗)a∀j)εEαh'h∧Th⊗*"Sh∧]y→yzv:_w:⊂1≤εE∧iUa∧ih,_XFB∧fgk∀iDh'U* a∃MεE∧bV!d∧iT⊗)j(∀`kεEαdf"!αa⊗*"Sh∧D]Tbj⊂*T⊂#'iλ)a`g∪"iεEαfgk"SDj"fT⊗('"V*!D]Ta`g⊂⊃)'fP∩"i"P⊃'i⊂ H+d$f⊃FE∧fSk"D`K)ag*⊂&∀!∀B]cbjλ*$"P⊂$j)P⊂ aeFB∧j&'Bj!$j∀Y⊗&'Rh)&FB∧j)'S∧j!$U)Y⊗'∪f$ijα]j*i∪⊂'c#λ&$ij∩g#P#∪i⊂)"Ta`gεB∧j&'Bj!$j∀Y⊗! Pegg∧Ni`lP⊗gjSk⊃P"'g⊃P$j⊂∩c⊂)j⊂j"P!R g#bQεE∧fSk"fDU!$j)L⊗)ag∃i"∧]Uh" j⊃FE)aS()&]αh*id∩∧h⊗"∀a`g∧B]db⊂∀a`g'⊃i⊂⊗VH)a`gλ g"⊂∪'geP∩j⊂*hβE∧h'T∧h⊗*⊃fh∧]Y4|⊂:\⊂)"fPd)⊂:\tw3P≤p{2rλ4r2w≥⊂62w→z4εEαfgk'∀Dj"fTεE∧`Q"&Dj⊃fh⊗)⊃fad)
*ibi
FE∧bV!d∧iT⊗)j(∀`k∧]T*j⊂*∩"P)aPg'"iλ&'a`U$gg⊂⊂ aeFB∧h'hαih⊗(∪ fbULD]i2\z7y2H9z94[3P1w[9z0w≥⊂22yXy4x:≠yεE∧T'h∧iT⊗(' SbFE∧Pb"∧iT⊗,→→α]j42[⊂:yrH:7P3Yz⊂7w→P7y⊂≠z42yλ87tw≥2y⊂1_quP∀_2v7{JFE∧h∃id∧h-XnDNkt4qZ2{2yλ)ja)T⊂4yP_pv62Y⊗⊂4zλ;tv6λ12P-↑⊂37yλ_nFE∃)j()∪]∧ieRh#Df∀)`V'⊃kilfB]j$"TbP*"Tj)P"⊃j"i&Rg"P$Q⊂εE∧H%))jαP''h⊂i∧D]H∀_TP∃$"i"H$iP H)lfa∪f⊂'cλ*$$iH' fbCE∧ieRh#bDU!$j)K∩*!$U)T&(∀`TFEαP%))U∧P''T i∧DNP∀→∀H$j⊂$TP''jλ P)"Tbi+"Q⊂+gi⊃εE∧j∪'"Dj⊂$j)V⊃'i&`SεE∧j∪''∧j⊂$j)V⊃"c$g⊃FE∧P∩))j∧H''h T∧D]P
→TP$U⊂$iP⊂P&`aT'P( T fbj⊃i⊂' SbFEεB∧h*iR∧h⊗⊗M∀(∀DNkrP3≠zw2⊂_P80y_vP⊗VH92z9~r{2P_8⊂:7H12st[74w3H7sεEαe)h∧P⊗)a)U)∧]P≠y4st[0v⊂8_y0vP≠0vrVλ1v2p\⊂9z9~w3P9\0qrP≥7P2w→εE∧fSk"Dj⊃fh⊗∀∀h∀D]H7s⊂9\0qrP≥t4qtλ")a`S⊂:yrYεE∧h∃id%∧T⊗!f)⊃ijεEαh'h∧Th⊗!DB]g7{H92x6_qrP8_y0vP≠0vrP≥tz4⊂[[V⊂≤0y0vH⊃FE∧Sgk"dBj"fh_[[DNT7z4→y⊂;w\2⊂7sλ)ja)T⊂92y]v:⊂9→vw{2Y⊂0z⊂⊃'⊂12[7{TFB∧db(⊂∧j"fT⊗!FEαd))-αj"fh∩+ f
&()`JP≥h T fP'∃fa"iλεE∧dQ(!∧j⊃fh⊗!CE∧fgU"fDaK*'h!⊗j"T*Tbi∀DNzx20]2P2w→⊂7s⊂≤x0qrCE∧`gTDaV⊗LT(∀DNv2w3]4⊂12Y7y2P~r⊂9qXw⊗⊂∃L⊂37yλ80y0[P9x"XVεE∧Pge DPV"'∧B]P<dYv29P≤97x2\⊂1zy≤2w:⊂≤z94w→P1ww≤z↔⊂6→w3z4βEεE'∪h i≥βE∧h*Td∧h⊗XT(∀B]kpyH77z⊂≤0y0vK⊂92z_tw⊂∀_x80y→w:∀P~r2w:λ4w⊂9]94w3KεE∧e∀h∧a⊗∀a)j)α]P1<H92z9~r{4w→P18⊂≥7P2w→⊂7s⊂≠y4st[0v⊂9Xpw⊗εB∧fgk⊃Dj"fT⊗∀)h
D]P1[2py4[3P9x_qrP:≠P2w2λ7s⊂"∀a`g⊂≤qpw⊗βE∧h*Td%∧h!f)"Tj∧]P≥restoring TOPBYTE to continue macro body
	POP	SP,TOPBYTE(USER)	; scan
	HRRZ	C,(P)	;Restore length after ident scan
DN:
	TLZE	TBITS2,BACKON	;TURN LISTING BACK ON
	TRZ	TBITS2,NOLIST	;YES
	SUB	P,X11	;Toss end of ident length
	POP	P,B	;ident terminator
	POP	P,A	;bits for that terminator
	SUB	P,X11	;Beginning of ident length
	SUB	SP,X11	;count word from whichever subsr was done
	POP	SP,PNEXTC	;Finally, restore Scanner input
	POP	SP,PNEXTC-1
	EXCH	SP,STPSAV	;ONE MORE TIME
	HRRM	C,PNAME		;MAKE SURE COUNT IS REALLY HONEST
;A AND B ARE THE APPROPRIATE VALUES FOR THE ORIGINAL BREAK CHAR
	TLZ	TBITS2,LOKPRM	;LOOK NO MORE
	JRST	MORSTR		;CONTINUE THE SCAN

CLREST:
;;#WM# JFR 3-22-76 440700 BYTE POINTERS (STRNGC) CAUSE PROBLEMS
	SKIPLE	C,TOPBYTE(USER)	;BAD GUY?
	 JRST	CLRES1		;NO
	MOVEI	C,-1(C)		;MAKE HIM A GOOD GUY
	HRLI	C,010700
	MOVEM	C,TOPBYTE(USER)
CLRES1:
;;#WM# ↑
	MOVEI	C,0		; BP OF START OF ID IN TEMP
LINLUP:	CAMN	TEMP,TOPBYTE(USER) ;clear space from temp's bp to
	POPJ	P,		;current top
	IDPB	C,TEMP
	JRST	LINLUP


SBSTR:	AOS	(P)		;ADAPT TO SAIL CONVENTIONS
	MOVE	C,LPSA		;SAVE
EXTERN	SUBSR
	PUSHJ	P,SUBSR
	MOVE	LPSA,C		;RESTORE
	MOVE	USER,GOGTAB
	JRST	(B)

Comment ⊗
End of string constant -- set up results for stacking,
	go do it   ⊗

ENDSTR:
	MOVEM	TBITS2,SCNWRD	;PUT ALL THE BITS AWAY
	LSTDPB			;PUT "," OR ")" AWAY
	TLZ	FF,PRMXXX
	CAIE	B,12		;LF IS SPECIAL PROBLEM!
	MOVEM	B,SAVCHR	;SAVE BITS FOR NEXT TIME
	MOVEM	B,LSTCHR	;ALSO HERE ANY TIME
	SKIPN	SWCPRS		; SWITCHING PARSERS OK?  
	JRST	NOSWCH		; NO, 
;; #QV (1 OF 2) WILL NOW USE ENDMAC TO ADD 177-0 TO ASSIGNC BODIES
	TLNE	FF,PRMSCN	; SCANNING ACTUALS? 
	JRST	ENDACT		; YES, APPEND 177¬0 TO MACRO ACTUALS 
	JRST	NOMACW		; NO, 
;; #QV#
NOSWCH:	SKIPN	IFCREC		; EXPAND MACROS IN FALSE PART OF COND COMP? 
	TLNN	FF,PRMSCN	; YES, SCANNING MACRO ACTUALS? 
	JRST	[PUSHJ P,UPDCNT	; KEEP REMCHR HONEST 
		 JRST	STCTYP]	; DON'T ENTER STRING 
ENDACT: ADDI	C,2		; FOR ACTUAL PARAMETERS APPEND 177-0 TO END OF 
	MOVEI	TEMP,177	;  STRING, GET A SEMBLK AND PLACE IT ONLY ON 
	IDPB	TEMP,TOPBYTE(USER) ;  THE STRING RING.  ALL ACTUAL PARAMETERS TO 
	MOVEI	TEMP,0		;  A MACRO ARE LINKED ON THE VARB RING(@AQ⊃+&A]⊃≤@4∀∪∪	A∧∪)5 Y)∨A¬3)
!+'$$@v@A∧A≠βπI≡Aπβ1_A∪&↓
∪≥∪M⊃λA¬→_A)!β(A%∃≠β∪≥LA)≡@4∀∪!+M⊃∀∪ 1+!	π9(∩v@↓	≡A∪LA)≡A-∪→→'PAβ→∨9∞A)⊃∀A-β%λA%∪≥≤A/⊃∨M
A⊃¬λ@~∀%∂)¬1⊗∪≥]'3~∩$v@A∪LA!∨∪9)λAQ≡A¬2↓	
%9∞\@@4∀∪⊃%I∨∩∪)∃≠ Y!9β≠
VD∩v~∀%!∨ ∪Q≠ X⊃!≥β≠∀VbQ→A'αR@l~∀∪!= ∪)5 XI!9β≠
Q1!'αRv~∀∪5∨-
∪Q≠ Ym1/λA
≥'(YM)%∪≥≥:@vA5β↔
AM≠¬→,A∨A¬π)+β0A!β%¬≠)HA→∨∨,A→∪↔∀@~∀∪5∨-~%)≠ 0I)¬∪Q&Q→!MαR@vAαA'Q%∪≥∞↓π∨≥'Qβ≥(AM≠¬→,A1π∃!(A
=$A)⊃∀A
βπP@~∀∪A+'⊃∀% Y%≥≥')$∩l@A)⊃¬(A∪(↓∪&A≥=(A→∪9↔λA=≤A)⊃∀A')%%≥∞Aπ=≥')β9(A%∪9∞~∀vl@G#,PdA∨_@dR@∧A%≠=-λAQ'(A=≤Aβ'≥
→∞A!%
~(∪!+'!∀∪ YI≥∂-%λ∩v~∀%≠∨-
%→!'α1≥/'e~∩v~(∪≠∨-∀∪αXKM)π∨≤$v~∀∪)%'(∪M)βπ⊗$∩v~∃9∨≠βπ\t∪!+M⊃∀∪ 1+!	π9(∩vAU!	β)∀A!≥β5
Aπ≥PXA%5π⊃$X↓π∨→→∃π(A∪_A≥π∃''β%d~∀∪!U'⊂∪ 1¬∪)&$∩v~∀%!+'⊃(∪ Y'Q%∪≥&$vAπ⊃∃π⊗A∪_A')%%≥∞A⊃¬&Aβ→Iβ	2↓¬≤↓≥)IλA∪8A)⊃
~∀∪!= ∪ Y	∪)&∩$v@A'e≠¬∨_↓)β¬→∀Aβ≥λ↓∪A≥=(A)⊃∃≤A≥Q$A∪P~∀∪≠=-
∪→A'αY!9(∩v~(∪≠∨-∃~∪→!MαY≥]'3~∩l~∃')
)3 t%≠∨-
%αXK'Qπ∨≤∩l~∀∪∃I'(∪'Qβπ⊗∩$v~∀~(→	'πHA'π≥U≠∧@Z4A]k[	KdAg
C]]KH~∃	LA'GC8ABA]U[EKdZZAW∃K`AE=iPA%∃β_@Q→Y←Ci%]NRA¬]HAM%qKH~(@AeKAeKgK9iCiS=]fACI←k]H0AkgJ↓iQJA¬aae←AeSCi∀A←]J↓ChAi!JAK]⊂\~∀A∧A]k[	KdASLAG←[A←gKH↓←LAS9iKOKIfAC]⊂AmCe%←kfAMaKGS¬XAGQ¬eCGi∃ef\~(A'KJ↓iQJAMs]iC`AM←d↓BAEKQiKdA⊃KMS]%iS←\0AEkh↓QKeJ↓SfAB↓gk[[¬ert~(~∀∩∩qS]h|p\yS]P||ypWxZ⎇%]h|~(~∀Aπ=[[←\↓gK]g∀AgQ←UYHAS9ISGCQJAiQ¬hAg←5JA←L↓iQKg∀AiQS9OfA[Ugh~∀AEJAAeKgK9hAi↑↓G←]gQSiki∀ABAY∃OCXA9k[EKH\A)Q∀AeKgUYif~(@ACe∀AeKiUe]KH↓CfAI∃gGeS	KHA←8AiQJ↓←aK]%]NAa¬OJA←_A'πβ8\~∀,4∀~∃'
≥+≠∧h~∀~∀lAAπ!β%βπQ$A)<A¬
AQ%β)∃λAβ&↓	→∪5∪)$↓∪A∪9'∪	
↓')β%PCπ∨	∀~∀v@↓¬→∨π,~∀~∀%)→≥≤%αYβ)M∪∂≤∩lAβ(AM∪∂≤}~∀vv
3αF@∧@Pb↑HRA∃
H@bZf4nnAπ1β$A→→β∂&↓
∨$AMβ
)d~∀∪∃I'(∩d1↓7'π9~c:∩lA≥≡X↓∂(AI'(A=A≥+5¬$@4∀∪'↔%!≤∪']π!%&$∩vA3∃&XA∪8A
β→M
A!βI(A∨↓π∨≥	%)∪∨≥¬_Aπ∨5!∪→βQ∪∨≤}~∀∪∃I'(∪βQ∨+(∩$vA3LXA)%∃β(AβPA'∪∂8Aβ&A∧A!β%M
A)∨-≤@~(∪)→≥8∪)¬∪Q&dY∪9→∪≤∩lA≥≡X↓∪≤[→%≥
Aπ=	
}@4∀vvGeαF@BPd↑d$~∀∪∃I'(∩d1↓7'π9~c:∩lA≥≡X↓∂(AI'(A=A≥+5¬$@4∀~∃βQ∨+(t%≠∨-
%αXKβQ&∩∩w≥(A¬%)&A
=$Aβ(↓'∪∂≤↓	→∪5∪)$4∀∪∃%M(∪π⊃¬%∨+($∩w⊃β9	→
A¬&A	1∪≠∪)∃$~∀~)'π≥~Dt~∀∪M)5∧%εY'π9-β_∩m	∪∂∪Q&Aπ)HXA-β1+
~∀%')5λ∪'¬∪Q&dY		→-β_$w
→β≥&XA→=.A⊃β1A∨↓→∨≥∞↓-β→+∀~∀∪)1≥≤∪α1#+∨πQ
∩w∨
)β_AE+∨)
↓≠β%⊗PNR@|~∀∩A)%'(∩↓	π∪4∩∩w≥<XA	
∪≠β_↓≥+≠¬∃$~∀~(∪')i∧∪→!MαY→!MαVb∩mβππ+5+→β)∀A⊃%∀~∃∨πQ_t∪∪1	∧∪∧1!≥1Qε∩w∂∃(A¬β
⊗A∪≤↓'3≥π ~∀∪'-∪!∂
%αY'π9)¬_QλR~∀∪A+'⊃∀% XQα$∩∩w+M+β_AM!π∪¬_A)%∃β)≠9(~∀∪1')	!λ~∀∪≠=-
∪→A'αY'
≥-β_4∀∪≠∨Y
∪→!MαVbY⊃¬→-β0~∀∪)1≥
∪α1	∪∞~(∩A∃%M(∪∨πQ_b~∀%∃+≠!∀∪→!'∧Y≥	9+~∩wM∪≥∂→∀A!%
∪'∪∨8A∪≥)∃∂$~(∪∪∨%$∪'¬∪Q&dY		→!%ε$w→∨≥≤A∪≥)∃∂$~(∪∃%'P∪≥	9+~~∃=π)_bh∪→'⊃∪→!'∧Xf~∀%β		∩%→!'α,bXZD@DQαR4∀∪∃∨X∪7β	⊃∩∪→!MαXb∩m∪≤Aπ¬'
A'=≠
A∃=↔$AMβ3&@≤nnnn\nnnn\np~∀$∪∃∨,$\Vb∩m)∨ AAβ%(A
∨+→λ↓∨-%→→∨.X↓)∨≡~(∩∪∃%M(∩\VE:~∀∪5∨-~%→!'α1'π≥-¬_~∀∪5∨-~%→!'α,bY	¬1-β_~(∪β∨∃∧∪εY∨
)_∩∩mπ∨+≥PA	∪∂%)&A)<A	)∃π(A→=≥
@N4∀~∃	∃π∪~t4∀∪!+M⊃∀∪ 1∂)∪9(∩wπ1β$A
∨+≥(0A∂(↓∪≥)≥$~∀%)→≥≤%αY→Q	∞∩∩m!β%(↓∨A≥U≠¬$|~∀∩A)%'(∪∃≥	≥≠h∩∩w≥<~∀vv
14FA)
$@b4fZnn↓∂(A∃1!∨≥∃≥(←)∃%≠∪≥¬)∪∨≤↓π∨≥	%)∪∨≥LA')%¬∪∂⊃(4∀∪∪∨I∩∪'¬%)&dY→→∨)≥≤∩w≠+M(A¬
↓%β_4∀vvGiλFA≠]⊗@hZDfZnn↓
∪0AQ≡A!%∃-≥(↓εAπ→=¬¬%¬∂
~∀l∪)→≥8∪αY	=(∩∩w⊃π∪≠¬_A!∨%≥(}~(v∩A'∃)4∪ε0∩∩w≥<\A≥≡↓	∪∂∪Q&Aβ
Q$A	∃π∪≠β0A!(\4∀vvGiλF~∀%!+'⊂% Yε∩$w'β-∀A	∪∂%(Aπ∨U≥)&~(∪)→≥∀∪αY	=(~∀∩↓!+'⊃(∪ Y)h∩∩w)I2A
∨HA≠∨%∀A∪≥)∃∂$~(∪⊃→%h∪λYε$∩vFAQ%β∪→%≥∞A5∃%∨&4∀∪'+	∩∪λX!εR∩∩lZPFA⊃∪∂∪)LA/⊃∪
⊂Aβ%∀A≥∨(↓)%β∪1∪≥∞Ai%∨LR~∀∪¬		~∪⊂XQ R$∩w%⊂Q R@tAβ≠∨U≥(A)<Aβ	λ↓)≡Aa!∨≥9(~∀∪A+'⊂∪@Y'π≥Yβ_∩wMβ-
A→%βπ)%∨≤A-¬→+
~(∪!+' ∪ Y		→-β_4∀∪'Q5~∪'
≥-β_$∩w∪≥%)∪β_↓1!∨9≥(AYβ→+
4∀∪'Q5∧∪ε1	¬→-¬_~∀∪Q→≥≤∪∧Y→)⊃∞~∀∩↓∃%'(%
∪1βPb∩∩w∃≥λA∨_A%β0A≥+≠	$~∀%)→≥≤%αY	∨P∩∩w≠U'(A¬∀@D\D↓∨$@ED~∀∪Q→≥
∪∧Yβ)'%∂≤~∀$A∃%'P∩\Vd4∀∪%H∩y∪→1∂β_↓%β_↓π∨≥'Qβ≥(|0b~∀vlG14F↓<~∃≥=	∨(bh∪∪→	λ∪∧Y!91)ε4∀∪'↔%!∂
∪∧Y'π≥Q¬_Q∧$~∀∪!U'⊃∀∪@XQαR4∀∪→'Q	!∧~(∪)→≥8∪αYβQ'∪∂≤$w'π=≥λ@ED~∀∩↓∃%'(%≥∨	∨Pd∩∩w9≡~∀∪%∨%∩∪M¬∪)&HY	¬→A%ε∩we&XA1∨≥∞AA%π∪M∪∨≤~(∪∃%'P∪≥∨	=(b~∃9∨	∨(Ht∪!+M⊂∪ Ym
∪1βQ:~∀∪
β∪≤∪λXDZD$∩w≠∪9+&}~(∩A)→=α∩A'	∪)&d11!≥∃∞∩vAe&XA∃1!∨≥∃≥(A≥∃∂β)∪Y
~∀∪
β∪≤∪λXDVD$∩w≥≡0A!→+L}~∀∩↓∃%'($A→∂Q∪≥(∩lA!→+ OR MINUS, GET DIGIT
	 JRST	 GETINT		; HAVE DIGIT, GO GET NUMBER
FIXAT:	PUSHJ	P,TZMUL
FIXAT1:	SKIPN	(P)		;IS RESULT ZERO?
	SKIPE	-1(P)
	 JRST	.+3		;NO
	SUB	P,X33		;YES, REMOVE 2 VALUE WORDS AND DIGIT CTR WORD
	JRST	RETZER		;AND MAKE LIFE SIMPLE
	SKIPE	SCNVAL		;IF THIS IS NOT ZERO
	 JRST	EXPER3		;THEN WE HAVE A WHOPPING BIG EXPONENT
	TLZN	SBITS2,EXPNEG	;NEGATIVE EXPONENT?
	SKIPA	D,DBLVAL	;NO
	MOVN	D,DBLVAL	;YES
	POP	P,DBLVAL	;RETRIEVE MANTISSA
	POP	P,SCNVAL
	ADD	D,(P)
	HRREI	D,(D)		;EXPONENT OF 10
	SUB	P,X11		;DONE WITH FORMER DIGIT CTR WORD
	MOVE	LPSA,SCNVAL	;BEGIN CONVERTING MANTISSA TO PURE FRACTION
	JFFO	LPSA,DFSC
	MOVE	LPSA,DBLVAL	;HIGH ORDER WORD WAS ALL ZERO
	JFFO	LPSA,.+1
	ADDI	LPSA+1,=35	;HIGH WORD WAS ALL ZERO
DFSC:	MOVEI	C,-1(LPSA+1)	;# OF PLACES TO SHIFT (REMEMBER SIGN BIT)
	MOVE	LPSA,SCNVAL	;GET MANTISSA
	MOVE	LPSA+1,DBLVAL
	ASHC	LPSA,(C)	;MAKE MANTISSA INTO PURE FRACTION
	SUBI	C,=70
	MOVN	C,C		;C=EXPONENT OF 2 OF MANTISSA
	JUMPE	D,DFSC2		;EXPONENT OF 10 WAS ZERO
	PUSH	P,A		;SAVE BITS
	MOVE	A,[EXP.P1,,FR.P1]	;ASSUME EXPONENT OF 10 IS POSITIVE
	JUMPG	D,DFSCA
	TLO	SBITS2,EXPNEG	;EXPONENT WAS NEG
	MOVN	D,D
	MOVE	A,[EXP.M1,,FR.M1]	;MULT BY NEG PWRS OF 10
DFSCA:	MOVEM	LPSA,SCNVAL
	MOVEM	LPSA+1,DBLVAL
	TRNE	D,777700	;CHECK MAGNITUDE OF EXP OF 10
	 JRST	EXPERR		;EXPONENT IS TOO BIG
	TRNE	D,40		;E+-32 INVOLVED?
	TLNE	SBITS2,EXPNEG	;EXPONENT NEGATIVE?
	JRST	MULOOP		;NO
	TRNE	D,20		;OUT OF RANGE IF E-48
	 JRST	EXPERR		;BAD
MULOOP:	TRZE	D,1		;SHOULD WE MULTIPLY?
	 PUSHJ	P,DMUL..		;YES
	JUMPE	D,DFSC1		;QUIT IF EXPONENT NOW ZERO
	ASH	D,-1		;NEXT BIT INTO POSITION
	AOBJN	A,.+1		;ADD 1 TO LH
	AOJA	A,MULOOP	;AND 2 TO RH

;MULTIPLY TWO DOUBLE-LENGTH PURE FRACTIONS. ONE IS (A), OTHER IS SCNVAL, DBLVAL PAIR
;RETURN DOUBLE-LENGTH RESULT IN SCNVAL, DBLVAL
;SCALE FACTOR KEPT IN C
DMUL..:
NOKL10<	PUSH	P,SCNVAL	;SAVE HIGH
	SETZM	SCNVAL		;1ST WORD, FINAL PRODUCT
	MOVE	LPSA,(A)	;HIGH
	MULM	LPSA,DBLVAL	;* LOW
				;IGNORING 3RD WORDS: 8 EXPONENT BITS TO BURN
	MOVE	LPSA,1(A)	;LOW
	MUL	LPSA,(P)	;* HIGH
	TLO	LPSA,400000	;PREVENT OVERFLOWS
	ADD	LPSA,DBLVAL	;ADD 2ND WORDS
	TLZN	LPSA,400000	;WOULD THERE HAVE BEEN AN OVERFLOW?
	 AOS	SCNVAL		;YES, DO CARRY (SETS SCNVAL TO 1)
	MOVEM	LPSA,DBLVAL	;STORE LOW RESULT
	POP	P,LPSA		;HIGH
	MUL	LPSA,(A)	;* HIGH
	TLO	LPSA+1,400000	;PREVENT OVERFLOW
	ADD	LPSA+1,DBLVAL	;COLLECT 2ND WORD
	TLZN	LPSA+1,400000	;WOULD THERE HAVE BEEN AN OVERFLOW?
	 ADDI	LPSA,1		;YES
	ADD	LPSA,SCNVAL	;COLLECT 1ST WORD (THIS CAN'T OVERFLOW)
>;NOKL10
KL10<
	DMOVE	LPSA,SCNVAL
	DMOVEM	LPSA+2,SCNVAL
	DMUL	LPSA,(A)
	JOV	[TLO	SBITS2,INTOV
		JRST	.+1]
	DMOVE	LPSA+2,SCNVAL
>;KL10
	TLNE	LPSA,(1B1)	;NORMALIZED FRACTION?
	 JRST	.+3		;YES
	ASHC	LPSA,1		;NO, SHIFT OVER
	SUBI	C,1		;AND ADJUST EXPONENT
	MOVS	A,A		;COLLECT EXPONENT CHANGES
	ADD	C,(A)
	MOVS	A,A
	MOVEM	LPSA,SCNVAL	;STORE RESULT SO FAR
	MOVEM	LPSA+1,DBLVAL
	POPJ	P,

DFSC1:	POP	P,A		;GET BITS BACK
	MOVE	LPSA,SCNVAL	;GET VALUE
	MOVE	LPSA+1,DBLVAL
	TRNN	LPSA+1,400	;ROUND?
	 JRST	DFSC2		;NO
	TLO	LPSA,400000	;PREVENT
	TLO	LPSA+1,400000	; OVERFLOWS
	ADDI	LPSA+1,400	;YES
	TLZN	LPSA+1,400000	;WOULD THERE HAVE BEEN AN OVERFLOW?
	 ADDI	LPSA,1		;YES
	TLZE	LPSA,400000
	 JRST	DFSC2		;NO OVERFLOW
	MOVSI	LPSA,200000	;HIGH WD EXACTLY .1 (BASE 2)
	ADDI	C,1		;EXPONENT HAS INCREASED
	LSH	LPSA+1,-1	;KEEP LOW WD ALIGNED PROPERLY
DFSC2:	ASHC	LPSA,-8		;MAKE ROOM FOR EXPONENT
	FSC	LPSA,200(C)	;AND INSERT IT
	JFOV	EXPERR
	JRST	ENDNUM		;FINALLY DONE (EXCEPT TEST OVERFLOW FLAGS)

EXPER3:	SUB	P,X33
EXPERR:	ERR	<EXPONENT RANGE EXCEEDED>,1
	HRLOI	LPSA,377777	;SET UP AN INFINITY
	MOVE	LPSA+1,LPSA
	TLNE	SBITS2,EXPNEG
RETZER:	 SETZB	LPSA,LPSA+1	;BUT USE ZERO IF EXPONENT WAS NEG
	JRST	ENDNUM

ENDNMZ:	PUSHJ	P,TZMUL		;TRAILING ZEROES NOW SIGNIF.
	MOVE	LPSA,SCNVAL
	MOVE	LPSA+1,DBLVAL
ENDNUM:	CAIE	B,12		;EXCEPT FOR LINE FEED,
	MOVEM	B,SAVCHR	;SAVE FOR NEXT SCAN
	MOVEM	B,LSTCHR	;ALSO HERE ANY TIME
	TLNE	A,LETDG 	;MUST NOT BE LEETTER OR DIG OR
	 ERR	 <ILLEGAL CONSTANT>,1
	TRNN	SBITS2,FLOTNG	;REAL OR INTEGER?
	 JRST	 INDEG
	TRNN	SBITS2,DBLPRC
	 SNGL	LPSA,LPSA	;ONLY SINGLE ASKED FOR
	JRST	NUMRET
	
INTEG:	SKIPN	C		;MAKE SURE THERE WAS SOMETHING
	 ERR	 <ILLEGAL INDEGER CONSTANT>,1
	TLNE	SBITS2,INTOV	;INTEGER OVERFLOW?
	 ERR	 <INTEGER CONSTANT T@∨≡↓→β%∂∀|Xb~(∪)%≡%'¬∪)LdY∪≥Q∂$∩m≠β%⊗↓)3!
4∃≥+≠I(t∪M↔∪!≤%'/π!I&∩∩v↓∪≥'∪⊃
A
β1'
A!¬%(A∨_Aπ∨≥⊃∪)&|rε1α≤z6Bεd
R&>sy4(LRJNPLrV6RM$%m¬J⊗M1∧">9≡ α⊗:R-⊃αR"*α:V6∀*I4PJ"J2HJN
&%→I2∞u~P%m∧jε.∃∧J:R=¬"
&R~α↑>J h(&B-~ &Ad∩&RLHIn∩>r:Qα⊗42⊗∞Q∧zVRNL"∃α↑⎇∩2⊂4PJ6 =hYPM≤)~E≠∩H)∃%_⊃↔5≤-D
Uα∧iz"∧,jHU⊂h!→%,m	a∀e¬8∃Br[!Q L-λ9Le
8∩de
8∩[λ↔:4LtyHR¬¬(X4M≤→yb∧LjHT<-$	tte⊃Q LlzhThLJ
4
e89e4AQ LlzhThLJ
4
[∃HD∀eh→@hP~
U≤D!~αdtλ~4@H↔9D||4
Uα¬IλR∧uYX$-⊂Q!∃≤\~λpLtZz5Lh⊃↔5<
4	∃"¬IλU∀
λ→E∀,_K∪xh!~¬-≤	!∩¬αHYe$-*1∪Z∧iuB∧∃ZD∧M"	~2∧tzqPPM	zMαH)∃%_⊃↔4<-D	td"λ)∃%~λ(∀≤XQ!∀l⎇hQ∀e¬8∃Dt-z;∀hK:8U"¬Z∧∧4⎇$
5$99∀t8Q)e,mK~βPLYzd(L∃DTu,X9tph!→%∃≥A~5$91⊂K\yt∧$z	~@hPQ d≡⎇]V.wDα`hT|↑Bε∞d
⊗w&\|W∩α,↔≡*ε⊗αε}mO∩ε6}$π&FT∞π⊗/<]g"JaQ$~ε≡0J~∞N&∞NM≥f:π,↑&}/4¬Bbα4FN>≡N0hQaQ$d<ZI∀u#!⊃∪\<ZD∧
∧9λ∃∀:HU∩∧i~%≥ Q!∀LdH!∀∩e	hUE$1Q$l<ZI∀u#!⊃∪\<ZD∧∀MJ4∧4M*:@hP~94M∧xQ∀
e89e$∀Eλ"Hh!~¬-≤	!∃αbλ∃⊂K]9_tBλQ!∀e≥HJ∧⊂h!Q$<-I→e#P→)u0Je6⊂K\xZB∧d	∀u$XxU⊂h!~D%T⊃_2d_⊃↔5≤-D∧2∧$X9∀lD
∧d8Z2¬$tεhPQ!∀lbH9¬⊂H⊃↔5¬-Dλ∃<
⊃Q$<-IJUβP~IDtp_∃D$Lq⊃∪\M4	∃"∧∀λDL;qQ J¬	z∧PJ∧
α`H↔4∧tzD
$-%Z)`hP_8∀Lp_%B∪α!Q Lx)%L5JEPH↔8∩¬%(→∀dLht¬T-)qPPMIIdpL5ESλH↔9∧
4TλDL<~Eb¬<Z(R¬$λZ$*¬J(∀Ld→hr¬TZ)t-~λ(T4⎇(T∧M#qQ J∧→y$λL5Id⎇%!⊃∪\tud∧≤⎇YjB∧$_y∃"∧→hB∧dX~d(h!_∀$$⊃_2cλ⊃↔5L-5d∧≤⎇YjB∧$_y∃"∧→k∃<
⊃Q M¬Z9∧PM¬JETmYA⊂K]J(∀Ld→hr¬TZ)t-~	iu:¬9_ttLeaPTtzK#PM
Z4DP~¬Dkλ_DλK9ZTe$~	EJ∧+∀βαλ→d"∧_HB∧λQ*ESP→→D$⊂_%E∧t[
D_K4λt-"λ→d⎇$λZ hP~94M∧xQ∀
e89e$∀Eλ"HK89u,dD	∃"¬:I∀dbλ(R∧
λI∀<MGqPPM
Z4DP~¬BD
⊃Q LU*:@L<ZIE-αV∃¬$∀~J3∩K9It⎇Q!PU%)ZTcP→	E∃P_ED_H↔42¬%(→∀dLht¬T-)xU_h!→%,mλQ∀"eK)U,c⊃↔5
,~D∧L2	itt(Q!∀≤→a∀"bλ5⊂hP∀	%∃≥A~ETmYF⊂HK:J$LHZ%~¬xZ$*∧→J4z∧HX∀$-*4⊂hP~
U≤@~¬Dλh!→T⎇4Y⊃∀
b&∧ hPSHJ	P,M10ADA	;ADJUST VALUE TO ACCOUNT FOR TRAILING ZEROES
	SOJG	D,.-1
	POP	P,A
TZMUL1:	TLZ	C,-1		;NO TRAILING ZEROES NOW
	POPJ	P,

M10ADA:
NOKL10<	SKIPN	LPSA,SCNVAL	;ANY HIGH ORDER PART?
	 JRST	M10A.1		;NO
	IMULI	LPSA,=10	;YES
	JOV	[TLO	SBITS2,INTOV
		JRST	.+1]
	MOVEM	LPSA,SCNVAL
M10A.1:	MOVE	LPSA,DBLVAL	;LOW HALF
	MULI	LPSA,=10
	TLO	LPSA+1,400000	;PREVENT OVERFLOW
	ADDI	LPSA+1,-"0"(A)	;ADD THE NEW DIGIT
	TLZN	LPSA+1,400000	;WOULD THERE HAVE BEEN AN OVERFLOW?
	 ADDI	LPSA,1		;YES. (THIS CAN'T OVERFLOW; LPSA WAS AT MOST =9)
	MOVEM	LPSA+1,DBLVAL	;SAVE LOW HALF
	TLO	LPSA,400000
	ADD	LPSA,SCNVAL	;TAKE CARE OF HIGH HALF
	TLZN	LPSA,400000
	 TLO	SBITS2,INTOV
	MOVEM	LPSA,SCNVAL	;SAVE HIGH HALF
>;NOKL10
KL10<
	DMOVE	LPSA,SCNVAL	;FETCH ONE VALUE
	DMOVEM	LPSA+2,SCNVAL	;SAVE 2 REGS CLOBBERED BY DMUL
	DMUL	LPSA,[0 ↔ =10]	;RESULT SHOULD BE IN LPSA+3,+4
	JOV	[TLO	SBITS2,INTOV
		JRST	.+1]
	JUMPN	LPSA,.+2
	JUMPE	LPSA+1,.+2
	TLO	SBITS2,INTOV	;BUT IT MIGHT HAVE OVERFLOWED
	MOVEI	LPSA+1,-"0"(A)	;CONSTRUCT VALUE TO ADD. LPSA HAS 0 ALREADY
	DADD	LPSA,LPSA+2	;ADD
	JOV	[TLO	SBITS2,INTOV
		JRST	.+1]
	DMOVE	LPSA+2,SCNVAL	;RESTORE 2 REGS
	DMOVEM	LPSA,SCNVAL
>;KL10
	POPJ	P,

FR.P1:	240000,,0	;10↑1		PURE FRACTION PART
	0
	310000,,0	;10↑2
	0
	234200,,0	;10↑4
	0
	276570,,200000	;10↑8
	0
	216067,,446770	;10↑16
	040000,,0
	235613,,266501	;10↑32
	133413,,263574
EXP.P1:	4				;POWER OF 2 EXPONENT PART
	7
	16
	33
	66
	153

FR.M1:	314631,,463146	;10↑-1
	146314,,631463
	243656,,050753	;10↑-2
	205075,,314217
	321556,,135307	;10↑-4
	020626,,245364
	253630,,734214	;10↑-8
	043034,,737425
	346453,,122766	;10↑-16
	042336,,053314
	317542,,172552	;10↑-32
	051631,,227215
EXP.M1:	-3
	-6
	-15
	-32
	-65
	-152
Comment ⊗ Print the last character, then stack the result
⊗

LSTACK:	LSTDPB
	JRST	STACK

Comment ⊗ We have been backed up by the wonderful error routines
in the parser.  So now we return things to their normal states:
⊗

GOAGAIN: MOVE	LPSA,SAVSEM
	SKIPA	A,SAVPAR

DSCR CHAROUT -- returns value for single char operator.
DES No Semantic stack entry is necessary (a null pointer
  is stacked). The indirect, address, and index fields
  of the character comprise its PL-ID. 
⊗

CHAROUT:
	MOVEI	LPSA,0		;SEMANTICS RETURNED ARE NULL

DSCR STACK  
DES All SCANNER sub-sections return here to place Parse
  token on parse stack (PPDL) and Semantics on EXEC stack
  (GPDL). STACK is bypassed only by the string constant
  scanner when calling SCANNER recursively to modify for-
  mal parameters.
⊗
STACK:	HRRZS	LPSA		;MAKE SURE ONLY RH
	TLZ	A,777740	;CLEAR SCANNER BITS
	PUSH	SP,A		;PL ENTRY
	EXCH	SP,GPSAV	;GET GP POINTER
	PUSH	SP,LPSA		;SEMANTIC ENTRY
	EXCH	SP,GPSAV	;PUT AWAY SEMANTIC POINTER
	MOVEM	SP,PPSAV	;PUT AWAY PARSE POINTER
	SKIPN	CNDLST		; IN FALSE PART OF COND. COMP.? 
	POPJ	P,		; NO, RETURN 
	MOVE	SBITS2,LPTRSV	; YES, DO NOT LIST - I.E. RESTORE LPNT 
	ML$BAK
	POPJ	P,

DSCR INSET
DES prepare for ID or STRING constant scan
RES sets up TOPBYTE, REMCHR, PNAME, TOPSTR, C (char count)
SID Uses TEMP
⊗
↑↑INSET: MOVEI	C,0		;CLEAR CHARACTER COUNT
;;#GI# DCS 2-5-72 REMOVE TOPSTR
	MOVSI	TEMP,40		; MOST HARMLESS ¬CONST BIT
;;#GI
	MOVEM	TEMP,PNAME	;FIRST PNAME DESCRIPTOR WORD
	HLL	TEMP,TOPBYTE(USER)	;ADJUST REMCHR FOR
	HRRI	TEMP,[BYTE (7) 0,4,3,2,1,0] ;CHARACTERS SKIPPED
	ILDB	TEMP,TEMP
	ADDM	TEMP,REMCHR(USER)	;UPDATE REMCHR

	SKIPL	TEMP,TOPBYTE(USER)	;ADJUST TOPBYTE TO
	ADDI	TEMP,1		; WORD BDRY (440700 OK ALREADY)
	HRLI	TEMP,440700	;[POINT 7,WORD]
	MOVEM	TEMP,PNAME+1	;BP FOR THIS STRING
	MOVEM	TEMP,TOPBYTE(USER)	;ADJUSTED TOPBYTE
		;NOW GC CAN GO AHEAD AND HAPPEN
	POPJ	P,		;ALL SET
SUBTTL	SCANNER I/O, MACRO EXPANSION

DSCR CSPEC, SEOL, SEOM, SEOB -- Special handling routines
PAR A contains address of appropriate routine.  Many SCANNER
  state variables are perused and changed.
RES PNEXTC, SAVCHR, and friends are set to proper values after
  more file has been read, macro has been returned from, etc.
DES Called by SCANNER routines when an input char is detected
  whose SCNTBL entry indicates special conditions.  The routine
  address is in the right half of this SCNTBL word.
 CSPEC is sometimes called to save the char count (C) before dis-
  patching to the special routine (for STRINGC integrity)
 SEOL is called when the SCANNER is reading from the input file
   or a macro and an end of of line condition is detected.  A
   new line is found and the PNEXTC pointer is reinitialized.
 EOM is called when the SCANNER is reading a DEFINE body, and end
   of text (177 char) is seen. If the character following the EOT
   is non-zero, it indicates the right actual parameter to expand
   here.  If it is 0, it signals end of macro. Old input values are
   restored, things like PNEXTC and SAVCHR.
 SEOB is called when a 0 is detected while scanning. This can mean
  two things -- a TECO-type file is being read, and a buffer has
  ended in the middle of a line, or the string scanner has called
  SCANNER recursively to pick up a possible formal param.  In either
  case the right thing happens.
SEE ADVBUF routine, which these call for for file input
⊗
ZERODATA (SCANNER INPUT/OUTPUT VARIABLES)
;LINNUM -- physical line number of this output line.  Used
;    to force page ejects and new sub-numbering when too
;    many have gone out since last logical page encountered
?LINNUM: 0

?LNCREF: 0	;IF ON, CREF INFO HAS GONE OUT FOR THIS LINE

COMMENT ⊗
LPNT -- byte pointer used to deposit characters in output
    buffer (LSTBUF) -- SEOL code transfers this data, along
    with CREF data, to the output file buffers.  IDPB B,LPNT
    instructions are scattered throughout the SCANNER to build
    this output file
⊗
↑↑LPNT: 0

↑↑LSTBUF: 0	;ADDRESS OF LISTING BUFFER

;LSTCHR -- saved scan-ahead character -- sometimes slightly different
;   from SAVCHR -- used for error message (the arrow) output
↑↑LSTCHR: 0
ENDDATA

SUBTTL	Cspec, Seol


; CALL SPECIAL ROUTINE, BUT FIRST MAKE SURE CHARACTER COUNT IS
;  CORRECT IN "PNAME" (THE DESCRIPTOR FOR THE CURRENTLY DEVELOPING
;  IDENTIFIER OR STRING)

CSPEC:	HRRM	C,PNAME		;UPDATE CHAR COUNT
	JRST	(A)		;DISPATCH TO SPECIFIED ROUTINE

SEOL:	
	PUSH	P,C		;SAVE CHARACTER COUNT (CLOBBERED BY HDROV)
	TRNE	TBITS2,NOLIST	;ARE WE LISTING NOW?
	 JRST	 NOLST		; NO

ifn 0,<;;JFR 12-11-76 causes Address check for device DSK on PASS1.SAI[PUB,SYS]
;; \UR#5\ BETTER LISTING FOR CONDITIONAL COMPILATION
	SKIPE	CNDLST			;SUPPRESSING LISTING?
	JRST	[ MOVE SBITS2,LPTRSV
		  ML$BAK
		 JRST  NOLST ]
;; \UR#5\
>;ifn 0,

; TIME TO DO A LISTING

	MOVE	TBITS,LPNT	;PUT THE LINE FEED IN LIST BUFFER
LLL2:	IDPB	B,TBITS
	MOVEI	B,0		;ZERO REMAINING CHARS OF CURRENT WORD
	TLNE	TBITS,760000	;ALL DONE?
	JRST	LLL2		;NO, PUT OUT ZERO
	MOVEM	TBITS,LPNT	;SAVE AGAIN FOR A WHILE

;IF CREFING WAS DONE ON THIS LINE, TERMINATE THE CREF STUFF
	SKIPN	LNCREF		;CREF GONE OUT?
	 JRST	 NOLNX		;NOPE
	SETZM	LNCREF		;RESET.
	MOVEI	TBITS,177	;DELETE
	PUSHJ	P,CHROUT
	MOVEI	TBITS,"A"	;AND AN A
	PUSHJ	P,CHROUT
NOLNX:

; IF PCNT OUTPUT DESIRED, DO THAT FIRST

	TLNN	TBITS2,PCOUT	;WANT TO PRINT PC?
	 JRST	 NOPC		; NO

	MOVE	TBITS,PCNT	;YET ANOTHER FRNP
	ADD	TBITS,LSTSTRT	;OFFSET BY USER-PROVIDED LOC
	MOVEI	B,CHROUT	;ROUTINE TO USE
	MOVEI	PNT2,6		;ALWAYS DO 6 CHARS
BAIL<
	SKIPN	BAILON
	 JRST	.+4		;NO BAIL
	HRRZ	TBITS,BCORDN	;IF DEBUGGER IN USE, PRINT COORDINATE INSTEAD
	PUSHJ	P,FRNPD		;IN DECIMAL
	JRST	.+2		;AND SKIP OVER PC PRINTER
>;BAIL
	PUSHJ	P,[
↑FRNP1:	SKIPA	TEMP,[10]
↑FRNPD:	MOVEI	TEMP,=10
FRNP3:	IDIV	TBITS,TEMP
	IORI	SBITS,"0"
	HRLM	SBITS,(P)
	SOJE	PNT2,FRNP2
	PUSHJ	P,FRNP3
FRNP2:	HLRZ	TBITS,(P)
	JRST	(B)		;CHARACTER TO OUTPUT
]
	MOVE	SBITS,[POINT 7,[ASCII /   /]]
	PUSHJ	P,LL1+1		;SEE BELOW

; IF LINE NUMBER OUTPUT DESIRED, DO IT NEXT.

NOPC:	MOVE	SBITS,[POINT 7,ASCLIN] ;ASSUME WANT LINE NUMBER
	TLNE	TBITS2,LINESO	;IS IT THE CASE
	PUSHJ	P,[LL1: PUSHJ P,CHROUT ;CHARACTER TO OUTPUT
		      ILDB  TBITS,SBITS ;NEXT CHAR
		      JUMPN TBITS,LL1
		      POPJ   P,]+1	;KLUDGE........

; NEXT LINE UP THE BP FOR SOME RAPID-FIRE STUFF

NOTENX <
NLNO:	MOVE	TBITS,LSTPNT	;LST OUTPUT  BYTE POINTER
	MOVE	SBITS,LSTCNT	;IF ALREADY LINED UP....
HARRY:	TLNN	TBITS,760000	;LINED UP WHEN PTR PART IS 01
	JRST	LNDUP
	SOS	SBITS,LSTCNT	;DENOTE CHANGE
	IBP	TBITS		;MAINLY WANT TO ADJUST COUNT
	JRST	HARRY		;COULD PROBABLY DO CALCULATION

LNDUP:	MOVEM	TBITS,LSTPNT	;UPDATE
	IDIVI	SBITS,5		;#WORDS LEFT, NO REMAINDER GUARANTEED
	AOS	PNT2,LPNT	;WE GOT THIS FAR
	HRRZS	PNT2
	SUB	PNT2,LSTBUF	;HOW MANY WORDS?
	CAMGE	SBITS,PNT2	;IS THERE ROOM?
	 PUSHJ	 P,LSTDO	; NOW THERE IS
BAIL<
	ADDM	PNT2,BLSTFC	;WORD COUNT FOR LIST FILE
>;BAIL
	MOVNI	SBITS,5		;UPDATE CHAR COUNT
	IMUL	SBITS,PNT2
	ADDM	SBITS,LSTCNT
	EXCH	PNT2,LSTPNT	;AND LSTPNT
	ADDM	PNT2,LSTPNT	;PREV VERSION IN PNT2
	ADDI	PNT2,1
	HRL	PNT2,LSTBUF	;BLT WORD (LSTBUF,,OUTBUF)
	BLT	PNT2,@LSTPNT	;WRITE THE LINE!
>;NOTENX
TENX<
	PUSH	P,C
	PUSH	P,B
	HRRZ	2,LPNT
	HRRZ	3,LSTBUF
	SUBI	3,1(2)		;-#WRDS, INCLUDING CURRENT WORD
	IMULI	3,5		;-#CHRS, INCL. EXTRAS IN CURRENT WRD
	SKIPA	2,LPNT
	IBP	2
	TLNE	2,760000	;LAST CHAR IN WORD COUNTED?
	 AOJA	3,.-2		;UN-COUNT AN EXTRA CHAR
BAIL<
	ADDM	3,BLSTFC	; UPDATE COUNT
>;BAIL
	EXCH	1,LISJFN
	HRRO	2,LSTBUF
	JSYS	SOUT
	EXCH	1,LISJFN
	HRRZ	3,LSTBUF	;NOW ZERO LSTBUF, JUST IN CASE.
	SETZM	(3)
	HRLI	3,(3)
	ADDI	3,1
	BLT	3,(2)
	POP	P,B
	POP	P,C
>;TENX
	HRRO	TEMP,LSTBUF	;ADDR OF FIRST WORD OF BUFFER
	SUB	TEMP,[XWD 677077,1] ;POINT 5,@LSTBUF,29
	MOVEM	TEMP,LPNT	;NEW LIST POINTER
IFN FTL$DBG,<
	MOVEI	TEMP,5*=50
	MOVEM	TEMP,L$CNT
>;IFN FTL$DBG
	MOVE	TEMP,[ASCID /     /] ;BLANKS IN CASE
	MOVEM	TEMP,ASCLIN	;IN MACRO AND MORE LINES TO COME
	AOS	TBITS,LINNUM	;CHECK LINE OVERFLOW
	IDIVI	TBITS,PGSIZ
	SKIPN	SBITS
	PUSHJ	P,HDROV		;PRINT FF


; ENOUGH OUTPUT, NOW FOR SOME INPUT

NOLST:
	SKIPE	SRCDLY			;SWITCHING SOURCE INPUT?
	 JRST	 NXTSRC			; YES

	MOVE	PNT,PNEXTC
	IBP	PNT
	MOVEM	PNT,PLINE	;UPDATE IF MACRO
	TLNE	TBITS2,MACIN	;DONE IF MACRO
	 JRST	 LDO1		;DONE

; MAKE A LINE NUMBER IN CASE FILE HAS NONE
	AOS	TBITS,BINLIN	;SEQUENTIAL WITHIN PAGE
;;%DM% CMU =F4= LDE 14-JUN-76	GENERATE MORE LIKELY SOS LANE NUMBERS.
EXPO <
	CAIG	TBITS,=999	;HIGHEST LEGAL LANE NUMBER
	 IMULI	TBITS,=100
>;EXPO	=F4=
;;%DM% ↑
	MOVEI	B,[IDPB TBITS,A ;ROUTINE TO DISPENSE CHARS
		   POPJ P,]
	MOVEI	PNT2,5		;5 CHARS ALWAYS
	MOVE	A,[POINT 7,ASCLIN] ;PUTIT HERE
	PUSHJ	P,FRNPD		;GET ASCII VERSIOF
	MOVEI	TEMP,1
	ORM	TEMP,ASCLIN	;MAKE ASCID
; ACTUAL LINE NUMBER WALL OVERRIDE THIS IF THERE

	LDB TEMP,PNT		;NEXT CHAR.
	JUMPE TEMP,NULCHR	;GO FIND NON-NULL
LINCHA:	MOVE TEMP,(PNT)
αLINCHK:	TRNN TEMP,1		;ARE WE IN LINE NUMBER?
	JRST LDUNA		;NO THIS IS THE NEXT CHAR.
BAIL<	;JFR 4-18-76 AT COMPLAINT OF REM
	PUSH	P,TEMP
	SKIPN	BPNXTC		;IF SOURCE NOT MARKED
	 PUSHJ 	P,BMKSRC	;THEN MARK IT BEGINNING AT LINE NUMBER
	POP	P,TEMP
>;BAIL
	CAME TEMP,[ASCID/     /];IS IT A PAGE MARK PERHAPS
	AOJA PNT,LDUN		;NO JUST SKIP LINE NUM AND TAB
	MOVEM PNT,PNEXTC	;HDR CLOBBERS THIS
	PUSHJ P,HDR		;WRITE PAGE MARK, NEW TITLE LINE
	MOVE PNT,PNEXTC		;GET HIM BACK
	SKIPN 1(PNT)		;END OF BUFFER?
	PUSHJ P,ADVBUF		;YES, GET NEXT.
	ADDI PNT,1		;POINT BEHIND NEXT LINE NUMBER
	SKIPN TEMP,1(PNT)	;IS IT IN THIS BUFFER?
	PUSHJ P,ADVBUF		;NO.
	HRLI PNT,350700		;POINT TO FIRST CHAR. OF LINE NUMBER
	AOJA PNT,LINCHA		;AND DO IT AGAIN (IN CASE 2 PAGE MARKS).

NULCHR:	ILDB B,PNT		;MOVE ON UP
	MOVE	TEMP,(PNT)	;GET COMPLETE WORD
	JUMPN B,LINCHK		;FINALLY WE GOT SOMETHING
	IBP	PNEXTC		;KEEP IN STEP
	JUMPN	TEMP,NULCHR	;END OF BUFFER?
	PUSHJ P,ADVBUF		;YES.
	JRST NULCHR		;HERE WE GO LOOP-D-LOOP

LDUN:	SKIPE (PNT)		;IS TAB IN THIS BUFFER
	JRST LDUN1		;YES
	PUSHJ P,ADVBUF		;NO
	IBP PNT			;MAKE IT CURRENT
LDUN1:	MOVEM TEMP,ASCLIN	;CURRENT LINE#
	MOVEM PNT,PNEXTC	;THIS GUY POINTS TO TAB
LDUNA:	MOVE TEMP,PNEXTC	;MAY NOT USE PNT
	MOVEM TEMP,PLINE	;BEGINNING OF LINE
IFN FTDEBUG,<
	AOS	LINCNT		;COUNT NUMBER OF LINES SEEN
	SKIPL STPAGE		;ARE WE LOOKING FOR A PAGE/LINE?
	PUSHJ P,STPLIN		;LINE BREAK IF NECESSARY.
>
LDO1:	MOVEI B,12		;GET LINE FEED BACK.
	MOVEI A,0		;HARMLESS LF
	MOVE USER,GOGTAB
	POP	P,C		;RESTORE CHARACTER COUNT.
	POPJ P,			;WASN'T THAT WONDERFUL


; HERE WE SAVE INFO ABOUT SOURCE FILE, AND PREPARE TO GET INFO
; ABOUT NEW ONE.

NXTSRC:
NOTENX <
	MOVE	A,AVLSRC		;BITS TELLING FREE CHANNELS
	JFFO	A,GOTNEW		;FOUND A FREE ONE
	 ERR	 <NO MORE AVAILABLE SOURCE CHANNELS>
GOTNEW:
	PUSH	P,B			;SAVE NEW CHANNEL #
	MOVEI	C,ENDSRC-SRCCDB+1	;SIZE OF SAVE AREA
>;NOTENX
TENX <
	MOVEI 	C,ENDSRC-BGNSWA+1	;SIZE OF SAVE AREA
>;TENX
	PUSHJ	P,CORGET		;GET ONE
	 ERR	 <NO CORE AVAILABLE FOR FILE SWITCH>
	HRR	TEMP,B			;BLT WORD
NOTENX <
	HRLI	TEMP,SRCCDB
	BLT	TEMP,ENDSRC-SRCCDB(B)
>;NOTENX
TENX <
	HRLI	TEMP,BGNSWA
	BLT	TEMP,ENDSRC-BGNSWA(B)
>;TENX
	HRRZM	B,SWTLNK		;SAVE PTR TO SAVE AREA
	TLO	TBITS2,INSWT		;WE'RE SCANNING SWITCHED-TO FILE
	MOVEM	TBITS2,SCNWRD
	SETZM	LSTCHR			;ALWAYS DO IT
	SETZM	SAVCHR
NOTENX <
	SETZM	SAVTYI
	SETZM	EOF
	SETZM	EOL
	POP	P,A			;CHANNEL NUMBER
FOR II←0,1 <
	DPB	A,[POINT 4,SRCOP+II,12]
>
FOR II←0,3 <
	DPB	A,[POINT 4,INSRC+II,12]
>
NOEXPO <
	DPB	A,[POINT 4,SRCOP+2,12]	;PUSHJ IF EXPO
>;NOEXPO
	MOVN	TEMP,A			;-CHANNEL NUMBER
	MOVSI	LPSA,400000		;BIT
	LSH	LPSA,(TEMP)
	ANDCAM	LPSA,AVLSRC		;THIS CHANNEL UNAVAILABLE
>;NOTENX
;;%CF% JFR 7-8-75
IFN 0,<
	AOS	TEMP,LININD		;HOW FAR IN TO SPACE ON TTY
	CAILE	TEMP,MAXIND		;TOO FAR?
	SOS	LININD			;NOT REALLY
>;IFN 0
	MOVEI	TEMP,2		;INDENT ON TTY
	ADDM	TEMP,LININD
;;%CF% ↑
NOTENX <
	SETOM	TYICORE			;WILL SCAN FROM STRING
>;NOTENX
	MOVE	TEMP,GENLEF+2
;; %AN% CHECK TO BE SURE STRING CONSTANT, SINCE PRODUCTIONS NO LONGER CHECK
	MOVE	TEMP,$TBITS(TEMP)
	TRNN	TEMP,STRING	
	ERR	<SOURCE!FILE NAME MUST BE STRING>
	MOVE	TEMP,GENLEF+2
;; %AN%
	HRROI	TEMP,$PNAME+1(TEMP)	;GET STRING TO BE SCANNED
	POP	TEMP,PNAME+1
	POP	TEMP,PNAME		;PUT ER THERE
BAIL<
	SKIPN	SRCDLY			;SWITCHING SOURCE INPUT?
	JRST	BNSRCD			;NO
	QPUSH	BSRCFQ,BSRCFC		;YES. SAVE BUFF. ADDR,,BLOCK COUNT
	QPUSH	BSRCFQ,BSRCFN		;SAVE FILE NUMBER
;;#%%# ! BY JFR 11-17-74  ZERO THE BLOCK COUNT FOR THE NEW FILE
	SETZM	BSRCFC
BNSRCD:
>;BAIL
	PUSHJ	P,ENDSWT		;USE EOF CODE TO GET NEW FILE
					;SRCDLY WILL BE TURNED OFF HERE
	JRST	NOLST			;AND GO BACK TO END OF LINE CODE

; END OF BUFFER CODE.

SEOB:	TLNE	TBITS2,LOKPRM	;END OF POSSIBLE MACRO PARAM SCAN?
	POPJ	P,		;YES, IGNORE THE WHOLE THING
	MOVE	PNT,PNEXTC	;CURRENT BP
	JUMPE	PNT,ADVIT	;INITIALIZATION TIME
	SKIPE	TEMP,(PNT)	;REAL END OF BUFFER?
	 JRST	 SEOBAK		; NO, WILL COME BACK UNTIL NOT NULL
ADVIT:	
;; #PF# SUPPLY CORRECT NUMBER OF THINGS ON STACK IN CASE ADVBUG DOESN'T RETURN
	PUSH	P,C
	PUSHJ	P,ADVBUF
	POP	P,C
;; #PF#
	TRNN	TEMP,1		;LINE NUMBER? (INIT SCAN FOR SOS FILES)
	 JRST	 SEOBAK		;NO, FIND NEXT CHAR
	MOVEM	TEMP,ASCLIN	;SAVE LINE NUMBER
	IBP	PNT		;OVER TAB
	ADDI	PNT,1		;BACK IN BUSINESS
SEOBAK:	MOVEM	PNT,PLINE	;BEGINNING OF LINE
	ILDB	B,PNT		;GET CHAR
	MOVEM	PNT,PNEXTC	;UPDATE
	SKIPGE	A,SCNTBL(B)	;SPECIAL?
	JRST	(A)		;YES, HANDLE
	POPJ	P,		;NO, DONE

; END OF PAGE (TECO FILES ONLY)

SEOP:	PUSHJ	P,HDR		;PRINT FF, TITLE LINE
;; #PC#! OVERWRITING FIRST LINE OF CREF 
	MOVEI	B,0		;PRETEND A NULL CHARACTER 
	MOVEI	A,0		;BITS FOR CR
	POPJ	P,

Comment ⊗ Parameter delimiter or end of message ⊗

EOM:	ILDB	B,PNEXTC	;CHECK WHICH
	SKIPN	ASGFLG		;ASSIGNC PARAMETER NUMBER? 
	JRST	CONEOM		;NO, 
	MOVE	LPSA,B		;RETURN THE PARAMETER NUMBER IN THE 
	MOVE	A,%NUMCON	; SEMANTIC STACK 
	SUB	P,X11		; TO OVERRIDE THE PUSHJ HERE 
	JRST	STACK		;
CONEOM:	JUMPE	B,RESTOR	;ZERO, END OF MACRO (OR PARAM) TEXT
	
; PARAMETER NEEDED

	SETZM	SAVCHR
	SETZM	LSTCHR
	MOVE	LPSA,DEFRNG
GETIT:	SOJE	B,GOTIT		;LOOK FOR THE PARAMETER OF PROPER NUMBER
	RIGHT	,%RVARB,<[ERR <NOT ENOUGH ARGUMENTS SUPPLIED TO MACRO>]>
	JRST	GETIT		;KEEP LOOKING

GOTIT:
DFNEST:	MOVE	PNT,DEFPDP	;NOW SAVE STATE OF SCANNER AND RECUR
	PUSH	PNT,DEFRNG	; SAVE DEFRNG WHICH CONTAINS THE LENGTH OF THE 
	PUSH	PNT,PNEXTC-1	;  ACTUAL PARAMETER TO BE  EXPANDED.  THIS WILL
				;  ENSURE THAT WHEN A RETURN IS MADE FROM
				;  EXPANDING THE ACTUAL THERE WILL BE ENOUGH
				;  STRING SPACE FOR THE REST OF THE MACRO.  
	PUSH	PNT,PNEXTC	;INPUT POINTER
	PUSH	PNT,SAVCHR	;SCANNED AHEAD
	MOVEM	PNT,DEFPDP	;SAVE POINTER
	PUSHJ	P,SGCOL1		;MAKE SURE ENOUGH ROOM
	HLLZ	TEMP,$PNAME(LPSA) ;STRING NUMBER
	MOVEM	TEMP,PNEXTC-1
	MOVEM	TEMP,PLINE-1
	MOVEW	PNEXTC,$PNAME+1(LPSA) ;NEW INPUT POINTER
	MOVEM	TEMP,PLINE
	MOVEI	B,"<"		;MARKER FOR MACRO EXP
;;#YV# JFR 2-4-77
	TLNN	TBITS2,LSTEXP	;WANT IT?
	 JRST	DFNE.1		;SURELY NOT
	LSTDPB			;MAYBE
DFNE.1:	TLO	TBITS2,MACIN	;MARK IN MACRO
	TLNN	TBITS2,MACEXP	;EXPANDING?
	 TRO	TBITS2,NOLIST	;NO
;;#YV# ↑
	MOVEM	TBITS2,SCNWRD	;UPDATE
	TLNE	FF,PRMSCN	; SCANNING PARAMETERS?
	SKIPN	REQDLM		; YES, IN SPECAIL DELIMITER MODE?
	JRST	NEWCHR		;GO GET FIRST NEW CHAR, RET
	CAIN	P,DSPRMS+3	; IS 177-# FIRST ITEM IN ACTUAL PARAMETER
	HRRI	P,BALCHK	; YES, CHANGE RETURN ADDRESS TO REFLECT 
				; THAT UNTESTED COMMAS AND RIGHT PARS. WILL
				; BREAK SCAN
DLMPRM:	ILDB	B,PNEXTC	; SCAN REST OF CHARS. INTO STRING CONSTANT
	SKIPGE	A,SCNTBL(B)	; SPECIAL?
;; #OG# ! MAKE SURE PNAME COUNT VALID IN CASE OF REAL GARBAGE COLLECT
	PUSHJ	P,CSPEC		; DO IT
	LSTDPB			; PUT IT AWAY
	IDPB	B,TOPBYTE(USER)	; DEPOSIT IT
	AOJA	C,DLMPRM	; INCREMENT COUNT AND CONTINUE SCAN

RESTOR:	MOVE	PNT,DEFPDP
	POP	PNT,SAVCHR	;CHAR SCANNED AHEAD
	POP	PNT,PNEXTC	;OLD INPUT POINTER
	POP	PNT,PNEXTC-1	;STRING NUMBER
	ADD	PNT,X22			;START PLINE HERE
	POP	PNT,PLINE
	POP	PNT,PLINE-1
	POP	PNT,LPSA	;PERHAPS OLD DEFRNG
	MOVEM	PNT,DEFPDP
	HLRZ	TBITS,LPSA	; GET LENGTH OF MACRO TO WHICH ONE IS RETURNING AND
	PUSHJ	P,SGCOL2	;  INSURE ENOUGH ROOM IN STRING SPACE FOR IT 
	EXCH	LPSA,DEFRNG	; GET OLD DEFRNG VALUE AND IF DIFFERENT FROM CURRENT
	CAMN	LPSA,DEFRNG	;  VALUE THEN ONE IS DONE WITH THE MACRO AND THUS 
	JRST	DDUN		;  RING OF ACTUAL PARAMETERS (POINTED TO BY DEFRNG) 
	HRRZS	LPSA		;  IS REMOVED FROM THE STRING RING.  NOTE THAT 
	PUSHJ	P,KILLST	;  KILLST EXPECTS LPSA WITH ZERO IN THE LEFT HALF.  	

DDUN:	MOVEI	B,">"		;END OF EXPANSION MARKER
;;#YV# JFR 2-4-77
	TLNN	TBITS2,LSTEXP
	 JRST	DDUN.1
	LSTDPB
DDUN.1:
	SKIPN	PNEXTC-1	;OUT OF MACROS?
	TLZA	TBITS2,MACIN	;YES
	JRST	DUNRST		;NO
	PUSHJ	P,L$SET		;GET 'NOLIST' FROM ABSOLUTE BEARINGS
;;#YV# ↑
	MOVE	TEMP,IPLINE	;PLINE TO OUTER LEVEL VALUE
	MOVEM	TEMP,PLINE
	SETZM	PLINE-1

DUNRST:	MOVEM	TBITS2,SCNWRD	;SAFETY FIRST

; NOW GET A CHARACTER FOR THE SCANNER

	TLNE	FF,PRMSCN	; SCANNING PARAMETERS?
	SKIPN	REQDLM		; YES, IN SPECIAL DELIMITER MODE?
	TRNA			; SKIP
	SUB	P,X11		; POP RETURN ADDRESS, AND NOW WILL RETURN 
				; TO CHECK NESTING INSTEAD OF CONTINUING 
				; FORMAL PARAMETER SCAN
	SKIPN	B,SAVCHR	;HAVE IT ALREADY?
	JRST	NEWCHR		;NO
	SETZM	SAVCHR		;NO LONGER AHEAD (DCS 5-27-71)******
	MOVE	A,SCNTBL(B)	;YES, DON'T DISPATCH AGAIN
	POPJ	P,

NEWCHR:	ILDB	B,PNEXTC	;GET FROM INPUT
	SKIPGE	A,SCNTBL(B)	;SPECIAL?
	JRST	(A)		;YES, DISPATCH
	POPJ	P,		;NO, DONE

DSCR KILLST
CAL PUSHJ
PAR LPSA ptr to first Semblk to be released
RES Unlinks Semblk from %RSTR, releases it to free
  storage, then continues right down %RVARB until
  all Semblks on this VARB-Ring are released.
DES THIS ROUTINE IS IN THE WRONG PLACE!
SEE FREBLK, ULINK
⊗

↑KILLST:  
	PUSH	P,LPSA
	JUMPE	LPSA,KLPDUN

KLLUP:	

	PUSHJ	P,URGSTR	;UNLINK FROM STRING RING
	FREBLK
	RIGHT	,%RVARB,<[KLPDUN: POP P,LPSA
				  POPJ P,]>
	JRST	KLLUP
SUBTTL	SCANNER INPUT AND LISTING ROUTINES

DSCR ADVBUF -- new input buffer routine
DES Reads a new input buffer, gets a new source file
  if this one is exhausted or if file switching is
  happening (prints loser message if no files remain),
  and assures that the buffer ends in zero for EOB
  detection by SEOL. The buffers were made long enough
  to allow the inclusion of an extra word of zero.
SID Saves USER, C -- reinits A,B -- all others vulnerable
SEE SEOL, SEOB, routines which detect EOB and call ADVBUF.
⊗
NOTENX <
ADVBUF:	
	XCT	INSRC		;ADVANCE BUFFER
	XCT	TSTSRC		;ANY ERRORS?
	 ERR	 <I-O ERROR ON SOURCE DEVICE>,1
	XCT	EOFSRC		;TO ENDFL ON EOF
	JRST	ENDFL
BAIL <
	AOS	BSRCFC		; ADD ONE TO SOURCE FILE BLOCK COUNT
>;BAIL
	PUSHJ	P,SGCHK		;STRING GC, IF NECESSARY, TBITS←SRCCNT
	ADDI	TBITS,4		;(CHAR CT+4)/5 IS WORD COUNT
	IDIVI	TBITS,5
	ADD	TBITS,SRCPNT	;ADD BASE ADDRESS
	IBP	TBITS		;PTR TO LAST WORD+1, MAKE 0 TO
	SETZM	(TBITS)		; DENOTE EOB
	MOVE	PNT,SRCPNT	;RESET PNT TO CURRENT BP,
	MOVEM	PNT,PNEXTC	;FIX THIS GUY TOO.
	MOVE	TEMP,1(PNT)	; TEMP TO WORD NEXT REFERENCED
	POPJ	P,

; CHECK FOR STRING SPACE FULL, GC IF SO

SGCHK:
	HRRZ	TBITS,SRCCNT	;GET # OF CHARACTERS
	MOVE	TEMP,REMCHR(USER) ;TEST ENOUGH ROOM
	ADD	TEMP,TBITS
	SKIPL	TEMP		;IS THERE ENOUGH?
	 JRST	 SGCOL		;NO, COLLECT SPACE
	POPJ	P,		;NOT NECESSARY

ENDFL:	XCT	RELSRC		;RELEASE OLD FILE,
>;NOTENX
TENX <
ADVBUF:	PUSH	P,1
	PUSH	P,2
	PUSH	P,3
	SKIPE	TTYSRC		;CONTROLLING TERMINAL SOURCE DEVICE?
	  JRST	ADVTTY		;YES
	SKIPN	TNXBND		;ANYTHING IN THE BUFFER?
	  JRST	ADVBF1		;NO DONT CHECK
	HRRZ	1,PNEXTC 	;LOOK AT ADDR
ADVBF2:	CAML	1,TNXBND	;BEYOND BUFFER?
	  JRST	ADVBF1		;YES, CHECK EOF, GET MORE IF THERE
	SKIPN	1(1)		;0 WORD?
	  AOJA	1,ADVBF2	;YES KEEP LOOKING FOR INFO IN THE BUFFER
	HRLI	1,010700
	PUSH	P,1		;SAVE NEW BP
	PUSHJ	P,SGCHK		;CHECK GARBAGE COLLECTION
	POP	P,PNT		;BP TO PNT
	POP	P,3		;RESTORE
	POP	P,2
	POP	P,1
	MOVEM	PNT,PNEXTC
	MOVE	TEMP,1(PNT)	;WHICH IS NON-ZERO BECAUSE WE JUST CHECKED
	POPJ	P,

ADVBF1:	HRRZ	1,SRCJFN
	JSYS	GTSTS
	TLNE	2,1000		;EOF?
	 JRST	ENDFL		;YES
BAIL <
	AOS	BSRCFC		;ADD ONE TO SOURCE FILE BLOCK COUNT
>;BAIL
	HRR	2,SRCPNT
	ADDI	2,1		;SRCPNT IS A 7-BIT POINTER THAT IS A WORD EARLY
	HRLI	2,444400	;36-BIT POINTER.
	MOVNI	3,SRCBSZ	;SIZE OF SRC BUF IN WRDS, MINUS EOB NULL
	JSYS	SIN		;SRCJFN OPEN FOR 36BIT INPUT
	HRRZM	2,TNXBND	;SAVE END OF BUFFER ADDRESS FOR CHECKS ABOVE
	SETZM	1(2)		;EOB NULL.
ADVDUN:	PUSHJ	P,SGCHK
	POP	P,3
	POP	P,2
	POP	P,1
	MOVE	PNT,SRCPNT	;RESET PNT TO CURRENT BP,
	MOVEM	PNT,PNEXTC	;FIX THIS GUY TOO.
	MOVE	TEMP,1(PNT)	;GET THE FIRST WORD IN TEMP
	POPJ	P,

; CHECK FOR STRING SPACE FULL, GC IF SO

SGCHK:
	MOVEI	TBITS,SRCBSZ*5	;TENEX BUFFER SIZE
	MOVE	TEMP,REMCHR(USER)	;REMAINING CHARS
	ADD 	TEMP,TBITS
	SKIPL	TEMP			;ENOUGH?
	   JRST	SGCOL		;NOT ENUF STRNG SPACE FOR A FULL BUFFER
	POPJ	P,		;NOW THERE IS

DSCR ADVTTY
	Since the boys at BBN have seen fit to not provide a standard
line editor into their system, we must resort to using some runtimes
to handle input in the case that the source is a TTY.  We confine the
problem to the case that the source is the controlling teletype, as
indicated by the SRCTTY (set in CC), and use INTTY.  INTTY at IMSSS
uses the IMSSS PSTIN jsys, otherwise a simulation of same.
⊗;

ADVTTY:
EXTERNAL .SKIP.
EXTERNAL INTTY
	EXCH	SP,STPSAV
	PUSHJ	P,INTTY		;GET A STRING USING THE PSTIN JSYS
	POP	SP,A		;BYTE POINTER
	POP	SP,C		;XWD -1, LENGTH -- STACKS ARE NOW OK
	EXCH	SP,STPSAV
	MOVE	B,.SKIP.
	CAIN	B,32		;CONTROL-Z TO INDIATE EOF
	  JRST	ENDFL		;YES END OF FILE
	MOVE	B,SRCPNT
	HRRZ	C,C	
	MOVNS	C		;NUMBER OF CHARS TO TRANSFER
	JSYS	SIN		;USE SIN TO TRANSFER STRING
	MOVEI	C,15
	IDPB	C,B
	MOVEI	C,12
	IDPB	C,B
	SETZ	C,
	REPEAT 5, <IDPB	C,B>	;PUT NULLS THERE
	SETZM	(B)		;BE SURE TO INDICATE EOF
	SETZM	1(B)		
	JRST	ADVDUN		;AND FINISH UP, ABOVE

ENDFL:
	HRRZ	A,SRCJFN
	JSYS	CLOSF
	  JFCL
	HRRZ	A,SRCJFN
	JSYS	RLJFN
	  JFCL
	POP	P,3
	POP	P,2
	POP	P,1

>;TENX
ENDSWT:	MOVEM	TBITS2,SCNWRD	;UPDATE IN CORE VERSION
	PUSHJ	P,FILEIN	;FIND AND INIT NEW ONE
	JRST	[TLNN	TBITS2,EOFOK
;;%CI% ! (4/5)
		 JRST	ENDSW1
		 MOVNI	B,1	;MARK END OF FILE NEXT TIME
		 MOVEI	A,1	;HARMLESS, BUT BREAKS IGNORABLE
		 SUB	P,X11	;RETURN EARLY
		 POP	P,C	;CHAR COUNT BACK
		 POPJ	P,]
ENDSW3:
;;%DE% ! JFR 10-25-75	PUSHJ	P,MAKT		;PREPARE NEW TITLE LINE
	SKIPE	SRCDLY		;COMING BACK FROM SWTCHED-TO FILE?
	 JRST	 SWTBKP		; YES, DO MORE BOOKKEEPING
	SETZM	FPAGNO		;FIRST PAGE IN NEW FILE
	PUSHJ	P,HDR		; , DENOTE IT
	JRST	ADVBUF		; OR PRINT LOSING MESSAGE, TRY AGAIN

↑↑XTCONT:MOVSI	16,INIACS	;RESTORE
	BLT	16,16
	JRST	ENDSW3

;;%CI% (5/5) JFR 7-18-75
ENDSW1:
	MOVEI	TEMP,LININD+1	;MAKE SURE TRKMCS AND TRKMCR POINT A LEGIT STRING
	SKIPN	TRKMCS
	 MOVEM	TEMP,TRKMCS
	SKIPN	TRKMCR
	 MOVEM	TEMP,TRKMCR
	MOVEI	TEMP,0		;ASSUME FILE JUST RAN OUT
	TLNE	FF,PRMSCN	;SCANNING MACRO ACTUALS?
	 MOVEI	TEMP,[ASCIZ/macro parameters/]
	SKIPE	CNDLST
	 MOVEI	TEMP,[ASCIZ/false conditional compilation/]
	JUMPN	TEMP,.+4	;IF ALREADY SOME BAD REASON
	SKIPE	XTFLAG		;ELSE TEST FOR EXTENDED COMPILATION
	 JRST	XTCOMP
	MOVEI	TEMP,[ASCIZ/file/]
	HRLI	TEMP,(<POINT 7,0>)	;MAKE BYTE POINTER
;;%DH%
	MOVE	SBITS,TRKBEG	;SECOND SEMBLK OF CURRENT BEGIN
	HLRZ	TBITS,(SBITS)	;FIRST SEMBLK OF BEGIN
	ERRSPL	[[ASCIZ\
Fatal end of source file, scanning @A.
BEGIN @I  @E/@D
Last source-file macro: @I  @E/@D
Current macro: @I
\]
		PWORD	TEMP		;MORE EXPLICIT REASON
		PWORD	$PNAME+1(TBITS)	;BLOCK NAME
		PWORD	$PNAME+1(SBITS)	;LINE #
		PWORD	$PNAME(SBITS)	;PAGE #
		PWORD	@TRKMCS		;MACRO NAME
		PWORD	TRKM.L		;LINE #
		PWORD	TRKM.P		;PAGE #
		PWORD	@TRKMCR]	;MACRO NAME
	JRST	ENDSW3

XTCOMP:
NOTENX<
;;%DL% JFR 4-30-76 prevent enclobberment if /X and /B
IFN 0,<	;some problems remain
	SKIPE	BAILON
	SKIPN	XTFLAG
	 JRST	XTC.NR		;MISSING ONE OR BOTH OF /X, /B
	MOVE	TEMP,SM1FIL
	MOVEM	TEMP,NAME
	MOVSI	TEMP,'SM0'	;NEW EXTENSION
	MOVEM	TEMP,EXTEN
	MOVEM	TEMP,SM1EXT
	SETZM	WORD3
	MOVE	TEMP,SM1PPN
	MOVEM	TEMP,PPN
	RENAME	SM1,NAME
	 ERR	<RENAME error .SM1>,1
XTC.NR:
>;IFN 0,
;;%DL% ↑
	PUSH	P,SM1DEV	;SAVE NAME OF .SM1 FILE
	PUSH	P,SM1FIL
	PUSH	P,SM1EXT
	PUSH	P,SM1PPN
	PUSH	P,BINDEV	;AND .REL FILE
	PUSH	P,BINFIL
	PUSH	P,BINEXT
	PUSH	P,BINPPN
>;NOTENX
	MOVEI	TEMP,INIACS	;SAVE OUR ACS HERE
	BLT	TEMP,INIACS+17
TENX<
	HRROI	1,XTSFIL
	SETZ	3,
	SKIPN	2,SM1JFN
	 JRST	.+2
	JSYS	JFNS
	HRROI	1,XTBFIL
	SETZ	3,
	SKIPN	2,BINJFN
	 JRST	.+2
	JSYS	JFNS
>;TENX
	HRLZS	XTFLAG		;WHEN WE START AGAIN, WE ARE XTENDED!!!!!
	HRROS	JOBHRL		;GET RID OF SECOND SEGMENT??
	HRRZ	TEMP,JOBREL	;HIGHEST LEGAL ADDR IN LOW SEG
	MOVSI	TEMP,1(TEMP)	;FIRST FREE LOC,,0
	HRRI	TEMP,XSTART	;NEW START ADDR
	MOVEM	TEMP,JOBSA	;NOW .SAVE HAD BETTER DO THE RIGHT THING
	PUUO	3,[ASCIZ/
SAVE ME FOR USE AS XSAIL./]
	JRST	RELSE

; WE HAVE OLD SOURCE FILE BACK, FAKE ADVBUF
SWTBKP:
BAIL <
	QPOP	BSRCFQ,BSRCFN	;RETRIEVE PREVIOUS FILE NUMBER
	QPOP	BSRCFQ,BSRCFC	;RETRIEVE BUFF.ADDR,,BLOCK COUNT
>;BAIL
	PUSHJ	P,HDROV		;CONTINUE PAGE NUMBERING FOR FILE
	SETZM	SRCDLY
	PUSHJ	P,SGCHK		;CHECK (LIBERALLY) FOR STRING SPACE FULL
	MOVE	TEMP,PNEXTC	;NOW SET UP PNT, PNEXTC, AND TEMP AS
SWTLUP:	SKIPN	(TEMP)		; THEY WOULD BE COMING OUT OF ADVBUF
	 JRST	 ADVBUF		;WE WERE AT END OF BUFFER ANYWAY
	MOVE	PNT,TEMP	;WE'RE GOING TO GET AHEAD OF SELVES
	ILDB	TBITS,TEMP	;CHECK NULLS
	JUMPE	TBITS,SWTLUP	;ALL THIS UNECESSARY IF SOS FILES, BUT...
	MOVEM	PNT,PNEXTC	;FAKE ADVBUF
	MOVE	TEMP,(TEMP)	;WORD WITH NON-NULL CHAR
	POPJ	P,
;;%CI% ↑

BAIL <
↑↑UPDCNT:	HRRM	C,PNAME			;UPDATE PNAME
>;BAIL
NOBAIL<
UPDCNT:	HRRM	C,PNAME			;UPDATE PNAME
>;NOBAIL
	ADDB	C,REMCHR(USER)		;AND REMCHR
	CAMGE	C,[-=50]		;ARE WE NEARING CATASTROPHE?
	 POPJ	 P,			; NO
;EVEN THIS CANNOT PREVENT OCCASIONAL DEATH
	MOVEI	TBITS,=50		;REQUIRE AT LEAST THIS MANY
	JRST	SGCOL			;GO COLLECT

SGCOL1:	HRRZ	TBITS,$PNAME(LPSA)	;CHAR COUNT
SGCOL2:	MOVE	USER,GOGTAB
	MOVE	TEMP,REMCHR(USER)		;REMAINING CHARS
	ADD	TEMP,TBITS
	SKIPGE	TEMP				;NOT ENOUGH?
	 POPJ	 P,				;NO, OK

SGCOL:	EXCH	SP,STPSAV	;GET STRING STACK
	MOVSS	POVTAB+6	;calling seq. to .SONTP may oflow
	PUSH	P,TBITS		;PASS TO STRGC THIS WAY
	PUSHJ	P,STRGC	;COLLECT STRING SPACE
;;#QO# -- BE SURE PNAME STAYS TOGETHER 1-25-74 RHT
	EXTERN 	.SONTP
	PUSH	SP,PNAME
	PUSH	SP,PNAME+1
	PUSH	P,[0]
	PUSHJ	P,.SONTP
	POP	SP,PNAME+1
	POP	SP,PNAME
;;#QO#
	EXCH	SP,STPSAV	;GET IT BACK
	MOVSS	POVTAB+6
	POPJ	P,		; NO, GO AHEAD
NOTENX <

?CHROUT: SOSG	LSTCNT		;ONE CHAR OUTPUT ROUTINE
	PUSHJ	P,LSTDO		;DO AN OUTPUT
	IDPB	TBITS,LSTPNT	;DO THE OUTPUT
	POPJ	P,

?LSTDO:	OUT	LST,
	POPJ	P,
	ERR	<I-O ERROR ON LISTING DEVICE>,1
	POPJ	P,
>;NOTENX
TENX <
?CHROUT: EXCH	TBITS,2
	EXCH	1,LISJFN
	JSYS	BOUT
	EXCH	1,LISJFN
	EXCH	TBITS,2
	POPJ	P,
>;TENX

DSCR --HERE IS THE CREFFINF STUFF (STRANGE PLACE N'EST CE PAS?)
DES We'll leave it at these comments for the nonce:
 For those of you who are interested in what cref output looks like, allow
 me to discourse for a while on it.  Basically, the output line is
 preceeded by a whole mess of garbage. (In the following discussion,
 let # stand for delete -- octal 177).

1. The first thing in a line with cref information in it must be
	#B    .  This is handled in crefout.

2. There are two types of symbols:
	a. NUMSYM's, which are represented by a six-digit number(decimal)
		which is unique to that occurrance of the symbol.
		The number is represented by an octal 6 (length of symbol)
		followed by the number in ASCII.
	b. SYMSYM's, which are the real symbolic symbols.  These consist
		of one byte of length, followed by the symbol in ASCII

3. When an identifier is seen in the source text, you do one of
	several things:
	1  followed by the NUMSYM -- a regular identifer seen.
	3  followed by the SYMSYM -- a reserved word.
	5  followed by the NUMSYM -- a macro use.
  -- it is occasionally to flush the last type 1instance.  This is done
 	by following it immediately with a 7.

4. When defining things, we putout:
	1 followed by the NUMSYM followed by 2 -- ordinary identifier
	6 followed by NUMSYM -- macro.

5. When beginning a block, we put out a 15 followed by the SYMSYM.
6. When ending a block, we put out a 16 followed by the SYMSYM.
	Then come the equivalences of numbers and symbolic names.
7. To equivalence an ordinary symbol, we put out 11 followed by
	the NUMSYM followed by the SYMSYM.

8. When all done with the cref information for a line, we put out
	#A    .
⊗

BEGIN CREF

↑LCREFIT: 
	TDZA	C,C
↑ECREFIT: MOVNI C,1		;CREF FOR ENTER.
	SKIPE	CNDLST		; IN FALSE PART OF CONDITIONAL COMPILATION? 
	POPJ	P,		; YES, DO NOT CREF 
	TLNN	TBITS,CNST	;IF A CONSTANT, FORGET IT.
	TLNE	FF,NOCRFW	;AN EXTERNAL PROCEDURE -- DO NOT CREF;
	POPJ	P,
	MOVE	A,X11		;ORDINARY IDENTIFIER.
	TLNE	TBITS,DEFINE	;IF THIS IS A MACRO.
	MOVE	A,[XWD 6,5]
	TLNE	TBITS,400000	;RESERVED WORD?
	MOVE	A,X33
	TLNE	C,-1		;ENTER OR LOOKUP?
	MOVSS	A
	PUSHJ	P,CREFOUT	;AND PUT OUT THE CHARACTER.
	PUSHJ	P,CREFSYM	;CREF THE SYMBOL IN LPSA,TBITS.
	TLNN	A,-2		;IF REGULAR SYMBOL,
	SKIPL	C		;BEING DEFINED,
	POPJ	P,
	MOVEI	A,2		;THEN PUT OUT EXTRA THING.
	JRST	CREFOUT		;....


CREFSYM: PUSH	P,TBITS
	JUMPL	TBITS,ASC1	;A RESERVED WORD ----
	MOVEI	TBITS,6
	PUSHJ	P,CHROUT	;NUMBER OF CHARACTERS.
	MOVEI	TBITS,(LPSA)
	MOVEI	PNT2,6		;FOR THE RECURSIVE NUMBER PRINTER IN SEOL.
;;#MF#! 5-1-73 DCS (1 OF 2) AC B NEEDED IN CALLER OF LCREFIT
	PUSH	P,B
	MOVEI	B,CHROUT	;OUTPUT ROUTINE FOR SAME --
	PUSHJ	P,FRNP1		;  FRNP1 IS IN SEOL ABOVE.
;;#MF#! (2 OF 2) SAVE, RESTORE B
	POP	P,B
	POP	P,TBITS
	POPJ	P,		;GO AWAY.
ASC1:	PUSH	P,A
	PUSHJ	P,CREFASC	;ASCII CREF.....
	POP	P,A
	POP	P,TBITS
	POPJ	P,


CREFCHR: CAIN	A,30		;UNDERLINE
	MOVEI	A,"."		;CHANGE UNDERLINE TO .
↑↑CREFOUT: SKIPE  LNCREF	;CREF GONE FOR THIS LINE?
	JRST	GONEF		;YES
	SETOM	LNCREF
	PUSH	P,A
	MOVEI	A,177
	PUSHJ	P,CREFOUT
	MOVEI	A,"B"
	PUSHJ	P,CREFOUT
	POP	P,A
NOTENX <
GONEF:	SOSG	LSTCNT
	PUSHJ	P,LSTDO
	IDPB	A,LSTPNT
	POPJ	P,
>;NOTENX
TENX <
GONEF:	EXCH	1,2
	EXCH	1,LISJFN
	JSYS	BOUT
	EXCH	1,LISJFN
	EXCH	1,2
	POPJ	P,
>;TENX

↑↑CREFASC:			;CREF THE ASCII FOR A SYMBOL.
	HRRZ	A,$PNAME(LPSA)	;COUNT.
	PUSHJ	P,CREFOUT	;AND CREF...
	MOVE	TEMP,A
	MOVE	C,$PNAME+1(LPSA)	;BYTE POINTER.
	ILDB	A,C
	PUSHJ	P,CREFCHR
	SOJG	TEMP,.-2
GPOPJ:	POPJ	P,

↑↑CREFDEF:			;PUT OUT SYMBOL DEFINTION.
	MOVEI	A,11		;ORDINARY SYMBOL
	MOVE	TEMP,$T@ITS(LPSA)
	TLNE	TEMP,DEFINE
	MOVEI	A,13		;FOR MACRO
	PUSHJ	P,CREFOUT
	PUSHJ	P,CREFSYM
	JRST	CREFASC		;CODE,SYMBOL,PRINT-NAME.

↑↑CREFBLOCK:			;END OF A BLOCK.
	MOVEI	A,16
	PUSHJ	P,CREFOUT
	JRST	CREFASC		;AND THE NAME.


BEND

DSCR HDR, HDROV 
DES List routines for top of (physical page). Reset page,
  line counters.  Print a page header if listing.
 HDR is called when new page (logical) is sensed.
 HDROV is called when PGSIZ lines have been printed
  since last time a header was printed.
SID Uses D, TEMP,USER -- saves USER, C, others vulnerable.
⊗

↑HDR:	
	AOS	PAGENO		;NEXT PAGE, PLEASE
	AOS	FPAGNO		;NEXT IN THIS FILE
	SETZM	PAGINC		;FIRST PHYSICAL PAGE NO
	SETZM	BINLIN		;SEQUENTIAL LINE #
	AOS	BINLIN		;ALWAYS STARTS AT 1
	MOVE	TEMP,[ASCII /00001/]
	MOVEM	TEMP,ASCLIN	;SO DOES THE SUFF WHICH APPEARS ON LISTING
;;#HU# 6-20-72 DCS BETTER TTY LISTING
	SKIPN	CRIND		;NEED CRLF/INDENT?
	 JRST	 NCRIND		;NO
	SETZM	CRIND
	TERPRI
;;%CF% JFR 7-8-75
	SKIPA	TEMP,LININD	;HOW MANY
	PUUO	1,[" "]
	SOJGE	TEMP,.-1
;;%CF% ↑
NCRIND:	PRINT	< >
	DECPNT	FPAGNO		;JUST KEEP TRACK
;;%CT% warnings if in macro or false conditional scan
	MOVEI	TEMP,LININD+1	;TRKMCR AND TRKMCS MUST POINT TO A STRING
	SKIPN	TRKMCR
	 MOVEM	TEMP,TRKMCR
	SKIPN	TRKMCS
	 MOVEM	TEMP,TRKMCS
	MOVEI	TEMP,0
	TLNE	FF,PRMSCN	;SCANNING MACRO PARAMS?
	 MOVEI	TEMP,[ASCIZ/macro parameters/]
	SKIPE	CNDLST		;OR FALSE CONDIITIONAL?
	 MOVEI	TEMP,[ASCIZ/false conditional compilation/]
	JUMPE	TEMP,SEOP1	;IF OK
	HRLI	TEMP,440700	;COMPLETE BYTE POINTER
	MOVEI	A,[ASCIZ\
WARNING: Form-feed while scanning @A.
Last source-file macro: @I  @E/@D
Current macro: @I
\]
	MOVEI	B,-1+[	PWORD	TEMP
			PWORD	@TRKMCS
			PWORD	TRKM.L
			PWORD	TRKM.P
			PWORD	@TRKMCR]
	PUSH	P,C		;SAVE THIS
	PUSHJ	P,SPLPRT
	POP	P,C
SEOP1:
;;%CT% ↑


NOTENX<
;;%DE% JFR 10-25-75
↑HDROV:	SETZM	LINNUM
	AOS	PAGINC		;HERE WHEN LINES OVERFLOW PAGE
	MOVE	TEMP,TTOP	;CUR BLOCK SEMBLK
	MOVEI	A,TITPAT
	MOVEI	B,-1+[
		PWORD	IPROC+$PNAME+1	;OUTER BLOCK NAME B.P.
		PWORD	SRCDEV
		PWORD	SRCFIL
		PLEFT	SRCEXT
		PWORD	SRCPPN
		PWORD	FPAGNO
		PWORD	PAGINC
		PWORD	$PNAME+1(TEMP)	;CURRENT BLOCK NAME B.P.
		PWORD	ASWITCH	;/A
		PWORD	BAILON	;/B
		POINT	1,SCNWRD,5;/C
		PRIGHT	DFMAX	;/D
		PWORD	FMTWRD	;/F
		PWORD	HISW	;/H
		PWORD	KOUNT	;/K
		PWORD	LSTSTRT	;/L
		PRIGHT	PDLMAX	;/P
		PRIGHT	SPMAX	;/Q
		PRIGHT	PPMAX	;/R
		PRIGHT	STMAXX	;/S
		PWORD	OVRSAI	;/V
		PWORD	WHERSW	;/W
		PWORD	XTFLAG	;/X
		]
	PUSH	P,C
	PUSH	P,D
	MOVSI	C,-5*=28
	MOVE	D,[IPCHAR TITLIN]
EXTERNAL SPLICE
	PUSHJ	P,SPLICE
	HRRZM	C,BANMAC+$PNAME	;CHAR COUNT
	POP	P,D
	POP	P,C
;;%DF% RHT 10-25-75
	MOVE	TEMP,FMTWRD	;CHECK FORMAT BITS
	TRNN	TEMP,140	; USER REQUESTED LIST OFF (40) OR NO HEADING (100)
;;%DF% ↑
	TLNN	FF,LISTNG	;LISTING FILE OPEN?
	 POPJ	 P,		; NO
	MOVE	TEMP,SCNWRD
	TRNE	TEMP,NOLIST	;DID SCANNER TURN LISTING OFF?
	 POPJ	P,		; YES
;;%XM% ! JFR 8-22-76 WAS =5*28+4	28 IS A FUNNY OCTAL CONSTANT!
	MOVEI	TEMP,5*=28+4	;MAKE SURE ENOUGH ROOM REMAINS
	CAMLE	TEMP,LSTCNT	;IS THERE
	PUSHJ	P,LSTDO		;NOW THERE IS
	MOVE	TEMP,BANMAC+$PNAME+1	;B.P.
	IBP	TEMP		;SKIP OPENING QUOTE
	MOVEI	D,14
	PUSHJ	P,HDROV1
	MOVEI	D,15		;CR
	MKVE	TEMP,[POINT 7,[BYTE (7! 12,15,12,42],-1]	;LF CR LF "
HDROV1:	IDPB	D,LSTPNT
	SOS	LSTCNT
	ILDB	D,TEMP	;CHAR FROM BANNER
	CAIE	D,042
	 JRST	.-4	;CONTINUE UNTIL 042 CLOSE QUOTE
	POPJ	P,
;;%DE% ↑
>;NOTENX

TENX<
↑HDROV:	
	SETZM	LINNUM
	AOS	PAGINC		;HERE WHEN LINES OVERFLOW PAGE
	PUSH	P,A
	PUSH	P,B
	PUSH	P,C
	PUSH	P,D
	HRROI	2,TITLIN	;DESTINATION
	HRROI	1,TITTIM	;SAIL time date
	SETZ	3,
	JSYS	SIN		;COPY INTO MACRO BODY STRING
	MOVE	1,2		;UPDATED DESTINATION
	HRRZ	2,SRCJFN
	SETZ	3,		
	JSYS	JFNS		;FILE NAME
	MOVE	D,1		;UPDATED DESTINATION BYTE POINTER
	MOVE	TEMP,TTOP	;CUR BLOCK SEMBLK
	MOVEI	A,TITPAT	;PATTERN FOR REST OF STUFF
	MOVEI	B,-1+[
		PWORD	FPAGNO
		PWORD	PAGINC
		PWORD	IPROC+$PNAME+1	;OUTER BLOCK NAME B.P.
		PWORD	$PNAME+1(TEMP)	;CURRENT BLOCK NAME B.P.
		PWORD	ASWITCH	;/A
		PWORD	BAILGN	;/B
		POINT	1,SCNWRD,5;/C
		PRIGHT	DFMAX	;/D
		PWORD	FMTWRD	;/F
		PWORD	LODMOD	;/G
		PWORD	HISW	;/H
		PWORD	KOUNT	;/K
		PWORD	LSTSTRT	;/L
		PRIGHT	PDLMAX	;/P
		PRIGHT	SPMAX	;/Q
		PRIGHT	PPMAX	;/R
		PRIGHT	STMAXX	;/S
		PWORD	LODDDT	;/T
		PWORD	LODSDT	;/U
		PWORD	OVRSAI	;/V
		PWORD	WHERSW	;/W
		PWORD	XTFLAG	;∂X
		]
	MOVSI	C,-5*=28
EXTERNAL SPLACE
	PUSHJ	P,SPLICE
	MKVE	C,D		;UPDATED B.P.
	SUBI	C,TITL@∪≤$wePQRAQCL@FAo=eIf~(∪≠+→$∪εXj$∩wπ>PXfXd0bA←d`XAe QλS>TTGo←IIf~∀%'#¬∩%λXZh!εR∩∩mePQλ%>FAG!Cef~(∪⊃%%i~∪λY	β≥≠βVI!≥¬≠
4SYm⊗∩2)αJ""↓EA5∪)5]ThP&6>4(&R⊗m↓2~6%:J⊂%\~"⊗∞Zα~>Jl
Qα
M"L4(M"J:8M"⊗6Ac	Q@%ZαVN⊗∩αJ⊗F,*NR⊗ α2&N α>~→αAQA%∧zIα:zα"εε$J:
↓C	AA$hQmm⊗$1∃αxhP&N.Mα≤&¬db&N
4p%n2M~R&:8α~&2*α>B⊗sx4(%∧RJNPLr>"∩⊂H%mαtx4(&lzZ∀&$*6A2≤~:↑J h(&R∀r∀&R,jA2:|b&NPKZN∞εtr⊗Iα%*J:⊗ α2&N$J:≥α|2→|4PIα*J≥ &:>D"H$%]J⊗L4PJ"JJTH&	1 4(→*5M__)u- Q!∀l⎇hQ∀∩d(→dl54E∧t→XR[λ↔8"uαaQ LL*↓∀⊂H↔:4\M∧	u∧,ii∀t:
~T⎇$QQ LE*+ L~H(∀tl_52%∧h→T(K89u,uAQ M≥X)⊂L~FA⊂K\yY∃"¬~Yu$-4λ∀t"ε⊗s:3↓Q LU;~0M≤zZ@HK8I∃≥∧z8R∧|d	∃ h!→T⎇4Q_"e]	y∀u"εuE\∃~HRαCu∀β*F⊗"cUF∪∃jEV∃hK8:$d2λ:$d0Q!∀l⎇hY⊂L~FAPPL*;∃_M9zU h)itD%'!∃∧⎇↓~αd Q!∃∧⎇↓~αd_Q!∃∧⎇↓~αd⊂Q!∃∧⎇↓~αdλQ!∃∧⎇	!∃α`Q!PS[4XD**	(e∩β⊗¬S∪*VvPhTH~D
EI~Dd*	I∀t*⊃Q%t∀→iT≠&↓⊂K\h→4*¬8YT∀d4λd⎇∩λ)t%J	xb∧l_:$xh!⊗hP~	tLuA⊗re$~IDLpQ!∀≤u:EBe≥J)∀t8Q!∪h*I∃$d→g L∀Ix4ZβVfhUI~E$LW!∀∀dx92βk⊗↓∪]≤→→Bε&∨∀π&N\QPU$~J∧
#!_∃≤≤→∀ααz∧λ∧"lλDαα∧	⊃PT∧∀∧∧∧∀∀λ∧∀∩λλD~∧λHB∧∧(d∧∧$tλ∧$BλλDZ∧λ)B∧∧J∧∧∧%∀λ∧%∩λλE~∧λJB∧∧JT∧∧%dλ∧%:λλEB∩qQ L∃~HRαCu∀β;uD$α∩F↓⊂KZε⊗s:3πXTt"	xb∧l_:$xh'g5$,k↓PPh!Q$t⎇HYeC`Q'3Z,HTR∧Tj$βαV&Rk;QQ$$
H∃¬$MIHR∧d→hRHh+h$tX_3S⊃↔448T¬≤,X)DZ∧iz"∧∀xK∩∧|d	T≥)qPPK↓Q M∧y→e KuJDM$I→`hP_9e≥"EJ5%∀→hphP⊗↓PU$~IDLs!_$d|94βk∪↓Q hUI~E∧
G!∀
≤9→⊂Jz(	⊂HJqQ$t⎇K→U≤E$πD
≤9→⊂J⎇8→∀bαwaPU%→Z4E∩πH∃≤≤→∀α⎇≤→→Bm%→Z4D
(Tαα{aQ L
89∀HJt∧αε&EqPPL~84LH∃uVn}eUphP_~4≤L⊃∃wO∩∧∧αxh!_∃≤≤→⊃∩}G'-VrxQ!∀
≤9→⊂JzλλcT∧eh∧4∧q_∧"lλDαααqQ L
89∀HJqQ$∧H⊃_∧∀
λλ$∩∧λH2∧∧HD∧∧∀dλ∧$BλλDZ∧λ)B∧∧J∧∧∧%∀λ∧%∩λλE~∧λJb∧∧Jp∧∧%¬qPPL+~D*αεu∩ββF%C;uD$α∩F↓∪Z∩ε⊗s:3πXTt"	xb∧l_:$xh!⊗hTYhD$
H⊃PPh'4α∧l→:BαjT
¬∀-λ~$*∧∀
DM$β⊃(	I3Q#!!"WS(→u∞H	iu⊗3*9∀H∂	YuQ"*H34:⊃r3JD
k∃	~∀⊂5¬6KLQ.r1
λH∀∪i→U⊃4D
⊃h⊃λ≠(∪qD	3sU	πA"U→4r∀Dπ∪3uHT∃⊃3*¬⊗t∪i→Uλ
eJ∩5∀λ~
mε&↔/C!!0p3	FB0kλH5⊃#!!21∩*i"0kπVl""'8⊂6(	→H⊃β!!01⊃	⊃1!⊃.q⊂+∀($
∩⊂5∧	4c"A~∃4r	!4∪(→uD!QB21	~R"0eG,,B!↔s3sJIλ(ε∀∩3HλA"B3)zQ"1¬Kp4pi→(k)(3K+(h0K+)X4K+(~∀K+)X6++)*3K+)*3+aQB"(∧∧⊂4pi→(k(~1k+*84+)xu+)iuK+(H0k+kU⊃
#!!03rA~⊃34¬A"B3)zQ3"(E
∃⊃)Z
".e];{K!QB33jh2"1¬G-M
λ5".v(X4C"A~∃4r	!4∪(→uL!QSSu→4r∀Dπ∪3uHQ5⊃3*¬⊗t∪i→Uλ
eJ∩5∀λ~
m7'a"U⊗)Zr∀HπI3uQ$
⊃34¬Kt∪r)jλ
k
I5∀⊂*Emw/AQB0p)I
B0eI4u∩)X".u	→1(∩)d∪4c!!21∩*i"0kπVLε↓"B2(I5R"(5∂-L↓⊃.s2)j5⊃4d	3H⊃↓Q@16λ9α1λ1".r	z4Th	→H⊃β!!4∃4i	B4	X2uF⊃"B2(*α5⊃)Zα".h9s∪sAQB33jh"1λ1".s)→U5⊃*1"S0):L.A→1∩5I⊃1∂&⊗β"B(_⊃∩"(EλLλAQB21
λB1
H34β!!01⊃	⊃1
l%DLλC!!21∀λ!1
l%J⊃34↓QB4∪j	B4↓QNni(H)(↔AQOJsIz⊃3V↓QC"C!*⊃3V∧πβ"WIX2u∞AQB2∀J)r",EJ∩5∃	→".qλZuHλH4r1ieH⊃Sj$⊂3∪∧
 FOLLOWS
	HRROI	1,[ASCIZ /"SAIL  /]
	SETZ	3,
	JSYS	SIN		;MERELY COPY
	MOVE	1,2		;UPDATED DEST
	SETO	2,		;CURRENT TIME¬
	SETZ	3,		;KEEP IT SIMPLE
	JSYS	ODTIM		;APPEND DATE AND T@∪≠∀~∀∪'∃)4∩d0~∀∪∪⊃!∧∩d0b∩∩w5β↔
AM+%
A%)&AβMπ∪4~(∪!∨!(∪ X~(|w)90~∀~)'#¬)Q_∪≥Q%&@4ZA≥Q$Aα↓'3≠¬=_~∀~(→	'πHA≥)∃%&@Z4A[CW∀A]Kn↓gs[E=XAK]Qer~∃⊃&A/%YXAkMJAKq%giS]≤AG←[5K]if0A]←h↓kgJAMiC]I¬eHAM=eZ~∀↓≥)I&AGe∃CiKf↓BAEY=GVA←_Aae←AKdAieaJAM=dAiQ%f@EβQ∨~DX↓C]H~(@AS]MiCYYLAiQJ↓ae←a∃dAYS9WfAi<ACggUeJAi!SfAi!S]NA
C\AE∀AM←k9H~∀@↓COCS8\A≥Q%&A
C\AQ¬]IYJ↓iQJA→←YY←]S]NA-S]If↓←LAi!S]Ofh~∀∩∩D\A-CISCEY∃f@ZZ↓]k[KISFXAM)%∪≥≤XA∪)∃~XAKQF\~∀$∩d\A1CEKYL~∀∩∩L\A!e=GKIkIJASI∃]iSM%Kef~(∩∩h\↓≥k[KISFAG=]giC9if~∀$∩j\AMieS]≤AG←]MiC]iL~∀A'Q!&t4∀@bZLtAπe∃CiJA∧AEY←
VAM←HA∪λ\↓πQKG,AiQCPAYKm∃XASf↓OeKCQKd~∀AM←d↓]KnAMs[E←0ASLA=YHA←9JAoCLAaeKMK]h@!
∨%/¬%λA!I←GKIUeKf~(@ACe∀ABAgAKGSC0AGCg∀R\A∪9giCY0AYKm∃XX@IQ¬∪)&0@I!≥¬≠
vA1S]V~(@Ai↑↓'3≠	¬∧AQCMPAiC	YJ@QAidAi<AS]gQdAi↑↓MKiG AeSO!hAEkα≠/πQεK9α"∧rQ%8hQ↓α3Ns%βSzβ∂WK⊗+;Qα4
J	β∨#KW∂'+K∃β4¬⊗
αX*d
∀%Dπ&z
:E∃∀hpπ6N⊃Q"ααZ*5%∩mw∩¬:J$Ltx4ε≡}MLV∨&}%b¬⊗↑NW⊗r∞∞G∩πMt¬≡.\≥g&N>4εNr∧	d-=;→PhR∧¬π⊗/
L⊗≡/4∞π'∩∞Mrε6}]f"ε-Mv≡Z
≤bπ⊗\LV6Nm≡FN}e∃`hRεG"∧Nn<W↔"
nVn/-≤2π6≥NV*ε]nG↔J
≥b∧≤yj5"ε.Xλm<=H	mh_z\zz;Lq"Hλ¬
→=Y-Eλ→=5J(~.4≠Y8l↑|x<O∀_Y8l≡<y(λYU⊃4J4~<h<;≠→,D→[|AQHλ_m⎇\⎇_-n≤h≠mm≡(≥m;H≥
(≠≠m⎇⎇<λl:;≤ed⊂]8m<=λ→L↑_z~-lh~;N>≤C"D∧→[⎇-lλ~;D	∀∪U¬D≠Y=d
y;8-n~8|d∞≠h∪HZtv3%a"H
'$∩;\l↑]λ≠L↑h≤⎇∞-;Yh={\⎇≥]λ→-n≤↑(
≥H∀u
(ssH.8zy.EHλm∧↓"Hλ≡Y⎇;,]]≤h≥≤{h≡≤≠≡$
→<Y%a"C"Jλ4HλH)5∀hD¬+(≥
(∃⊂I~∀h→ML9|hm|H≥
(⊂5	y+H∃
<y(∞⎇;≠λ,#"H∧
;\⎇≥≠→9∧
;H≥
(→;NN↑+H
M→>(≥≤{h}:9→$∞~→(]]≤↑$∞≤[xl↑|kC!!"HT	h31(D¬+(∀nNZ;Yd→<xn-<≥≠n$→[|D∧∀∪P)X(≠|D
⎇≤Z-lh_{mn⎇_;NEC"C!$TpsJh3λH¬U(≥X-N9(≠ld
<nD≥{|LD≠yJ$
];9.-8h_m⎇\⎇_-nH∀l\{{Y↓QHλ≥m}Yλ
≤H_;O∃λ~<d∞~→(≤~X8l]]λ≥m}Yλ⊃λ)∃P3¬a"C"D)∀∪U∧$λ+$
~→(
≥\⎇≤D∞z~8m∧≥z→-d→>→,>=→9∧∞z;≠∧
≠x9∧	∀∀p$∞z=~↓QHλ≥
(_{n.Y8⎇∧]8zl↑λ~;D∞~→(∞-9z≥∧
_;→Ed∀r⊂*9λ∪Iλ4rλ∞<=λ≥.¬C"C!$SQ5j;3(H¬U(~9Dβlλ∞∞≤H≥
t_[≠l=h≠8.Lz~;Lt∀∪P)X(≠|D
psUH→H∃

<h≤∞NC"H∧
<h≤l↑λ_↑$
pp3ED∀u∀I→Tkλ↑_kK∧∞<z;Lt∀r⊂*9λ∪Iλ4rD	9H&¬β"H∧∞~~<d
<h≥
(→Z..⎇λ≠l<⎇<\L]Xy(
|H≥~T≤};,-{C!!"HT*(u⊗4∧$+(
,8{|LD_{_.>h~9¬dKKD
9Hλ
m⎇λ≡L↑[kλ∞∞=λ~-n≠h≠
∞h≠yD∧_8{Mq"C"H≥≤{k∧∞~→(∞∞[y→,d_Z=∧
;H→Ld~<h∞↑y9λ∞Mh≥→-Mλ~9D∞~→(∞?;8[mD~<h∀→[|M\;λ≤≡X;#!!"TQ*4λSQ*zv3(K}≠z;NL<H≥
t≠Y=d[≠xm5C"C!*r1λ
↑y<hλ∃⊂kλ
HR5∀eD∪∀∀h∃λ∃⊃)Z∞h_-N→<\d∞};8M⎇λ≥_,-α2P9]9:qj≥y2FE¬εEεEβ-"g*⊃i)]∧CEfgU Dj!∩j)V!∩j)D]U,h"P⊂$j)FB∧j&'⊃Dj!$U)V!g∀j∧]aSg)j S*∨FEαP%))U∧P"g⊂g)j∧B]P,bTFEεE∞P"g*⊃i⊂ gλ$b"g∃$c$bT⊂⊗VP⊂d"aeH#'i∀"ibi∃ ¬D (ERROR), FORWARD
;  PROCEDURE BEING DEFIN@λ\↓π⊃π,A→-∃_A-β1∪	∪)dA
∨$ααJε∩,2&:⊗ h)m↓¬~f6
|bL4(hR⊗:&$rQh∀PJ6.Z(J
22-2⊗0$KZ∞VJ∀*:Qαd*Z⊗1∧z→α∩,2&:&$J>84PJN.&∧8&2B≤	2:⊗=~f4%\JMαRDJMαRD)α~&∃~Qα≡≤~VJJ,r∞∃|hP%α*∃~P%α∃∩ε:⊗8H%mαL*L4(hQmm∞UQ¬↓E
iQ5]⊂α"*MαAE5IJα∞"εt:∃α6~J=α≤~>B∀hQmm∞UQ
αRDJMα≡∀zVAαr⊃αRD)α:⊗E!α↑⊗∀)α&:$*J∞"r≡⊗⊂hP&N⊗$~4&R,jA1∩$∩&RMDbBN¬KZBJ⊗4J>VM¬"fB∃∧∩&RMbα∞.6∧b⊗&⊗u"⊗⊂4PJN.&∧`%∩R∀JRM"eαN¬$KYα∞",~-α~⎇⊃αJ⊗$*~&:M"&>9∧z→ᬬ∩⊗N⊗∃2⊗⊃α<zJ⊃α
_4($HH%m↓∧
Mα¬∧jε∞Jz↓""*~↓EE5I5]IHh(&Rdr8&R∀JRM2$*~&:(InNB,~&ε1¬"Jεε$j⊗:Q∧2>Iα∀*∩⊗~Lr&R→y`hP∀	%∃≥A∀∧t|HXdpH↔4∧M"	~4r=D	tt(
∩	*h,%V.+-f%#"Ng4λs⊂d4
+&⊗k-le∀∩∩Td	00tIt⊃StIX3∪Izλ∪0(:Sh∀HX⊃1R)i5∩3ia"B5	IQ"5λ)5∀kλitS0)A.c"A→TTu↓→Sq⊃(iB".iX0tSdλStS(→λ∪Izλ∪0(:Sh∀HX⊃1R)j∩3sAQNnh∧9⊂hc!!5∪∪Ia5⊃3*¬⊃⊃1I→Q".d
p4h

Q5R)z4h⊃λXR3R*I3sHλ→∀shλ∀∪00j)ohβ!!4rr*	B4Q(H1SB!↔h⊗1*5λ∪0(:Sh∀HX⊃1R)i5∩3ighβ"A→TTu↓→Sq⊃(iB".d	Skλλyh⊂rλXrh∪λZQ3∀d↓"B(	*Tuα(HQ3L!⊃.h∩*D∩4h	yQ#"G7hrVD4
+&%#"C!'nhrK$h,%V-lD	∩Th¬εK,J$
p4h	→U⊃4H9⊂3QhXλ∃r*Iλ⊂0IzQ#"Iiq⊃1IgB3⊃λ!0+∀	H5Q3↓↔ss⊃∧	⊃5Q)D∪qHλH1R3I~⊂3sD¬∩∩Tdε,+,'∃-lJ!QB4ri~∪α)
HR5∀e	∀∀p%⊃.r1D	s⊃λ
x4h∀HZq4UHXλ∃sj(λ∃	λ3H∪i5C"B(833⊃!_k⊂"!↔po0jZTQ3JD+(	Z4uλλ((⊃tHX5⊃4AQB(∩J*uα(	yss⊃↓⊃.h⊂)hλ∩4aQB0p)X"0kλ⊃".r(d∂+λ	X6(⊂HT⊃StJx4Qλλ9s23Hq"B(λZTB(πJp23∧	3H∪λZQ3λ
JSu0IH/K!QNnhi+HhEVC"C!(r∩t
(nB4hZ⊂s"(∃∃⊂R*Jb".ih5h⊂I~∀c"G7h∀u(xh⊂V$
KH∀iY5∩λ	Ip1λλ∀⊂Q1IzQ(∃
)SC"A~∀SSA~⊃34¬J∀SphXλ1Sj*tQ∞d	54u∧λQ(⊃IzUp4HD∀∀Sh81∃4HQ"B(	*Tuα$	4t∀H1"B5	Ib0+	zsB"':∩∩4d	4h∀izUλ∪hd∩4THY⊃5P)jβ"B*I∪b5λY4∪jyC"B*I∪q"*H34λ[∃∀SIA"B(λZTB(πH∃4∪	_p5⊃$	1⊃3JI1R1*$⊃⊃0iH4P5	→sOKε∃⊂TP)h5h∞d	4sIjD⊂3V$λssq∧⊃"B5	Hb0+	→U∀SIA.tr	z3⊃λλ((∪sD¬∂,
%D∃∃4Id∪qQD¬∂,*$	tH∪id
⊃4J)tJ#!!0p3(Q0+∃λY4β"A∀⊃4TA∀∂⊃∃*	∩0p*H(∩1λYU∩1I_4H⊃λXs⊂4H~∩3sGe+⊂J(3Q5dπh∩4iduλ⊂)k(⊃sixλ#"A→3uQ)Q5⊂R*Jk	∃λ)5∀j	J∀p*!QTQ0dπβ"B*9r4⊃!_k∀4H:⊗4α':Q0sj(λ⊂sλ~th∩(D∀t⊃(91R1(A"B2
)∪"0eD⊂0sIu∪∀∀h∃#"OG:Q0c!!4∃4i	B4
ZQuTH!"B4
Zr∩B*¬∀SQjjPC"A~∪t∩A~β"AQR4t
(nB5
)SB5λ)5∀k

Spq(A(∞u		4h∀i	u3⊃∧λ3∀sdλQ(⊂$
∀SphX∃4Q!QB(⊃**B(∂λJ4∪∩(85⊃(	_⊃3U	_R14Dλ⊃0sλ~P5∩)yH⊃Sj$∂KeHTP3HZc"C!'h⊃Sj*p4Q∧
∀SphX∃4Q$λQ23Ht⊃⊃1I→Q1λ	iukλλ9⊃0rd
P3∩(I5⊗+∧λr⊂3Hx(⊂R*Jc"C!!5∀VHQ0+⊃IzUtQ∧↓.u∪d	05⊂i∧∪s⊃¬λss4	H313JH1
#!!5∪∪Ia0+⊃+
∀SS↓↔s02hT∀u4HT∪Su∧λ∃4∪	_p5⊃$λ6∃⊃*)P3β!!(⊃4J!(∂⊃
Z∪∩0h~⊃(⊃IzUp4HEq2∃λZSP3∧λ⊃0sλ~P5∩)yβ⊂#'T⊂∨⊗→K''h)∪cFE≥NQe,↓L⊂P_@1-2-72 DCS ALDOW INDERNAL PROC TO OVERRIDE EHTERNAL PROC.
	TLO@≤∪Q≠ Y∃1)%≥0∩w)kβ∪9β?4∧b∧-λJ$tb
≥bε}LABε↔↑@λ
≤H~=∧∞x<h
⎇Kλ→MM<β"A∀∃∪⊂a∀⊂+∩)j∀SS↓↔h∩3JJSSλ
≥H≠Y.t
≥z-Mλ≥≥.-H~5∧
yYH∞|<h≠md+ =|\Y,>
#"G↔hrV∧1"B0h→1"0%J⊃34↓⊃.prλXrh∪(~⊂r∩)hh⊃⊗*λ4c"A∀⊃4TA∀∂⊃Sj*p4Q∧
⊗4⊃$λ∩4p(zQ14ge#"A~∀Sb*HR5∀eI3T∀Ixb.s(~Rh∀
)pq1
ZQ(∃)h⊃4@λH1R3I~⊂∧ggβE≥]ATb⊃D`Q"⊂ @ FLAG IF OLD IS EXTERNAL & NEW↓∪&A∪9)%≥¬_~∀∪5∨%
∪XI)¬%)&Q→A'αR∩lAπ∨+1λA⊃βY
A+'∃λA)⊃∀A⊃β∪HAβ¬∨Y
XA¬U(@\\8~∀∪'∃)∨4LJ⊗~∩8$%nα8U"¬IλR∧4β⊂1aQB5∪	h"0kλ[∃∀SIA.tQ*85λ∩*D⊂1H	yα"⊂'∪j⊂"l∃"i' SεE∧j∪''∧j⊂$j)V∩g*)'∪∧]giλ'"k@ NOT INTE@%9β_~∀%')54∪∪
1β∞∩∩l~∀vv
'λF~(~∀β≠=-~∪Q↓∪)&0I)¬∪Q&Q→!MαR@wM)∨%
↓≥.~)%⊗
β`4(&≤Z&B∀L→2FJ≥"f@%]∩⊗∞>∀!α∞2
~Mα& αNB⊗≤J~&⊗ h(&"∀b4&
b"ε∞:zB2BNλH4)yβ:$,_Q)d⎇¬)xsPM
Z4DP~¬E-∀zj$⊂K:(Tl]hT∧5∀yT¬4
($¬∀LhqPPM
Z4DP~¬E∀tzj$⊂K:
U"∧(_4Z∧yd¬$DTλTt Q!∀d,jA∩b-II∀tZIJ¬≤-*!∪]¬J λ
Ih∀q(9sQλλ)⊃praQ@3⊃(jα*∧Z⊂ε$g∩TBE≥NQch⊃H"!iP⊗[⊗[L⊂∀→⊗M∀P!d⊃aeP'S"⊂#'T&`f)H c`dS)j⊂ Pj*`fλ'g"iCE	HRRZM	LPSA,OLDP@%4∩w'βY
A∂→⊂A
∨%5β⊂∩Mαi5αV≤*⊃αRzα.&2e~Qα"-∩∀4(Mα>B(M↓0$%\2>Iα
α
&Q∧bεR⊗⊂h)mm≤:A
↓C⊃$4(hQmαJ,"⊗~&tJR&>rα&→αtzQᬬαεJεl*R⊗I¬"=α¬∧jε∞Jxh(4*$2⊗9EPJR2:PLEMENTED HERE, CAN'T BE FORMAL
	ERR	<DUPLICATE IDENTIFIER DECLARATION>,1
	POPJ	P,		; GET OUT IF MACRO REDEFINITIOJ AT THE SAME
				;   LEVEL.  BODY IS DELETED IN DFENT IF
				;   %TLINK IS NON-ZERO


 
; NOW CREATE A NEW BLOCK, PUT STUFF IN IT

BRANEW:	;NO CHECKING WAS DONE
OKOLD:	;IT'S ALL OK

	GETBLK	NEGSYM		;GET A NEW BLOCK

; INSERT PNAME, BITS -- LINK TO BUCKET _AM)%∪≥≤A%∪≥≤XQ-βI∧A∪↓∪λR~(~∀∪≠=-
∪→A'αY≥∃/'3~$w!∂∪9)$AQ≡A≥\A¬→∨
⊗~∀∪!%%∨∩%)≠ 1!≥β≠∀Vb∩w≥(A!⊃ A
∨HA!∨!A∪≥∞A⊃β)α~(~∀∪!= ∪)5 XI!9β∪
VDQ→!'∧R@w'Q∨%
AM)+
4∀∪!∨@∪)≠@XI!≥¬≠
Q→A'αR~(~∀wπI

∪9∞A
∨HA)⊃
↓/∨%→⊂\~∀∪Q→≥
∪→Yπ%∃
'.~(vvG∨ F@ZZ↓⊃∃&@dZdhZ\fA	≡↓≥∨(A
%⊗→∧jε∞Jzα~>Jl
2MhP&BV≤B(&AeYαRIhR¬$)~E~dHXdLTTπ2∧$βh∪Izλ⊂tHXH∪0(:Sh⊃IzS03
1"B"$∧λλ∃	IQH∃λ)5∀kλitS0)A"B"$∧λλ∩J*uλ⊃(:Q1R*A"B"$∧λλ∀	z⊂H∀¬K(β"G7hsr∧1"C"A~∀SSA~⊂R5
5α()'Pbb∧]T)'abQ*i"←CEe)∀j∧g'T)'aDB]g'FB∧fgk⊃Dh'*&()`CEcbU!&%DBD]`∪ECKNDPROCEDURE BLGCK
∪⊃I→~&eαN¬1-"2&:ZBB:QJ↓m⊗RdJ:-α∧rRMα$y↓J⊃∧∩2>∞Xh(&6⎇2∀&2¬~¬ %	j@hP~J$tp~H$M¬5Hd⎇∃J(∀pK8⊂∧4⎇*J$Rλ8∀dcqQ M$β∪Q!~⊂R5
5⊃6∃
)Sα.izH⊃6
H4SP)A"B5
)b5⊂I~∀k⊃IzUtQ↓↔u∃4Id⊃s@⊂⊃'i+`T"↔εEαj)''αj!$j∀T#'i∃i"∧]PP#'i∃`i"∀)'abQ*i"←CE∧j)∪Dj!$U)V$g∀)'cDNg'P⊗KP**i∪⊂#g IN PROCRESS*
NOPROC:	MOVEM↓TBIPS,$TBITS(LPSA) ;@)e!
A¬%)&~∃Iε@X4∀∪'↔%!
&~bFJ∞%J@%n∀*∞.J αε2ε≥→α&⊃¬~Bε∞L2&⊗⊂hP&"
dh&
1$
∞:=DbBN¬Hh)inα(T_h!~4\MλQ∀~@∀r3*
ub.i_H∀r)Z⊃⊃#!!03rH⊃0k⊃I→⊂ε"kα]af"U ¬R TRICK↓)≡A→=βλAε`@LA≥~A!+PA∪≤A1_~∀∪Q%≥≤∪Q↓∪)&1→β¬0∩w∨$↓≥∨(A∧A→β¬∃_XA	=≥(Aπ¬%α~∀%∃%'(%	∨2`H%n≡zα∩=αd*Z,J1PPLYzd(L5JE¬∀x1⊂K]	_4Z¬Z∧∧≥-*(Tu"

$l≤XJU∀(Q!∀E∃+!∀~bJh∀bD5⊃∪]∧α0rd
4λ∀λD∀q3()∩c"A→⊂S∪!_k	⊂(→Sj∪

p*"':∃5⊂⊂k`lP⊃'i⊂&⊂a"f⊂∀bfa&∩FE≥QR,QP)∩*⊂≠⊗L≠⊗[Yλ'kg∃βAS BEING↓)'$*⊃αε~α¬αJL:"QαD
22λ)∃ hαQ∪iI∞B4i94⊃"(5⊂q∪λZ@∧D]T$ae@ UP DISPLY LEVEL
;+#IQ# 8-12-72 ! RHT PREP
≥PA1)∃%≥β→LA
%∨4A¬∪9∞A%→λ@Q∀1$4λM"2:∀M"
&R~b>↑9*bRJtan&→∧r>96T*J=α$JNB2Jα2⊗Ybα
VQ∧z↑91∧z,4)[Y∞ %44¬∀EDε"
β5R∪∩kv4¬<
4λt-%I→d:¬It∧4LIHU2¬y~DB∧ixB¬TZ)r∧~λiu∩∧zyb4-λHU∀t→APPL**5 M:8U%TTλ0K\it¬<@tTV%D∩1λ	~h⊂5∧	⊃5Q)Dβ"A⊃2TTjD⊃R3	H5W#!!4rr*λ"4Q(:ub"'91Hλλ:4TQ)jλ∀∀Ixh∩4d
Q0u**uQ#!'hr⊗$4∀R∃∧∧∩⊃4HT∩4h
y⊃4Q$	usH
x4h⊂HY3Qh
H4u⊃(A"B5
)Q"5λ)5∀k	~⊃3()H0Q3∧~∀SphX∞h⊗(Zkλ∩(d∪Su∧	5⊃3%I⊂0Q)Eλ∪tD
∀Spd
∩⊃3D
4q#!!"""':u⊂0i1"B5	IQ"1He∀∀ShH1B.i_H⊃Sj)03λ
Zq(∀jH0rh¬U(∀∀Ix⊃1H
864h
x4h⊂)d⊂4Qd	∀uβ!!3∀r↓_k∪∪λi⊃∪α':r∩1JD∪⊃5HYλλ∃∧
R1r
D∀t∪jA"B5
+B0k	I⊃S⊃	Q"B.iX4rh	z5λ∪λ[λ∪⊃*d⊃S⊃∧λ4Q0!QQR3	H5NB*H∪b0eI⊃5Q)A".t
Zλ∩3D
∩⊃(	H6λ∪λZQ3β!!2∀TK)"0k∧JpR5
5∪∀∀h∃".sλZQ3λ	xH⊃⊃(i3R5	→sC"AQNh∪	→Rh∃	t⊂U0i85λ
:∀R3Ht∀R3Hq"C"A→3uQ)⊃0+∪	itQ5¬6".r)e3∩3HTλPp)IλC"IIRnB)YuQ"(%∩∀∪JA".uizQλ∀hZλ∃4∧λV(∩λ~rβ"A≠⊂uα(!".u		4h∀	_rth
Zλ∃∩λT∃∩1$	3Q∪d	∀∀p!QB33jh"5⊃)Z∪Q*zv3"':∪r3JH4H∃	t∪Q5d	sQ#!!2∀TIQ3∀∀h∃	5⊂JXrj∃λY4
"'9∩3Rdλ∪usD	Q5hλ)∪praQB2∀J!3∀∀h∃∃⊃3*↓.qq*D∪∀∀h∀∀Q0(K(∃∪d
∃5λλ(0rc!!5∪∪a_KLεεα".jJ4SH	yHλS)zQ(∃	t∪13)zV(Hλ)5β"A≠⊂uα(!"S∪I:Q5∞A→TTu↓∃⊂*"!↔p3∪∧λ∪sQ!QC"B)YuQ")J∀p+	h5tv)Q"B4
Zr∩B*¬∀SQj:∀B.j
5λ∪id∀u∀I→Qh∀I→Qc"AQC"Nd	1H∪Izλ⊂(λ9sTuλ→Uλ	I3Rh
Ih∃P*(H∪∩*:λ+$
Q5∃*)C"C!!5∪∪HQ5⊂R*Jk⊂sJ:α.sIzλ∪sD
P4PD	1H⊂iyTuβ!!(∀∪j	B(∀¬A".hλIsQ#!!"B3)zQ"3

p+∪HZtv3!QB2TJ:α4SHzTPB!↔t∃5∧	sH∃H~PH∀I→Qc"AQ@↓A ¬!w[vrw:λ	⊂!g[9z0w≥9V⊂)]94w3H7y⊂'≥vry4XPεEβE"g!S)j≥∧U)''∧U!$j)K)j)$S#D]iU)$g#H!gg)U g"∨CE	 JRST	 ENNUMB		; NO$ NUMEBIC

ENSTRNG:
	MOVEI	C,0		;CTRCONS ARE AT LEVEL 0
	PUSHJ	P,BRANEW	;USE VARIABLE S@)U
∧A$yαB⊗∀2>J5¬""*λYe$-%aPPLYzd(LJ
4
dhZu≥LQ↔5≤,X→e$L:4∧|2
(U≥,JAPPL	IEU_∀J4)5∀j	J∀p ∀B]g'P∪"k"f∀P#'iλ)j)$S#P!gS)j g∃)FE∧R))j∧T'#aiU∧D]h∃j⊂'gλ!`∂NSTAN@(↓%∪≥∞8~∀
∀4∀vA≥U≠%∪Aπ>u~Rε: h 4(Ydu,X' hPα1q*HS∩b)H5tv)Q B2
*Sr"*H34λHS∃P)A.pu	zQ(∀jJ1QC!!4∪t↓~⊃34¬Dα+ f
XT&(∀`TFEαh'h∧U"fh⊗	+ f∀∪()`@)
	POP	TEMP,$TBIP	&Q1!'αR4∀∪∃'@∪αY→9⊗∩∩w1∪≥⊗AQ≡A¬+
↔(A1∪'(~(∪!+'!∀∪ YI≥≡∞th%nB-!α>9∧~> 58¬⊂)jλ⊂R)hc"B*	t∩B*¬β"C!β ∧SCR ADCILS _A
%∪≥PXAπ∨9∪≥&~)ββ_AA+'⊃∀↓Me←Zαα⊗b⊗≥→β←#L∧6Bε>,V∂&Tλλm⎇\⎇_-n≤h⊂∪≠y⊂9:[:4vrK∧¬
PAR A contains vAlqe →←dAπI∪≥λ0Aβ	π%→&~∀↓'π≥
¬_AG←αsSπ'w→β[πe+∃β≠⎇⊃α∞yi∀`*h
≠N]9<Z,5 εE⊂⊂$j)P_ww:0Zw9P 4ype bits @→←dAπ=≥∪≥_h)αBt
6∃β≥#K'≠8∧εO~∞h⊗g.T	M}H⊂sii3Th¬
⎇≤Z-lj#"J(4h∀l]8;]
≤|h⊂∪≠y⊂1g[9z0w≥⊂⊂72]P7y≥yrr) in @IPA←L↓!≥(~)	β&AQQKgJ↓e←ki%]KfA¬eJAkMKHAi<AGeK¬iJAG=]giC9if@1∧3?H4R↓βπ∪W+OS'v9βS#*βOSπ≡Y1β∪|¬⊗v:=voε≥H	%↑~;9${{<∞↑_=~-⎇A"H∧
βs⊂1[w9z0[8⊂2l≤92yyZww9Vλ897{~r4w3H0r29→yyP![w9z0[:9V⊂→z1WεB⊂!gg∩g)P:\pyP)Pg+ fλ0w2⊂⊂$j)P≥7P6pZrP0@_ww9z_w:⊂7Y⊂:42CE⊂⊂8≤7x2yλ360{≠y⊂∀(∪ fbP≤z94w→P37iλ)z94[3P1w[9z0w≥9PWεB⊂!a"Rg*⊂6XuryP_w⊂$w≥2sriλ1ww9]0w:↔βE⊂ b⊂dg)P~yP!gS$g)Vλ2|1r\:⊂4zλ33y1YyP0P≠2{P![w9z0[:⊂:7H12FEλ⊂6pr→P∀1wY2P4wλ)a`g∪"i⊂2≠pyP4]∀W⊂⊂∩z⊂4yH:yrrλ:7P8≤7{4r→F@
  unique addresses foR REFERENCE calls, which might wipe
  the valuas out.
SID All AC's except PNT preserved;↓YPA!9(Aae∃gCem∃H\
∀X~∀~∃yβ	π∪9&t~∀%≠↔-4∪αY'
≥-β_$w'!
∪β_AU≥∪#+∀Aπ∨≥M)β≥(↓
∨$~(∪≠∨-∀∪)¬∪Q&Y71]λAπ≥M(W%
+%&XA:@wβ⊃π∨≤A5β↔$4∀∪∨%4∪)¬∪Q&Y¬∪Q&∩∩v!π∨≥'Qβ≥(A	2A%→%≥
R~∀%∃%'(%π∨≥∪9&∩∩w
∨≥)∪9+
4Ph*z∞∀*&:QRα6>Z,h&¬2≤~:Zε`In∞J,
R¬αqα&:$*≡⊗HhP&N.Mα∧&R∀JRM2]B↑⊃α≤rNQ2LrRε≡∃h4(4Ur∞>:LrMiαlzZ∀&$∩&RMd∩&RLhQmm
α↓
α∩≥→↓M5
i]H4PJRJ:(JR
&%→2NR∀J:≤%\J:N⊗∃!α¬α≥"J&::α&→α∀*FV⊗≥"⊗⊂4PIα*J≥ %αN%∩&:LhQmm
α↓4(MαVNM↓2:Vkλ$%n4bε≡LhP&BV≤@&A2u*5H∀T~&:MPJ6>Z(JR⊗6αbnb↑"α¬2∞|rε∞Nh↓mαN
2∃αJ,:&NR-∩M↓Ek	H4(L∩2P&$*6AH9tt:55≤∀~J3∩l⊃Q LlzhPLe
8∩e≥J(4|P↔:5%∀→hr∧≤yj5$jD∧∃,98U"pβ"B)Yβk"fBj!$j∀V!$j∀FE∧l⊂j∧VXJ(∀DDNd idλ g" LO@∨↔U ~∧∪5∨-
∪Q¬∪)&1)¬∪)LWπ∨≥¬π&[α4∀∪≠∨Y~∪)	∪!&Y	∪)&~(∪'↔∪A≤∪≥]'3~∩$w'β&↓∪ A
=+∃λ}4∀∪1πP∩Q R$∩w≥≡ZRA9)%&4∀∪≠∨Y
∪)5 Y71]λAπ∨9βπ&Y¬:@vAI')∨I
A%≥∪')I&@bZDd~∀∪	→(∪)∃≠ Y'	∪)&d4∀∪'+λ∪ Y0Hd∩∩v↓β	∃+M(A')¬π⊗A!=∪≥)HA)=∧:⊗Qα∀J⊃α>2αJ>V$J:∃αt
6⊗Mh(&"∃⊂&B:"b:⊗↑≥J4%n$yα:> α∞2>∀∩⊗Iαd*~QαD
2	αLr≤
8QPPH⊃⊃∪J∧_H4|U4λ∃∀(⊂Q)→Qh∪(_⊃+C!!2TTjA1q5λ_α".d	⊃p1∧
pR5
4⊂3Q∧
⊂R5
1"C"Kju∀R)JnH∀
Zr∩B*¬∀u∀Ijl".d↓"B0)zb)∃H→J∀	j
".d	3PtHY13U∧
Q1Q*(3Pq$λsu3JDβ"B*	t∩B*¬α".d↓"C"J:∀STf↔B4∃*9α4
:∀L"!↔qStD
u∀R)htc"A~∃4r↓~∀u
&C"B)Yβk"DU!$j)K-l ↔D CNST,STRING]
	JRST	CINS		;GO DO IT.¬

NUM1:	PUSHJ	P,NHASH
NUM2:	PUSHJ	P,ENNUMB
STR1:	PUSHJRS)
CONACS:	BLOCK SBITS2-A+1
ENDDATA

SUBTTL	HASH ROUTINES

@SCR SHASH, NHASH -- look up symbol entries in hashedbuckets&

PAR LPSA -- ptr to bucket Semblk for SHASH (since there are two).¬
  NHASH supplies its own.
 PNAME -- String s@∃CeGP↓CeOk5K]hA→←dA'!β'~(A'π≥Yβ_@Z4A≥k[∃eSFAMKCeG ACeOU[K]h↓MWdA9⊃β'⊂4∀~∃%∃&A⊃!9(@ZZ↓7⊃%%hA→!'∧XAEkα≠//L≤F'∃T
w∩¬9	E∃R	J¬≤
D'.≡<↑F∞&N+PhR∧↔~ε←∞εf∞≥lV"ε≥d∧E∧jDε&.=L↔⊗∂M≥vrpQ$∧t-z;∀jαUTβαε≤dεv␈Df␈.lEBε.N8R¬≡]\⊗w&≤>2ε}dλf␈.l@ε.wM≡GJpQ!PU≤_D¬/≡↑4¬$,Z¬B¬$)~E~bλ∃B∧∩Dλ2b∧ED¬∧uD¬Rj¬,↑7.gN4εNr	J¬≤λQ*4,*	
∧u"D	d-=;→Rb∧.X6↑=λ→↑x|Z.∞~;{N4~;H
\:;H
823λλH5⊂(≡Y8#!"C"C!+Tr⊂*9∞C"A→3uQ!_+∀∪H→1*l!↔pV5λT∀∪r)j⊃4C!!33uHQ0+
λ∃"".f~uλ∀jJR3Qd
stQ↓QB2∀J+B5⊃)Z∀∪H→1".d8r⊂4H_u⊃4J1"B6	zB0#
H34α!↔s26∧	5λ∃*∧⊂(⊂I~β"B*
4r∩A~∩⊂*9α".h9s4∃*H(∩⊂*9λε⊂#Qj⊂('Rg*"i⊂)j'T ¬ IN HPNT

Comment ⊗ Search forsymbol identical to strine in↓a]C[∀\~∀∪AkhAaα{';S-⊃βS=εKQβ'pα2⊗↑≥J5β'2β≠/Wv!84(L≠?7C,εF."
↔=λ≤⊂↔Zw:2yλ4yP4[⊂$('∃⊂7w entry ⊗

λSFIND:	SETZM	NEWSYM		;ASSUME NOT FOUND
	HBRZ	A,PNAME		;LENGTH
	JUMPE	A,BUKS		;ZERO LENGTH PNAIE TEST
	MOVEI	B,4(A)
	IDIVI	B,5		;# WH∂%	LA∪≤Aλ~∀β⊃I→∩∪!9(Yλ∩$w'(↓+ A∪9	∪πL~∀β⊃I$∪!≥PY!≥β5
Vb∩m¬3)
↓!∨β≥Q$A)<A≥.αα:ε6(h(&"∀b$&
d 4(&lzZ∧&$∩&RMbBB:QHIn~&∃~Qα↑⎇∩⊃α>2α:-t	dlQQ hP→*%≥ _*T]_⊃↔5≥$~*B∧
D
DDM4	ttλQ(%,\J7 M∀_y¬ JDZD∃,91B`K8yr∧$zyb∧∃X94- Q(%,]7!⊂LUYZ∧(LJ
4
dixdt ⊃↔4L@H⊂p*8(⊂U(9q5λ
x4h⊃)Z∃⊗#!! 2U)Z⊃"0%I⊂ss*↓"".k(αi'P∪"g#j∩⊂(' SbP*"TjεE∧Ba`fbBj!$j∀T ∩(∪ fbULT&()PTD]iPdbP#∩i)j⊂∃dπRD?
		 JRST	BUKLS		;NO , FAIL
	LCGMP:	HBR	TEMP,$PNAME(LPSA)	;LENGTH OF OBJECT STRIJG
		CAIE	A,(TEMP)	;SAME DENGTH/
	↓ JRST	BUKLS		;NO -) FAILURE
		JUMPE	A,FND		;IF BOTH LENGTH(0), ASSUH
A%	≥)%πβ_~(∩∪⊃¬I∩∪λ0ZbQ∧$∩∩vF↓/⊂≡J%→5D∀PH&*Vmα2∀ε"b~:⊂HInNεl)αNfl∩>11∧z:*
yu∀"	Itt8Q!⊂LE*!∀~bJ	dlU6∩De
8∩K\+~D*¬	y∀u$Z$∧$J αjj	→d$-αβ"AQB4qIi∃4∞A→3uQ!~⊃34¬H∀∪U↓QB"0h→1"5λY4⊂λ1".th→1(∃izQ∂c!!"(∩J*uα0JYs∀b!↔qP2)J4Q#!!"4si(b1
8SS∃*↓.rq(Zλ⊂5∧	5λ#!!"C"HiQ∞B)Yβk"fBf(!`K'"kiVfBE'∪c'"≥αh'h%αh⊗εEβEεEεB≥P*iQiP V⊂⊂⊂7w≠<P⊗VH92yj[:9P4[⊂&()PFEεE↔'$ iR≥∧ibU-&Dg⊃kilfBD]`iTjfbP⊃ df*T"FE∧SdπVE	A(SCNVAL	;HASH ON !ST WORD GF VALUE
	MOVE	LPSA,CONST	; HASH T@≡A
∨⊂~N α
V∞\*P4(MαVN"PJA2"
~ 4λLj>Z∀L	2N∞u2ε0%\:⊗Qα4
2V⊗~α~>I∧~> -λ~$M≤yaPPLYzd(L%HD∀eh→@hPQ!∀l]hQ∃$,Z¬D∀MJ1PPMIId(MHYUαe(X5-∃1↔5 83Uλ
YR45(T⊂ssJ:⊂3Uπq"B(	*Tuα$	SqSHA".h_4kλ
831(λ~h⊃P)→∃4Q!QA"B)*Tuα(*2b"':u⊂4JD∩⊃4HQ ¬!*Rf≥∧i∩c`*∧K∩j!*PeDD]Q'kg BUCKET @→∪M(~∃¬U⊗t∩∪)+≠!
%→!'α1≥∨
≥⊂∩w¬
↓'+%
↓)≡Aπ!πεAQ⊃αA
%%'(A=≥
~∀$∪πβ≠∀∪αXIYβ_Q→A'αR∩m
∪%'PA-β→U
AβUβ_}~(∩∩A∃I'(∪¬U↔_∩∩m≥≡@Z4A
β∪1+%
~(∩∪πβ5
∪∧X⊃-β_d!→!'α$∩w'
∨⊂~⊃¬2ε"V*α⊗FVa|4(HIα*J≥ &
V\`$%nty↓55∧2ε&2-∩∀4λHJ6.Z(JR⊗6αb
&R_In&ε\)αNV∀)αRf∧)α&M¬~ε&∀hP$&∞j∀&R,jA1∩$∩&RMDbBN¬Hh($¬∧RJNPJα
V.`H%nN$J21α≤
9≡Q¬*N∃αM 4($LRJNPL2:$KZ>-D
U≤*	~@hPQ!∀U∃:A∀4tA⊃∪\4→i∃≤B	zU h!Q$≡}]\Vw"αd∧D
9π⊗␈↑M⊗v*
≡G≡.LdαjhQ!PDLg$α∧
¬URεw]\&/∩∞Mrε⊗T
ε∂≡\@hR∧∧αα∧J
4
αUPλ.8zy.D≤≠z-nα2yεBεA'jU≥⊂$(∪*⊂1w[80tw≤P0w~w9z9≥qz4`/n which$ @]QKLA∃qKGkβ#↔⊂4PK←'3bβ3>≤@λ	J∀p ∞⎇=~∞M→(_N\zy=∧∞{|Y∧
;H⊂~~2P)$∧E∧iYp¬ LNK above for the cute say ob entering
	@QQJA]∃nAgs5E←X\4∀~¬β
&tAkMKfAααaα	↓jiβK↔≥+3SM∧K9α2¬~∧4!Q!0H!Q$D
9π LLI~dHL∃H%,\HY`K\xZBααλ∀εn}Dλ%,\β⊃3E⊃ B3)zS0	DP∧D]jTbP&`Qg$j*Q"@
	ROT	B,-1		;DIVID@
A¬dA)/≡4∀∪β	⊂∪→!≤	2λ$KZε∩⊃¬"5αRD)α
V≤Z⊗Qα∧z&:R-⊂4(εE∩2$&eαN¬1Cb6.Z*α2BNλaAy$hP&N.Mα0&λhP&"JdH&2B≤	1!rlzP∃~	J¬≤
FπbHh!→T⎇Q3")J∀p+	
∪Uα'83Q⊂∀h'i"H k`lCE∧l!U∧f()PFA∧d∀)-)DS()`DB]igP∃$"P%∃fh"P∃df&⊂∃ei%WβE∧h'T%∧h⊗βEεEβ)ja*∃&∧ibSa&%@⊂v67`#ation Rou@QS]Kf4∃∩N≥⊃α
2\:⊗QDλ$d\j(RαjT
6.n-M2∧∞MIv≡∂M}'_hαPp)D∀∃4i	H≥P∀XP#bj⊂&%V⊂⊃)"a&∩P6pq\5yWεBεA""TP)7z]4s2iH:7P8→y37`2m the fol1←oS]≤pλ4$λ$d\xZBε∞MHl<=→<d(≠Y.T, ⊗]wy2 Sambli.~∀↓¬→↔
I
AeKMi←eKLAgkG ABA'α+73X∧π&z∞Mε*∧)He∀1(≤nM|X9lT≠~<nA ¬⊂)Qj!&%H$w4j~pv4⎇→yP!&⊃)"bP≥tz4_67qu\P0yP→2z2`2mined by
  de@QKe[S9KHAEdAiQJ↓CeKB↓CYY←
CiKH↓S\AYAgE←h0AYagβ#?A_hQα:⊗,∩2,&>+SMβn{K∃β⊗c?∂/~β←#↔rβg?Uεs↔↔⊃¬##↔QQ"∧∀I;$-⊂≠(W⊗@y<h∞M→(_MMxz`∞
z;]\λ≥≠d↑(∪

p#"AQT⊂4D	∀∀p$
<h∀l]8[~d9→≤L↑|h⊂∪≠y⊂!&∩c)"FB∧E)"TP&()PP1ww≥0tw9H)rvq≠5P0r→92yiH397vH!&%cQjεEεBαS@∪λααVN⊗⊂βWO↔"β≠?I∧:>≡R⊃βe¬~⊗QTid,*T&fXQ$¬$,Z∧αε&↑:G⊗␈≤\Bε↔∀∞6∞nQQ"∧e
8∩ε≡≥f>.D'J¬8ZD∀d4⊗v"λ)D]TZ!Bπ≡↑@λ∞Mh→{m|λ≥~
≥Yh_O∀⊃Q1()∩c"Ba"C"K(4Sqλ~⊂(
λ)∪preXq1∃λZH∃P*)00SλZj#"H9s31)jλ¬C!(S⊃THX(+$
y;8MMh⊃TL\(∀⎇
}X9y$	~<⎇∧∞≠z;NL<K@∧
≠z;NNh≥≠dX<\nD∀y;,-~c"D∧λ≠{D
~<⎇¬D≥z≠n<(→Z..⎇λ≥m}Yλ≤
⎇;]≤d∞≠h≠L←≥λ↑_kH¬U(λ∞L<[:-l=→<ea"Hλ∧
y;8MM|h_.,(≤≥.D≠{H∞M→(≠
≡⎇λ_O∀⊂S∩k(4H≥m;H_-M≠xx.M;Yh
]|Y+∧;Yβ!$λλ_O∀≥~→$λS∩qJ((
≥M≤(⊃THXS∩h
\8|[e∀≤[⎇.M;Y+D∧∃~→/∀_<Y$∞Y;;nl9λ_O⊃ Hλ∧∞~→(λ)∩qq*D
≥Z,∀⊃q5λ)∩h≠,≤|[j$∞[⎇=
≥Y+C!"C"WKhS⊃THX,¬⊂_βEαE≥Q)"ag∃⊂⊗VPλP392YP167XuyP+Z2w⊂2[0q62Y⊂1<P⊃*!gjS*⊂9kZz1tεB$c'⊃*""a∃cP <
↑↑FRACNT: 0
>

TSTALO←←0		;SPECIAL TEST MODE FOR BLOCK ALLOCATOR
IFNDEF TSTALO, <TSTALO←←0>~∃%
αA)M)β→≡0y¬→→∃≥??¬1↔→≤lA→'∀⎇¬→→∃≥??¬1↔→≤,d@w'∃(A)∨Qβ_A¬1∨π⊗AM∪5
~)∪
≤AQ')β→<X@y¬1↔+'
h@`|~)∃		¬)α~∀4∃='Q¬→⊗t4∃∪
≤↓)')β1≡@Xx4∀∪≠∨Y∩∪)∃≠ Y¬1↔+'
5¬→↔→∃≤Zb@mS]Ci%CYSu∀Aa←S9iKdAQ↑~∀∪!%→&∪Q≠ ∩$@@@@wI←k	Yr[Y%]WKH↓YSghαβ?2	→b¬-8QPPLYzd,h~HTmαH)D]-8Q∩αα∧∧βZε-Mv≡←4f␈∩m⊗v&≥lrεF≤=6Nvtλe∀)I7_h'g5%≥H→Dxh!Q LlzhPM$YZαde
8$⎇ Q*4-$)F∪PLYzd,h~HTmαH)D5∀XQ⊂K]:H∃∃$→hr∧HJ$-≥1Q$<\5!∀l⎇hY⊂Le
8∩d∀IHTrEHYUαH↔9d-EDλ∃∀0#"A_p33↓→∀∀p%I∀∀u	zα".jIpπP#⊂i∨FEαe))jαibb"βEfgU"fDf∀)`V∀∃"fh∀BD]aj∪i"P*∩"P('Rg*"iβE∧fgU"Dj"Sh∩&(∀`FE∧R))j∧QgeFEβE)bj⊃≥∧ijP$Dj"Sh⊗!&∪"g∧DNcgP!⊂aeP S"εE∧Tbj-&BT*"fT∀DDDNj"i&Rg j"H&$ijβE∧h'T%∧h⊗βEαE/∪ ¬EBLK:
	PUSH	P,B			;NEEDAD FOR COR@
A∂∃))∃_4(&¬*N &αb4(Lj>J∀L⊃22B≤∩>P$KZRJe¬"=α&t~J⊗6,rQαRDJMα
dz∞,4PJ6.Z,H&
1k	AA
∀b2⊗8HIn@%+∀¬$z	→d≥∀YXTu"λI∧M~λ)Dl≤1Q M¬Z9∧PM¬H4t→h0HK9~2∧MD
∧⎇≥9_$d+qQ J∧**5 J	itLt1⊃⊂K\E FOR THIS
↓ JRST	 GETTOP			;NO, GET NETεA¬→=π⊗~∀4∃∪≥πHft∪!U'⊃∀∪@Yπ∨%%≥ε∩∩m1!β9λA¬2↓β→2⎇:ε
2*αε6>,rP4(Jα⊗JHJ↓r%+~$⎇#a⊃∪\≤→du"∧λ~¬∧,aQ L-λ9L~IJ¬≥∪tα!↔ss⊃∧
∪tλ	~h∪Q*@P#)"QP i"PFE∧`Q" 
	C,LPSTOP		;NEW UPPER↓→∪≠∪P~∀∪≠=-α∪)∃≠ Iε$∩∩w'<A→βY
A∪(↓/⊃¬∀A∪(A]∪→1∧∩∃α:⎇"&∞⊗ h(&*∃~P&:,*JQDHH%n:⎇9α≡tλ∀t"
(TdLi1PPh!Q$<-JIuβP→Yu4,⊃_2ck⊗εαT∀IHTpH↔8t-"	hU*∧)It≤Z
I∧M~
9∃T(Q!∃¬-9	 MαH9u∀<ZAPPJλ9u∀-* λπJP3H	z5λ∪hd⊂stHT⊂5⊂⊃bj*'T∨
	MKVEM	B,LPSBOT		;SET L@∪≠%)&Aβ9.~∀%≠↔-4∪∧Y→A'!∨ 4∀∪β	⊃~∪εY1!')∨@~∀
∃9%Pt∩~∀%≠∨-
%)≠ 1∧∩∩∩m!)$AQ≡A¬∨Q)∨~A=A≥\~∃≥∃%(bt%!∨ ∪@Yε~∀%!∨ ∪@Y∧~∀%!+'⊃(∪ Y'∃)¬_b$∩w→∪9⊗A)⊃∃~A+ 4∀∪≠∨Y
∪→!MαY¬→→%
∩$w'∞AQ⊃β(A]
Aπβ8Aπ∨≥Q∪≥+
4∀∪!∨A∀∪ X4∀~∃=	→↔∂Pt@~∃%
≤A
Q	¬+≤Xyβ∨LA
%
≥(|~(∪'↔∪A≤∪→!MαY¬→→%β
~(∪!+'!∀∪ Y9¬→,∩w∂PAαA/!∨→
A9∨)⊃HA'(8~∀∪≠=-
∪)∃≠ XQ1!'αR4∀∪≠∨Y~∪)∃≠ Y¬1
%
$w+!	¬)
A
I
A'Q∨%β∂∀\~∃=	→↔5HtA'Q5~∩Q1!'αR$∩w
∪I'(A/=%λ~∀%≠∨-'$∪)≠@XQ→!MαR∩∩m5%≡↓)⊃
A	→∨π⊗4∀∪⊃%I∩∪)5 XbQ1!'αR4∀∪¬→P∪)≠@Y¬→→∃≤ZbQ1!'αR4∃∪
≤↓)')β1≡Xx~(vAβ	⊂A¬→∨
⊗A)≡↓	∨+¬12[→∪9↔λAI∪∃∞A=Aβ≤↓+'
A	→∨π↔L~∀∪!= ∪ Y	→↔→8Q→!'∧R@w'¬-
A%∃(Aβ	⊃$A
∨HA⊃∪'Q∨%2A=Aπβ1_A)≡↓¬→↔∂∃(~∀∪!→%4∪Q≠ Y	→↔+'∀∩w∂PA!∨∪9)$AQ≡A→βM(A¬→=π⊗A∪8A%∪≥≤~∀∪⊃I→~&eαN¬2∀b.VN(InVB$
R∃α≤
&⊃α∧z&:R-⊂4(&E∩J4&eαN¬2∀b.2⊗rYE"R,jA%↓]*B∩ε$)α~>∩:J⊃α∧rRIαLqα>H@∧d
:D∧∀dx90hP→
$dh~HTmαH)D\dYe3
DJ
4
Jπ:U∧$~HR∧∀94u∀"
	e%∩	→b∧tZpαDd~:BJ∧)It≤XQ!∀l]hY⊂M$YZαd∀I:U≤*X)D\DYeS
β:Z∧$
HT∧4⎇$z$"¬	jE∩∧α3@	h5h⊂IIprc!!2⊂	)∪Dj"fT⊗!&%S"g∃HJ&()`JFA∧e∀)j∧`⊂&%f"S∀&()PT@P⊂λ⊂≥`∩ETURN DEVIOUSLY
; ELSE >POPJ	P,

↑BLKFRA:
IFN FTDEBUG,<SOS FRECH
(|4∀∪⊃
⊂∪→!MαXZb! R∩∩m∂(A¬%∞XAMβ ~∃∧bBN∧hP&6>4(&R⊗m↓2
25∩⊗∀Q!∀E∃+)PM$YZαbDJ
4
H⊃↔5≥¬)→d<@u5⊂⊃)"bP∀h'i QbFE∧R))&DS()`V⊂&#!"QF@
IFN TSTAL@≡Xx~∀v↓%≠∨Y
A
%=~A∪≤ααVN∃¬∩&*≤hP&6>4(&R⊗m↓2
2\b⊗9-
B2BNλ¬⊂K\(92=∀EED4⎇$z$ hαB2	I⊂εDj⊃dh⊗!∪%f"g
XT""Sh∀D]Uh" j⊃P!!eIi"⊂$S⊂'"l∃⊂*'P∀'*⊂*∪P⊂()⊃k
	MOVCS	TEMP
↓HLRM	TEMP →¬1↔⊃≤,bQ)5 R∩wU!	β)∀A
∨$≥%λA∪8A→β'PA)=¬α:Qα$yα:⊗E 4)@aQ LlzhPLeλ8∩bk∃
αHH↔8t-"	yD"¬h→E,*λ(∀≤XQ!∃≥0B4¬KLC!!2TTjA0@∀∀∀BEεBβ)ja*∃&∧i'⊃k)!ελ)'#iU)⊗⊂2]1W⊂⊗KP0)4[3SP&~w0age Routines
~∀4∃∩N≥⊃αJ:=~RI1¬∩:∞≡,q1αJt:R6AbαJ:≡≥~Q1αα)d=TPC∧
SQp(JKλ∀IhpsS!QT⊂4D¬∀{{,↑~;9.5(∪∀
8(~<d
y;8MMh_9NY<taQTQ4d
~→(
<;8[
4~<h
M9Zy,D≠{]
t_(_∞-;YidX<p∩Y⊂7w_P;0y~pq62CE⊂4v\64rrλ1<P 4he routine name.  @%9∂')$αβWO↔~↓⊗JN%⊃↓55ε31β␈##↔K_h)βW≤∧Rα-*h∃∀∩d∧¬&FTλM≥Yh~\9→4D∞X<Z,≤[→<d<Y(
:∀TSHuλ∃P*(Kλ∃
H34↓QH⊂sii3U∧λssTjJKλ⊂(JU⊂0Ea"Q⊃*4∃~→.<αP97]z4w2\P92x≠0qrP≥42P)∩g#P6Xqy7PTP37\⊂9x0Xp¬ efficiency.
⊗

↑RNGDIS:MOREI	TEMP,DISLST	;DISPLAY TEMPS
	JRST	RN@∂∂8~∃=∀r≡ε∩∪RN.&∧λ&R⊗m↓2nε%∩Rε
hInε∩%∩⊗NM∧~> 5:H∀u%1Q%u∀hzDmβ)Yu4,⊃~D,m¬JE$,Z↓∪\≤z(R¬$YZ¬_h!→%∃≥A~$tqq3AQWP	'⊃ag&]∀edh Bj"fh-agg∩g*.DNdεUMERICAL CGNSTAN@)L@ZZA¬''+≠∃&A≥]'3~~)=%≥∂
'(u≠=-∩∪Q∪ Y
∨∃')H∩w')I∪≥∞A
∨∃'	¬≥)&@@@ZZ↓β''+5&A≥∃/'3~4∀∪'↔%!αβ→A'αY≥∃/'3~$w∂(↓'≠¬1⊗A
%=~A⊃I
~∃=I≥π-%λu≠∨-∃∩∪)5 Y-βI∧∩w-¬%∧A%%≥∞~∃I≥∂∂8t∪!+M⊂∪ Y∧~∀∪'-∪!≤∪∧XQ)5 R∩wQQJAY∃MhAQ¬YLA←_@K%-¬%∧Q'∃[EYV$ASf~(∩A∃%M(∩@\,f∩∩v↓[CIJ↓i↑Aaα{';Qπ#=βSF)βCK/3'?W~ββ;↔>+OQ≤hP&"J∀h&2B≤	1⊗J4
J	"
H%mα≡+73Zaβ'→ε{;∃β/C'OS~↓55β&C∃βKN;#P4PJ"J2Th&¬1-∩ZεJ∩B2BN
H%mβF3→β}1↓⊗J4
J	"π∪↔['␈+M%β∧{';S~βS<4PJ6>Z,h&2B≤	1"R,jA$%ZβS#'~β?;∃αi5βSF)β[π≡)β[b↓"R⊗m↓%βπg;πgLhP&B>JA2∧HImβ'v#'∂π&+MβSF)β;↔:↓#K'>CQ7#∞s⊃%β.s⊂4(Mα>B(M↓0$%Zβ?→β&C∃β3O≠Q↓5jβS#∃ε{3∪↔∨!β3!εKMβπg;πgMβ4(4Ph*zJt:NBIU~.&BpJR⊗6αbNRJ∀r≤%n∨#K';:βK';:β3';↑∨∃↓jiβOπn)βW≤K;↔O_h(%αU∩NP%αq-L4PJ"JJhJ2BN
a⊗JN%⊃"R⊗m↓$4(LBJ2jhJR⊗6αa⊗JN%⊃"2B≤	$4(Lj>Z⊗hJ2BN
bNRJ∀r≤4(Mα>B(M↓04(hP04(J4≥∩
Z$=5(%B¬-(x∀%∩D
U∀u∪4¬D∃4Qh:uλ
ZQtu
!"T⊂*$∪∀∀h∀~<h∀∀y;,-~h⊂,L≤Y<n1 H∃
(∩→,≤α2y vbl iq set qp by callingthe rightroutine¬
DES Undh∂Kf↓iQJA⊃C[CO∀AI←]∀AErAI∪∃∞~(,~∀~)=+%∂⊃∪&u'-∪!α∪Q≠ Ym	∪'→M):
∃y+%∂π9~u≠∨Y∩∪)∃≠ @2≤z:&: h(&*∃~P&Vα(t<,aQ%u-(ze∀∪*94M∧⊃~D,M¬K54
(+PhUh¬4Hz∪4∞IYβk"dBj"fh**"fTε@
	JRST	UR@∂∂8~∃=-∩≡ε∩∪RN.&∧λ&R⊗m↓2nε%∩Rε
hh"zVα(t≥≥G)T⎇Q2"*H34λ9βg!j∀∧¬
URGGEN:	PUSH	P →α$∩w∪L↓iQKe∀ACeJ↓]↑Aaα{';S-∪@~ε≥`λ∧ZUP4H%λ≥~]@εE∧Tedh'α`V∩i∃ i!∀∪()`@)	;1) The Semblk is not on the ri`≥Nαaβ?IPh &∞j8&2¬~¬!"$*6A$KYI%αLεBεO4λ

(≠sMO(≠9-\Y<@⊗λ4w⊂ 7hich aase its
	 JRST	 DOU		;@ACI⊃eKgf↓SfAi!ChA←α1βS#*β#↔π&+Iβ[⊗a↓"R,jA$Q(Tt∃(
∧T'`∧h DDMTwP<`/u ge↓PAQKe∀AS@7n+∪'π&+3eβL¬b∧≤~8Rβ
≤&␈6UAPPM	z∧PM¬A⊂KZ∧∧ε∞vD⊗7→<@⊂≡wzS{→P:w6~w0e@⊂ASLAα{S#↔⊂∧ε≡∂<Z2`! ¬"'U]∧j)∪ ¬↓A0Zb∩∩m∪@→β&C↔K∃∧¬↔4_(≡-}8π3r\⊂72tYβhbo@HXAiKαc1β#Nh4(∀	∧ddβ"(λ∃	0	+⊂i!∀ JD]P⊂λ<wzS\2P3w[2WεEαh∧RNN	A,-D∩∩w∪α1βS#-∪∃β'~β;?Qε	βg?α]f>∂$
f.N⎇&␈∩D∞Wε&≡LPhPα(∩	JVS"$λ+
∃λY4
"'P⊂⊂4he hea`	Kdαaβ↔≡WO∃πK?Uβ>+K∃βL{W;∨/≠Q8Q!∀l⎇j:0LλQ!∃%∀hQ∀
bV⊃⊂K\≤dπ&F↑,RεO4⊗rε⎇LF/∩
lVNx[p→⊂:2f≠⊂44vCE	 HLRM	 A,%@%Yβ%∧Q∧R∩v@As←j≥eJAO=]J\~(∪∃%'P∪≥	T~∀~∃y+%∂'Q$u'↔%!≤∪)∃≠ @1-∩NBIDbBN¬KZOπ↔*βOSW61β≠?∩βOSKNs∃βKNs≥84PJεε6pJ2BNλbNRJ∀r≤4(Jα*JN Iα∩>≥ 4(%¬α>B(JαA04T">NQPJRJ:(JR⊗6αa5D4PIα"2dh%αR,jA1⊗∃~RI"$*6A$hP&BJtp&R⊗m↓15DhP%α"e∩j4%¬"⊗6Ae~RJJt84(&lzZNLM"⊗6@hP&RJt(&R⊗m↓15DhP%α"e∩4%α$*6A1-∩NRIE"⊗6AHh(&B⎇α(&A`h(4(2NV∃"R1↓∧kπK-∧K;O↔↔#'?9∧ε&␈/M≥f*εm}"ε≡}]g&/$
&␈/M≥f/_Q(E≤≥$	E≥∧zZBαjT∞w⊗OLTπ&z
M↔∨"m⊗f(β"Ph→ in the output
 line of the list file.  If the last character was a CR, the character 
 is inserted before the CR.  This routine is called by the exec
 routines KOUNT1, KOUNT2, etc. to put markers in the list file
 indicating where counters were placed into the object code.
SID the contents of A may be changed.
⊗

↑LSTOUT: PUSH	P,B		;SAVE B
	LDB	B,LPNT		;GET PREV LAST CHAR
	CAIE	B,15		;IS IT A CR
	JRST	.+3		;NO
	DPB	A,LPNT		;YES, WIPE IT OUT
	MOVEI	A,15		;AND PUT CR AFTER IT
	MOVEI	B,(A)
	ML$CHR
	POP	P,B		;RESTORE B
	POPJ	P,		;RETURN



DSCR LSTOU1 -- Write to list file
CAL PUSHJ P,LSTOU1
PAR Reg A contains character to be listed
 Reg C contains character that the char in A should follow
RES If the last character in the line matches the one in
 C, the character in A is put at the end of the line.  If
 not, the char in A is placed before the last character.
 The necessity for doing this comes from the fact that some
 single character tokens are placed in the listing file before
 they are parsed.
SID Register A may be changed
⊗
↑LSTOU1:  PUSH	P,B		;SAVE B
	LDB	B,LPNT		;GET THE LAST CHAR
	CAMN	B,C		;IS IT THE ONE WE WANT...
	JRST	.+8		;YES, GO STORE CHARACTER
	CAIGE	C,"A"		;IS THE COMPARE CHAR A LETTER
	JRST	.+4		;NO
	ADDI	C,"a"-"A"	;CONVERT TO LOWERCASE
	CAMN	B,C		;IS IT THE RIGHTTHING?
	JRST	.+3		;YES, GO STORE CHARACTER AND RETURN
	DPB	A,LPNT		;NO, STORE NEW CHAR
	MOVEI	A,(B)		;THEN OLD CHARACTER
	MOVEI	B,(A)
	ML$CHR
	POP	P,B		;RESTORE B
	POPJ	P,		;RETURN

BEND SYM
↑KILLST←KILLST

SUBTTL	Generator Data