Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
00100	COMMENT    VALID 00017 PAGES
00200	C REC  PAGE   DESCRIPTION
00300	C00001 00001
00400	C00003 00002	HISTORY
00500	C00013 00003	 INTRODUCTION
00600	C00014 00004	  SWITCHES : AN INTRODUCTION
00700	C00019 00005	 SWITCH SETTINGS & MACROS
00800	C00031 00006	 THE FILSPC STUFF -- OLDER HISTORY 
00900	C00033 00007	 FILSPC FILES
01000	C00039 00008	 NARRATIVE FILSPC ACCOUNTS
01100	C00045 00009	LISTING CONTROL MACROS & THE LIKE
01200	C00053 00010	 MACHINE-EXTENDING MACROS (SOME USEFUL CONSTANT, STORAGE/STORAGE MANIPULATORS)
01300	C00059 00011	  TELETYPE COMMUNICATION MACROS
01400	C00063 00012	  INPUT/OUTPUT AIDS
01500	C00066 00013	 RANDOM OTHER MACROS
01600	C00068 00014	TBITS DEFINITIONS
01700	C00073 00015	 VARIOUS DEFINITIONS OF USER UUO'S.
01800	C00076 00016	DSCR USER DATA AREA TEMPLATE  
01900	C00090 00017	Global AC Definitions, Indices, Bits
02000	C00098 ENDMK
02100	C;
     
00100	COMMENT HISTORY
00200	AUTHOR,REASON
00300	021  202200000016  ;
00400	
00500	
00600	COMMENT 
00700	VERSION 18-2(16) 6-11-76 BY JES ALLOCATE LOCAL ITEMS IN DESCENDING ORDER (URLEAP)
00800	VERSION	18-2(15) 3-18-76 BY RFR ADDED NEW LEAP SEARCHES F6,F7 UDER URHASH AND URSTAT SWITCHES
00900	VERSION 18-2(14) 3-26-75 BY JFR TENX DSPLEN__=330 (P.9)
01000	VERSION 18-2(13) 2-16-75 BY JFR BAIL P.7,17 TYPE CODE FOR REC!PNTR, RUNTIME PROC DESCR FILE
01100	VERSION 18-2(12) 2-16-75 BY RLS JUST LOOKING
01200	VERSION 18-2(11) 2-16-75 BY RLS LOOKING AT TENEX SWITCH SETTINGS
01300	VERSION 18-2(10) 2-2-75 BY JFR CLAIM TYPE CODE FOR ITEMVARS IN BAIL, P.17
01400	VERSION 18-2(9) 2-1-75 BY RLS TENEX PSI SYSTEM
01500	VERSION 18-2(8) 12-10-74 BY JFR MORE BAIL LOADMODULE RESIDENCE DEFINITION
01600	VERSION 18-2(7) 12-7-74 BY JFR DEFINE RESIDENCE OF  BAIL  LOADMODULE
01700	VERSION 18-2(6) 11-17-74 BY JFR USER TABLE ENTRY FOR COMMUNICATION BETWEEN BAIL AND ERROR HANDLER
01800	VERSION 18-2(5) 11-7-74 BY JFR KEEP PPN IN CDB
01900	VERSION 18-2(4) 11-2-74 BY JFR REVISE DATA AND ZERODAT CHECKS TO USE "PRINTX", GIVE MORE INFORMATION
02000	VERSION 18-2(3) 10-18-74 BY rls check TENEX file setting for v. 8
02100	VERSION 18-2(2) 10-18-74 BY RHT V 18
02200	VERSION 17-2(104) 10-14-74 BY RHT MAKE FILES SAY SAISG8, ETC
02300	VERSION 17-2(103) 10-10-74 BY JFR FEAT %BS% NEW WAY TO DO BREAK TABLES
02400	VERSION 17-2(102) 10-10-74 BY RHT FEAT BR ELIMINATE HACKS
02500	VERSION 17-2(101) 10-10-74 
02600	VERSION 17-2(100) 10-10-74 
02700	VERSION 17-2(99) 9-20-74 BY JFR INSTALL BAIL
02800	VERSION 17-2(98) 9-5-74 BY RHT ADD ITSSW
02900	VERSION 17-2(97) 7-18-74 BY RHT FEAT %BK% NEEDED NEW LOSER TABLE ENTRY
03000	VERSION 17-2(96) 7-7-74 BY RHT MINOR EDITS FOR REC GC
03100	VERSION 17-2(95) 7-7-74 
03200	VERSION 17-2(94) 6-6-74 BY RHT ADD RGCSW
03300	VERSION 17-2(93) 5-30-74 BY RLS BUG #SM# TEST FOR OVERFLOW OF DISPATCH TABLE
03400	VERSION 17-2(92) 5-27-74 
03500	VERSION 17-2(91) 5-25-74 BY RLS MAKE V. 54 OF LOADER DEFAULT ON TENEX
03600	VERSION 17-2(90) 5-25-74 BY RLS EDIT
03700	VERSION 17-2(89) 5-25-74 BY rls edit
03800	VERSION 17-2(88) 5-25-74 BY RLS PARAMETERIZE JRST TABLE
03900	VERSION 17-2(87) 5-25-74 
04000	VERSION 17-2(86) 5-25-74 BY RLS NEW STDBRK
04100	VERSION 17-2(85) 5-24-74 
04200	VERSION 17-2(84) 5-10-74 BY RHT MODIFY CMU TREATMENT OF GLOBSW MACROS
04300	VERSION 17-2(83) 5-5-74 BY RHT ADD PRNINF TO USER TABLE
04400	VERSION 17-2(82) 4-11-74 BY RHT ADD RECSW & ASSOCIATED MACROS
04500	VERSION 17-2(81) 4-7-74 BY RHT FEAT %BI% ADD RECUUO
04600	VERSION 17-2(80) 4-7-74 BY RHT ADD RECTYP DEF
04700	VERSION 17-2(79) 3-26-74 BY RLS CHANGE TENEX LOADVR TO 54
04800	VERSION 17-2(78) 3-19-74 BY RHT GO OVER FILE WITH RS
04900	VERSION 17-2(77) 3-17-74 BY RLS  EDIT
05000	VERSION 17-2(76) 3-17-74 BY RLS INSTALL SITE SWITCHES
05100	VERSION 17-2(75) 3-17-74 BY RLS INSTALL TENEX FEATURES, TENEX SYSTEM SWITCHES
05200	VERSION 17-2(75) 2-24-74 BY RHT FEAT %BH% TMPB FOR REF ITEM DATUM
05300	VERSION 17-2(74) 1-11-74 
05400	VERSION 17-2(73) 1-11-74 BY JRL ADD CMU SWITCHES SPACE ALLOCATION COMVER
05500	VERSION 17-2(72) 1-11-74 
05600	VERSION 17-2(71) 1-11-74 
05700	VERSION 17-2(70) 12-9-73 BY KVL %BC% ADD BAIL SWITCH
05800	VERSION 17-2(69) 12-6-73 BY jrl REMOVE AS MANY NON STANFORD CHARS AS POSSIBLE
05900	VERSION 17-2(68) 12-3-73 BY RHT ITMANY__0
06000	VERSION 17-2(67) 12-3-73 
06100	VERSION 17-2(66) 12-3-73 BY RFS INSERT CALLIS FOR EXPORT SYSTEM
06200	VERSION 17-2(65) 12-3-73 
06300	VERSION 17-2(64) 12-3-73 BY RFS ELIMINATED ALL III DISPLAY STUFF
06400	VERSION 17-2(63) 12-2-73 BY RHT HEREFK MACRO & REMOVE USELESS FILSPC TAPE HISTORY
06500	VERSION 17-2(62) 12-2-73 
06600	VERSION 17-2(61) 11-30-73 BY RHT ADD STANSW & DECSW
06700	VERSION 17-2(60) 11-26-73 
06800	VERSION 17-2(59) 11-26-73 
06900	VERSION 17-2(58) 11-26-73 BY RHT DIDDLE THE FILSPC STUFF
07000	VERSION 17-2(57) 11-24-73 BY RHT FEAT %AM% ALLOW MANY USER PHASES OF INIT
07100	VERSION 17-2(56) 11-24-73 
07200	VERSION 17-2(55) 11-21-73 BY RFS CHANGE 'TEST' TO 'TSTSEG'
07300	VERSION 17-2(54) 11-18-73 
07400	VERSION 17-2(53) 11-18-73 BY RHT FEAT %AJ% -- ADD IN FILSPC
07500	VERSION 17-2(52) 11-18-73 
07600	VERSION 17-2(51) 11-18-73 
07700	VERSION 17-2(50) 11-18-73 
07800	VERSION 17-2(49) 11-18-73 
07900	VERSION 17-2(48) 11-18-73 BY RHT FEAT %AJ% -- RESTRUCTURE HEAD
08000	VERSION 17-2(47) 11-10-73 BY RHT ADD CORERR, ERRPRI, ERFLGS BITS
08100	VERSION 17-1(46) 7-26-73 BY RHT TRY VERSION 17
08200	VERSION 17-1(45) 7-26-73 *********************
08300	VERSION 16-2(44) 7-9-73 BY JRL REMOVE LAST REFERENCES TO DCS SWITCH
08400	VERSION 16-2(43) 4-23-73 BY RHT CHANGE ARGTYP TO RFITYP
08500	VERSION 16-2(42) 2-7-73 BY RHT ADD TYPE FOR ARG LIST ITEM
08600	VERSION 16-2(41) 1-28-73 BY JRL PUT QBIND,FBIND HERE SO STATS CAN USE
08700	VERSION 16-2(40) 1-23-73 BY RHT MAKE NIC & UNBOUND THE SAME
08800	VERSION 16-2(39) 1-23-73 BY JRL CHANGE CODE FOR UNBND
08900	VERSION 16-2(38) 1-8-73 BY JRL ADD MAXLOC MAXIMUM NUMBER OF FOREACH LOCAL ITEMVARS ALLOWED
09000	VERSION 16-2(37) 12-13-72 BY jrl BUG #KS# ADD LOADVR SWITCH
09100	VERSION 16-2(36) 11-21-72 
09200	VERSION 16-2(35) 11-10-72 BY HJS MODIFY QPOP TO TAKE AS AN ARGUMENT AN ADDRESS FOR THE POPPED ENTRY
09300	VERSION 16-2(34) 10-16-72 BY JRL CHANGE INVTYP TO 31 TO ALLOW CONTEXT ARRAY ITEMS
09400	VERSION 16-2(33) 9-15-72 BY RHT ADD USER TABLE ENTRIES FOR INTERRUPTS
09500	VERSION 16-2(32) 8-27-72 BY RHT PUT CELL FOR STACK UNWINDER RET ADRS IN USER TABLE
09600	VERSION 16-2(31) 8-23-72 BY JRL ADD UNBND "ITEM"
09700	VERSION 16-2(30) 8-20-72 BY RHT MODIFY USER TABLE
09800	VERSION 16-2(29) 8-6-72 BY RHT ADD PRILIS TO USER TABLE
09900	VERSION 16-2(28) 8-3-72 BY JRL ADD MPBIND TO TBITS DEFS FOR MATCHING PROCEDURES
10000	VERSION 16-2(27) 7-27-72 BY RHT MAKE MACRO FOR DECLARING PD. ENTRIES
10100	VERSION 16-2(26) 7-20-72 BY JRL CHANGE ARRTYP VALUE
10200	VERSION 16-2(25) 7-20-72 BY RHT ADD PROCESS ITEM (TYPE 11)
10300	VERSION 16-2(24) 6-20-72 BY DCS BUG #HU# BETTER TTY INFORMATION
10400	VERSION 16-2(23) 5-16-72 BY DCS INTRODUCE VERSION 16
10500	VERSION 15-2(9-22) 5-4-72 LOTS OF THINGS
10600	VERSION 15-2(8) 2-19-72 BY RHT THE BRAVE NEW WORLD
10700	VERSION 15-2(7) 2-5-72 BY DCS BUG #GJ# ADD LSTON LISTING CONTROL STUFF
10800	VERSION 15-2(6) 2-5-72 BY DCS BUG #GI# REMOVE TOPSTR DUE TO NEW `CAT'
10900	VERSION 15-2(5) 2-1-72 BY DCS BUG #GE# INSTALL SYMB %ALLOC BLK INDICES
11000	VERSION 15-2(4) 1-31-72 BY DCS BUG #GE# UPDATE USER TABLE, %ALLOC BITS, INDICES
11100	VERSION 15-2(3) 1-3-72 BY DCS BUG #FX# REMOVE COM2, COM2SW COMPLETELY
11200	VERSION 15-2(2) 12-24-71 BY DCS BUG #FF# REMOVE SAILRUN(ASSUME RUNTIM OR LIB)
11300	VERSION 15-2(1) 12-2-71 BY DCS INSTALL VERSION NUMBER
11400	
11500	;
     
00100	COMMENT  INTRODUCTION
00200		THIS IS THE FILE OF MACRO DEFINITIONS AND GLOBAL AC
00300		ASSIGNMENTS FOR THE SAIL COMPILER, THE SAIL RUNTIME
00400		ROUTINES.  NEEDLESS TO SAY, NOT ALL PORTIONS ARE USED
00500		BY ALL PEOPLE.
00600	
00700	
00800	DEFINE JD ' (A) <
00900		EXTERNAL .JB'A
01000		DEFINE JOB'A <.JB'A>
01100	>
01200	JD (SA)
01300	JD (HVR)
01400	JD (HGH)
01500	JD (VER)
01600	JD (REN)
01700	JD (UUO)
01800	JD (SYM)
01900	JD (FF)
02000	JD (REL)
02100	JD (41)
02200	JD (DDT)
02300	JD (CNI)
02400	JD (TPC)
02500	JD (UUO)
02600	JD (APR)
02700	JD (HRL)
02800	JD (OPC)
02900	
03000	;EXTERNAL  JOBSA,JOBVER,JOBREN,JOBUUO
03100	;EXTERNAL JOBSYM,JOBFF,JOBREL,JOB41,JOBDDT,JOBCNI,JOBTPC,JOBUUO
03200	;EXTERNAL JOBAPR,JOBHRL,JOBOPC
03300	
03400	
03500	
03600	SUBTTL	SAIL/GOGOL MACROS AND SWITCHES
     
00100	COMMENT   SWITCHES : AN INTRODUCTION
00200	Conditional assembly runs rampant in SAIL.  Most of the switches are used to
00300	 select options (debug or no debug, etc.) Some are only valid at Stanford.
00400	 There is one, EXPORT, tested by the macros NOEXPO and EXPO, which decides
00500	 whether this is for Stanford or somebody else.
00600	
00700	We have a program which, by reading the SAIL files and looking for switch-
00800	 testing macros, can do the conditional assembly once and for all (removing
00900	 the conditional stuff from the files.  It is such a set of files which
01000	 we normally send out, so if you see some switches and macros below that
01100	 never get referenced, it's because that code was taken out of your files.
01200	
01300	The conditional assembly switches are assigned in the following files:
01400	
01500	DCS	DCS	_2				;SLS (experimental) system
01600		FTDEBUG _1				;include debugging in cmplr
01700	
01800	;NOCOM	COM2SW	_0				;OBSOLETE SWITCH, WAS TO
01900							; DISTINGUISH 2-SEG COMPILER
02000	WOM	DCS	_1				;WOM (experimental) system
02100	
02200	HEAD	EXPORT	_if NDEF then 0 else EXPORT
02300		DCS	_if NDEF then 0 else DCS
02400	;	COM2SW	_if NDEF then 1 else 0
02500		SIXSW	_if NDEF then (if EXPO then 0 else 1) else SIXSW ;sixbit PPN's
02600		HEDSYM	_if NDEF then 0 else HEDSYM	;With HEDSYM on, assembling HEAD
02700							; yields HEAD.REL, a symbol
02800							; file for the USERCON function
02900	
03000	GLB	GLOBSW	_1				;runtimes know about glb mdl
03100	
03200	LOW	SEGS	_1				;upper or lower assembly
03300		LOWER	_1				;assembles SAILOW or GLBLOW
03400		UPPER	_0
03500	
03600	UP	SEGS	_1
03700		LOWER	_0
03800		UPPER	_1				;assembles UPPER or GLOBAL
03900	
04000	FILSPC IS PART OF HEAD AS OF NOV 1973
04100	FILSPC	FILXXX	_SAISGn				;SAIL upper segment name
04200		SLOFIL	_SAILOW				;SAIL lower segment name
04300	GLOB <
04400		FILXXX	_GLBSGn				;global model upper segment name
04500		SLOFIL	_GLBLOW				;global model lower segment name
04600	>;GLOB
04700		SGDEVC	_SYS				;device for segment files
04800		SGPPNN	_0				;PPN for segment files
04900		LOCSYM	_0				;no local uppers in lower file
05000		NOPROT	_0				;want upper segment protected
05100	
05200	DB	FTDEBUG	_1
05300	
05400	SAIL	LEAPSW	_1				;LEAP exists
05500		FTDEBUG	_if NDEF then 0 else FTDEBUG
05600		GLOBC	_if LEAP and NOEXPO then 1 else if NDEF then 0 else GLOBC
05700		PATSW	_if NDEF then 0 else PATSW	;compile AOS/SOS to PAT words
05800		RENSW	_if NDEF then 1 else RENSW	;compile Re-entrant Code
05900		TMPCSW	_if NDEF then (if EXPO then 1 else 0) else TMPCSW
06000						;TMPCOR UUO available and used
06100	;; #KS BY JRL (12-13-72) ADD LOADVR SWITCH
06200		LOADVR  _if NDEF then 54 else LOADVR (for differences in block code
06300				for required rel files,libraries in LOADER 54)
06400		 SAILRUN was a switch controlling some runtimes.  Now runtimes will
06500		  be assembled to assume a compiler (since that's common anyway).
06600	;; %BC% BY KVL (1/3/74) ADD BAIL SWITCH
06700		BAISW	_if STANFO then 1 else 0	;Bail only at stanford
06800	
06900	GOGOL	UPPER	_if NDEF then 0 else 
07000		UPPER	_if NDEF then 0 else UPPER
07100		LOWER	_if NDEF then 0 else LOWER
07200		SEGS	_UPPER or LOWER
07300		GLOBSW	_if NDEF then 0 else GLOBSW
07400		RENSW	_if NDEF then 1 else RENSW	;assemble Upper-Segment Library
07500		 SAILRUN  no longer exists.
     
00100	; SWITCH SETTINGS & MACROS
00200	
00300	These macros come in pairs, and exist so that the above-mentioned
00400	 program will have an easy job of it.  The meaning of each pair is
00500	 obvious.  They may be used only as in the following example:
00600	SW <			;or NOSW, starting in col. 1 (any comment out here)
00700	(code to appear under this switch)
00800	>;SW			or NOSW, must be same, any comment out here
00900	 These things may be nested without confusing anyone.
01000	
01100	Here are the macros
01200	
01300	
01400	;;=I12=
01500	DEFINE DEC <IFE STANSW!TENXSW!CMUSW!TYMSW,>	;HAS TOPS-10 FEATURES (ESP. MPB)
01600	DEFINE NODEC <IFN STANSW!TENXSW!CMUSW,>	;SITE WITHOUT ALL TOPS-10 FEATURES
01700	
01800	DEFINE STANFO <IFN STANSW,>	;code for stanford only
01900	DEFINE NOSTANFO <IFE STANSW,>	;code not allowed at stanford ever
02000	DEFINE EXPO <IFN EXPORT, >	;code for export only (BEING PHASED OUT)
02100	DEFINE NOEXPO <IFE EXPORT, >	;code for Stanford only (BEING PHASED OUT)
02200	DEFINE CMU <IFN CMUSW,>		;CODE ONLY FOR CMU
02300	DEFINE NOCMU <IFE CMUSW,>	  ;CODE NEVER FOR CMU
02400	DEFINE TYMSHR <IFN TYMSW,>
02500	DEFINE NOTYMSHR <IFE TYMSW,>
02600	DEFINE ITS <IFN ITSSW,>		;Code only for its
02700	DEFINE NOITS <IFE ITSSW,>	;code never for its
02800	DEFINE IMSSS <IFN IMSSSW,>	;IMSSS version of TENEX-SAIL
02900	DEFINE NOIMSSS <IFE IMSSSW,>
03000	DEFINE PARC <IFN PARCSW,>	;CODE ONLY FOR PARC
03100	DEFINE NOPARC <IFE PARCSW,>	;NEVER FOR PARC
03200	DEFINE SRIAI <IFN SRIAISW,>	;CODE ONLY FOR SRI-AI
03300	DEFINE NOSRIAI <IFE SRIAISW,>	;NEVER 
03400	
03500	DEFINE JPL <IFN JPLSW,>		;AT JPL
03600	DEFINE NOJPL <IFE JPLSW,>	;NOT AT JPL
03700	DEFINE SUMEX <IFN SUMEXSW,>	;AT SUMEX
03800	DEFINE NOSUMEX <IFE SUMEXSW,>	;NOT AT SUMEX
03900	DEFINE UOR <IFN UORSW,>		; CODE FOR UNIV OF ROCHESTER
04000	DEFINE NOUOR <IFE UORSW,>	;NOT AT U OF R
04100	;; \UR#31\ JRL (8-9-78) INSTALL NIH SWITCH
04200	DEFINE NIH <IFN NIHSW,>		; CODE FOR NIH 
04300	DEFINE NONIH <IFE NIHSW,>	; NOT AT NIH
04400	;; NEW SWITCHES FOR BIG LEAP AND IMPROVED HASHING \UR#3\
04500	DEFINE URHASH <IFN URHSW,>	;NEW LEAP HASH ROUTINES AND SEARCHES
04600	DEFINE NOURHASH <IFE URHSW,>
04700	DEFINE URLEAP <IFN URLPSW,>	;TRUE FOR DESCENDING ITEM ALLOCATION
04800	DEFINE NOURLEAP <IFE URLPSW,>	;LOCALS ASCENDING, GLOBALS DESCENDING
04900	DEFINE URSTAT<IFN URSTSW,>	;TRUE IF YOU WANT LEAP SEARCH STATISTICS
05000	DEFINE NOURSTAT <IFE URSTSW,>	;NO STATISTICS PLEASE
05100	;; \UR#3\
05200	DEFINE BAIL <IFN BAISW,>	;DEBUGGER STUFF
05300	DEFINE NOBAIL <IFE BAISW,>
05400	DEFINE GLOB <IFN GLOBSW, >	;since global compiler (GLOBC) can service
05500	DEFINE NOGLOB <IFE GLOBSW, >	; non-global code, GLOBC is different
05600	DEFINE GLOC <IFN GLOBC, >	; from GLOB (global model)
05700	DEFINE NOGLOC <IFE GLOBC, >
05800	DEFINE UP <IFN UPPER,>		;upper segment code (only used in runtime)
05900	DEFINE NOUP <IFE UPPER,>	;not
06000	DEFINE LOW <IFN LOWER,>		;lower bootstrap for 2 seg thing (ditto)
06100	DEFINE NOLOW <IFE LOWER,>	;not
06200	DEFINE LEP <IFN LEAPSW,>	;this compiler understands LEAP
06300	DEFINE NOLEP <IFE LEAPSW,>	;doesn't (applies to runtime too)
06400	DEFINE REN <IFN RENSW,>		;Re-entrant output (comp), runtimes (runtim)
06500	DEFINE NOREN <IFE RENSW,>
06600	DEFINE RENC <IFN RENCSW,>	;The compiler itself is reentrant
06700	DEFINE NORENC <IFE RENCSW,>	;The compiler itself is not reentrant
06800	DEFINE HACK <IFN HACKSW,>	;TEMPORARILY VERSION FOR STANFORD
06900	DEFINE NOHACK<IFE HACKSW,>	; WILL DISAPPEAR NEXT SAISG
07000	DEFINE TENX<IFN TENXSW,>	;FOR TENEX SYSTEMS
07100	DEFINE NOTENX<IFE TENXSW,>	;NOT
07200	DEFINE REC <IFN RCDSW,>		;RECORDS ARE CONDITIONAL UNTIL DEBUGGED BETTER
07300	DEFINE NOREC <IFE RCDSW,>	;RECSW WAS A VARIABLE IN THE COMPILER
07400	DEFINE RGC <IFN RGCSW,>		;RECORD GARBAGE COLLECTION (INSTEAD OF REF CNT)
07500	DEFINE NORGC <IFE RGCSW,>	;NOT
07600	DEFINE NRC <IFN NRCSW,>		;NEW-STYLE RECORD DESCRIPTORS
07700	DEFINE NONRC <IFE NRCSW,>	;NOT
07800	DEFINE KI10 <IFN KI10SW,>	;CPU IS A KI10
07900	DEFINE NOKI10 <IFE KI10SW,>	;NOT
08000	DEFINE KL10 <IFN KL10SW,>	;CPU IS A KL10
08100	DEFINE NOKL10 <IFE KL10SW,>	;NOT
08200	DEFINE XCOM <IFN XCOMSW,>	;COMPILER SAVE/RESTART (EXTEND) FACILITY
08300	DEFINE NOXCOM <IFE XCOMSW,>
08400	;;=I12=	ADD SFD SWITCH CONTROL
08500	DEFINE SFDS <IFG SFDLVL,>
08600	DEFINE NOSFDS <IFE SFDLVL,>	;NOT USED AT THE MOMENT
08650	DEFINE CRYPT <IFN CRYPSW,>	;Allow optional I/O trapping for encryption [06]
08660	DEFINE NOCRYPT <IFE CRYPSW,>	;Don't allow encryption trapping
08700	
08800	; ** CONDITIONAL SETTINGS **
08900	
09000	DEFINE STSW (V,VL) <IFNDEF V,<?V__VL>>
09100	
09200	
09300	IFDEF SPCWAR,<STSW(STANSW,1)> ;SPCWAR ONLY DEFINED AT STANFORD
09400	
09500	STSW (STANSW,0);WE MUST BE EXPORTING
09600	STSW (HACKSW,STANSW) ;ONLY AT STANFORD
09700	STSW (TENXSW,0); NOT USUSALLY AT TENEX
09800	STSW (CMUSW,0); NOT USUALLY AT CMU 
09900	IFDEF AUXCAL,<STSW (TYMSW,1)>
10000	STSW (TYMSW,0); IN CASE THE LINE ABOVE DOES NOT TAKE
10100	STSW (ITSSW,0); NOT USUALLY AT MIT
10200	STSW (IMSSSW,0); NOT USUALLY AT IMSSS
10300	STSW (PARCSW,0); NOT USUALLY AT PARC
10400	STSW (SRIAISW,0); NOT USUALLY AT SRIAI
10500	STSW (JPLSW,0);	NOT USUALLY AT JPL
10600	STSW (SUMEXSW,0); NOT USUALLY AT SUMEX
10700	STSW (UORSW,0); NOT USUALLY AT UOR
10800	;; \UR#31\ INSTALL NIH SWITCH
10900	STSW (NIHSW,0); NOT USUALLY AT NIH
11000	STSW (RENCSW,0)	;NOT USUALLY A REENTRANT COMPILER
11100	STSW (DECSW,1); USUALLY DEC 10-50 BASED SYSTEM
11200	STSW (HEDSYM,0)		;USUALLY NOT A USER-TABLE SYMBOL GENERATOR
11300	STSW (KL10SW,.CPU.-2)	;.CPU. IS 4 FOR KL, 2 FOR KI, 1 FOR KA, 0 FOR 6
11400	STSW (KI10SW,.CPU.-1)
11500	STSW (XCOMSW,1)		;COMPILER SAVE/RESTART USUALLY SUPPORTED
11600	STSW (SFDLVL,5)		;NORMAL SITE ALLOWS SFDs
11700	NOCMU <
11800	STSW(GLOBSW,0)		;USUALLY NOT A GLOBAL SEGMENT BEING MADE
11900	>;NOCMU
11950	STSW(CRYPSW,0)		;Usually no encryption trapping [06]
11960				;N.B. Currently an option only on TOPS20
12000	
12100	NOSTANFO <
12200	?EXPORT __ 1 	; TAKE CARE OF OBSOLETE SWITCH
12300	STSW (SIXSW,0)
12400	>;NOSTANFO
12500	STANFO <
12600	?EXPORT __ 0
12700	STSW (SIXSW,1)
12800	?KI10SW__1
12900	?KL10SW__1
13000	?SFDLVL__0		;STANFORD DOESN'T HAVE SFD'S
13100	>;STANFO	
13200	STSW(RCDSW,1); 
13300	STSW(RGCSW,RCDSW); DITTO, ALSO REALLY ONLY USE WHEN DEBUGGING COMPILER UNTIL BETTER
13400	STSW(NRCSW,1); USUALLY A NEW-STYLE RECORD SYSTEM (now) ****
13500	
13600	CMU < ;**** EXTRA SWITCHES FOR CMU ******
13700	DEFINE GGAS <IFN GASSW,>	;cmu version of global segment
13800	DEFINE NOGGAS <IFE GASSW,>	;inverse
13900	DEFINE GGGON <^^ GLOBSW__GASSW>	;
14000	DEFINE GGGOFF <^^ GLOBSW __0>	;USED TO SELECT SOME OF SU-AI GLOB STUFF
14100	STSW(GASSW,0)			;NOT USUALLY CMU GLOBAL
14200	STSW(GLOBSW,0)			;CMU WILL DIDDLE THIS SWITCH DIRECTLY
14300	?SFDLVL__0		 ;CMU DOESN'T HAVE SFD'S
14400	>;CMU
14500	
14600	IMSSS <;DEFAULT SETTINGS AT IMSSS
14700	?TENXSW__1			;TENEX AT IMSSS
14800	?KI10SW__1			;AND A KI
14900	?SIXSW__1			;USE SIXBIT PPN'S FOR LOADER AT IMSSS
15000	>;IMSSS
15100	
15200	PARC <
15300	?TENXSW__1			;TENEX AT PARC
15400	?KI10SW__1
15500	?SIXSW__0
15600	>;PARC
15700	
15800	JPL <
15900	?TENXSW__1
16000	?SIXSW__0
16100	>;JPL
16200	
16300	SRIAI <
16400	?TENXSW__1			
16500	?SIXSW__0
16600	>;SRIAI
16700	
16800	SUMEX <
16900	?IMSSSW__1			;MOST IMSSS FEATURES
17000	?SIXSW__0			;EXCEPT DONT USE SIXBIT
17100	?TENXSW__1			;BUT IS TENEX
17200	?KI10SW__1			;IS KI
17300	>;SUMEX
17400	
17500	UOR <
17600	?DECSW __ 1			;DEC TOPS-10 MONITOR
17700	?KL10SW__1			;IS KL
17800	?EXPORT __ 1			; NOT AT STANFORD
17900	?STANSW __ 0			; NOT AT STANFORD
18000	?GLOCSW __ 0			; NO GLOBAL MODEL
18100	?GLOBSW __ 0			; NO GLOBAL MODEL STUFF
18200	?URHSW __ 1			; USE NEW HASH TECHNIQUE
18300	?URLPSW __ 1			; ALLOCATE ITEMS TOP DOWN
18400	>;UOR
18500	;; \UR#31\ INSTALL NIH SWITCH
18600	NIH <
18700	?DECSW __ 1			; DEC TOPS-10 MONITOR
18800	?EXPORT __ 1			; NOT AT STANFORD
18900	?KL10SW __ 0			; HAVE KI-10 AT NIH
19000	?STANSW __ 0			; NOT AT STANFORD
19100	?GLOCSW __ 0			; NO GLOBAL MODEL COMPILER
19200	?GLOBSW __ 0			; NO GLOBAL MODEL RUNTIMES
19300	?URHSW __ 1			; WANT THE NEW LEAP
19400	?URLPSW __ 1			; ALLOCATE ITEMS TOP DOWN
19500	>;NIH
19600	TENX <
19700	?RENCSW__1			;WANT A RE-ENTRANT COMPILER
19800	?RENSW__1			;WANT A RE-ENTRANT RUNTIME
19900	?DECSW__0			;NOT A DEC SYSTEM
20000	?EXPORT__1			;AVOID STANFORD FEATURES
20100	?STANSW__0			;IN FACT, EXPLICITLY NOT STANFORD
20200	?GLOBSW__0			;NOT USUALLY GLOBAL FOR TENEX
20300	?GLOBC__0			;
20400	STSW(LOADVR,=54)		;TENEX SITES SEEM TO HAVE V. 54
20500	?SFDLVL__0			;NO TENEX SITE HAS SFD'S
20600	>;TENX
20700	
20800	TYMSHR<
20900	?SFDLVL__0			;NO SFD'S AT TYMSHARE
21000	?KI10SW__1			;ALL KI'S
21100	>;TYMSHR
21200	
21300	;; %BC% KVL 1-6-74	ADD BAILD SWITCH
21400	STSW (BAISW,1)		;USUALLY ON
21500	;; %BC%
21600	;; %% \UR#3\ JES (@UOR)	;NEW LEAP STUFF
21700	STSW (URHSW,0)		; LEAVE OFF UNLESS EXPLICITLY ASKED FOR
21800	STSW (URLPSW,URHSW)		;MIGHT AS WELL USE BOTH AS ONE
21900	STSW (URSTSW,0)			;GENERALLY DON'T WANT THIS
22000	IFG	URLPSW-URHSW,<		;IF URLPSW = 1 & URHSW = 0
22100		PRINTX	URLPSW REQUIRES URHSW [FAIL ERROR ON NEXT LINE]
22200		#SWERR
22300	>
22400	;; %%
22500	
22600	KL10<	?KI10SW__1		;NORMALIZE
22700	>;KL10
22800	NOKI10<	?KL10SW__0
22900	>;NOKI10
23000	
23100	IFG STANSW+TENXSW+CMUSW+TYMSW-1,<	;AT MOST ONE OF THESE CAN BE SET
23200		PRINTX	SWITCH INCOMPATIBILITY [FAIL ERROR ON NEXT LINE]
23300		#SWERR
23400	>
     
00100	COMMENT  THE FILSPC STUFF -- OLDER HISTORY 
00200	
00300	
00400	COMMENT 
00500	VERSION 17(3) 8-19-73 BY RHT DECUS!!!
00600	VERSION 17(2) 7-26-73 
00700	VERSION 16-2(11) 7-26-73 BY JRL VERSION 17
00800	VERSION 16-2(10) 7-26-73 BY jrl RECONFIGURE FOR VERSION 17
00900	VERSION 16-2(9) 1-8-73 BY JRL LIB NAMES NOW LIBSA5,HLBSA5
01000	VERSION 16-2(8) 12-2-72 BY RHT CONFIGURE FOR SAISG5, ETC
01100	VERSION 16-2(7) 9-21-72 BY JRL RECONFIGURE FOR SAIL
01200	VERSION 16-2(6) 8-29-72 BY RHT CONFIGURE FOR NSAIL (PROCESSES, EVENTS, ETC.)
01300	VERSION 16-2(5) 7-2-72 BY RHT PUT UP VERSION 16
01400	VERSION 16-2(4) 6-25-72 BY DCS SAISG4 UPDATES V16 FEATURES
01500	VERSION 16-2(3) 6-24-72 BY DCS BUG #HX# PARAM PROCESSOR NAME, LIBRARIES
01600	VERSION 16-2(2) 5-13-72 BY DCS INSTALL VERSION 16
01700	VERSION 15-2(1) 12-2-71 BY DCS INSTALL VERSION NUMBER
01800	
01900	;
     
00100	; FILSPC FILES
00200	
00300	IFNDEF TSTSEG,<TSTSEG__0>
00400	NOTENX <
00500	DEFINE GSYSIN <>
00600	;[clh] begin - also all references to FILEXX below are part of this edit
00700	?SYSIND__0		;ALL REFERENCES TO SYSIND WILL BE PRECEEDED BY GSYSIN
00800				;THEN THEY WILL BE INDEXED BY SYSIND.  THIS IS NOT
00900				;NEEDED ON NON-TENEX, SO THIS MAKES IT ALL A NOOP
01000	DEFINE FILEXX (STR,LEN) <
01100		RADIX =10
01200		,LEN		;STRING 
01300		RADIX =8
01400		POINT 7,[ASCIZ /STR/],-1>
01500	;[clh]^^
01600	IFN TSTSEG,<
01700	DEFINE FILXXX <SIXBIT /SAISGT/>
01800	DEFINE SLOFIL <SIXBIT /SAILWT/>
01900	DEFINE SGDEVC <SIXBIT /DSK/>
02000	STANFO <
02100	DEFINE SGPPNN <SIXBIT /  SAIL/>
02200	>;STANFO
02300	NOSTAN <
02400	DEFINE SGPPPN <0>
02500	>;NOSTAN
02600	?LOCSYM__1
02700	?NOPROT__1
02800	>
02900	IFNDEF FILXXX,<DEFINE FILXXX <SIXBIT /SAISG9/>>
03000	;SAILOW FOR PROCESSOR SAIL, EXTENSION SAI
03100	;SAILOX  "	      OSAIL,   "      OSA
03200	;SAILOY  "	      NSAIL,   "      NSA
03300	IFNDEF SLOFIL,<DEFINE SLOFIL <SIXBIT /SAILOW/>>;PRODUCTION SAIL
03400	IFNDEF SGDEVC,<DEFINE SGDEVC <SIXBIT /SYS/>>
03500	IFNDEF SGPPNN,<DEFINE SGPPNN <0>>
03600	IFNDEF LOCSYM,<?LOCSYM__0>;DON'T WANT LOCAL SEGMENT SYMBOLS
03700	IFNDEF NOPROT,<?NOPROT__0>	;DON'T WANT SEGMENT PROTECT IF NOT GLOBAL
03800	
03900	DEFINE PROCSR <ASCIZ /SAIL: />	;FOR PRINTOUT OF PROCESSOR
04000	DEFINE RPGFIL <SIXBIT /QQSAIL/> ;FOR COMPIL PURPOSES
04100	DEFINE DEFEXT <'SAI'>		;DEFAULT EXTENSION
04200	IFNDEF BKTFIL,<DEFINE BKTFIL <FILEXX(<BKTBL.BKT>,9)>>
04300	IFNDEF BKTDEV,<DEFINE BKTDEV <FILEXX(<DSK>,3)>>
04400	
04500	DEFINE LIBLOW <FILEXX(<SYS:LIBSA9>,10)>	;REQUIRED LIBRARIES
04600	DEFINE LIBHI  <FILEXX(<SYS:HLBSA9>,10)>	; (HISEG VERSION)
04700	BAIL<
04800	DEFINE BAILOD <FILEXX(<SYS:BAIL.REL>,12)> ;RESIDENCE OF BAIL
04900	;;%##% JFR 2-16-75 FOR KNOWLEDGE OF SAIL RUNTIMES
05000	DEFINE BAIPDS <FILEXX(<SYS:BAIPD9.REL>,14)>
05100	>;BAIL
05200	
05300	DEFINE OPDEV   <SIXBIT /SYS/>		;DEVICE FOR OPCODE FILE
05400	DEFINE OPNAME  <SIXBIT /2OPS2/>		;NAME OF SAME (EXTEN ALWAYS OPS)
05500	DEFINE OPPPN   <0>			;WHERE IT'S AT
05600	
05700	GLOB <
05800	DEFINE FILXXX <SIXBIT /GLBSG8/>
05900	DEFINE SLOFIL <SIXBIT /GLBLOW/>
06000	DEFINE SGDEVC,<SIXBIT /SYS/>
06100	DEFINE SGPPNN,<0>
06200	?NOPROT__1
06300	?LOCSYM__1
06400	>;GLOB
06500	
06600	CMU <
06700	GGAS <	;OH WELL
06800	DEFINE SGDEVC <SIXBIT/DSK/>
06900	DEFINE FILXXX <SIXBIT/CONSEG/>
07000	DEFINE SGPPNN <XWD 1305,60410>	
07100			;KLUDGE - HACK - A700CR00, WHEREON THE CONTROLLER LIVES.
07200	>;GGAS
07300	>;CMU
07400	>;NOTENX
07500	
07600	TENX <
07700	;[clh]  Make all the file names be two word blocks so we can index by system
07800	
07900	DEFINE GSYSIN<
08000		MOVE 2,$OSTYP	;[clh] 0 for Tenex, 2 for Tops-20
08100	>
08200	
08300	?SYSIND__2	;[clh] all references to FILEXX things are indexed by this
08400	
08500	DEFINE FILEXX (TSTR,TLEN,WSTR,WLEN) <
08600		RADIX =10
08700		,TLEN		;STRING FOR TENEX
08800		POINT 7,[ASCIZ /TSTR/],-1
08900		,WLEN		;STRING FOR TOPS-20
09000		RADIX =8
09100		POINT 7,[ASCIZ /WSTR/],-1>
09200	
09300	IFN TSTSEG,<
09400	IFNDEF FILXXX,<DEFINE FILXXX <FILEXX(<<SAIL>T-SAISGT.SAV>,18,<SAI:T-SAISGT.EXE>,16)>>
09500	IFNDEF SLOFIL,<DEFINE SLOFIL <SIXBIT /SAILWT/>>
09600	?LOCSYM__1
09700	?NOPROT__1
09800	IFNDEF LIBLOW,<DEFINE LIBLOW <FILEXX(<LIBSAT.REL>,10,<LIBSAT.REL>,10)>>
09900	>;IFN TSTSEG
10000	BAIL<
10100	DEFINE BAILOD <FILEXX(<<SAIL>BAIL.REL>,14,<SAI:BAIL.REL>,12)>
10200	;;%##% JFR 2-16-75 FOR KNOWLEDGE OF SAIL RUNTIMES
10300	DEFINE BAIPDS <FILEXX(<<SAIL>BAIPD9.REL>,16,<SAI:BAIPD9.REL>,14)>
10400	>;BAIL
10500	IFE TSTSEG,<
10600	IFNDEF FILXXX,<DEFINE FILXXX <FILEXX(<<SAIL>T-6-SAISG9.SAV>,20,<SAI:T-6-SAISG9.EXE>,18)>>
10700	IFNDEF SLOFIL,<DEFINE SLOFIL <SIXBIT /LOWTSA/>>
10800	IFNDEF SLOLOD,<DEFINE SLOLOD <ASCIZ/SYS:LOWTSA,/>>	;FOR INTERFACE TO LOADER
10900	?LOCSYM__0
11000	?NOPROT__0
11100	IFNDEF LIBLOW,<DEFINE LIBLOW <FILEXX(<<SAIL>LIBSA9.REL>,16,<SAI:LIBSA9.REL>,14)>>
11200	IFNDEF LIBHI,<DEFINE LIBHI <FILEXX(<<SAIL>HLBSA9.REL>,16,<SAI:HLBSA9.REL>,14)>>
11300	IMSSS<
11400	IFNDEF SDTLOD,<DEFINE SDTLOD <ASCIZ/,SDDTRL[S,AIL]/>>
11500	>;IMSSS
11600	>;IFE TSTSEG
11700	IFNDEF SEGPAG, <
11800	?SEGPAG__630				;PAGE WHERE THE SEGMENT STARTS
11900	>;IFNDEF SEGPAG
12000	IFNDEF STARTPAGE, <
12100	?STARTPAGE__610				;PAGE WHERE CHANNEL BUFFERS BEGIN
12200	>;IFNDEF STARTPAGE
12300	IFNDEF JFNSIZE, <
12400	?JFNSIZE__20				;NUMBER OF CHANNELS ALLOWED
12500	>;IFNDEF JFNSIZE
12600	IFNDEF RUNLOD,<DEFINE RUNLOD <FILEXX(<<SUBSYS>LOADER.SAV>,18,SYS:LINK.EXE,12)>>
12700	IFNDEF LODTFN,<DEFINE LODTFN <FILEXX(<LOA.TMP>,7,<LNK.TMP>,7)>>
12800	IFNDEF BKTFIL,<DEFINE BKTFIL <FILEXX(<<SAIL>BKTBL.BKT>,15,<BKTBL.BKT>,9)>>
12900	IFNDEF BKTDEV,<DEFINE BKTDEV <FILEXX(<DSK>,3,<SAI>,3)>>
13000	IFNDEF UDTFIL,<DEFINE UDTFIL <FILEXX(<<SAIL>UDDT.SAV>,14,<SYS:UDDT.EXE>,12)>>
13100	IFNDEF OPFILE,<DEFINE OPFILE <FILEXX(<<SAIL>3OPS3.OPS>,15,<SAI:3OPS3.OPS>,13)>>
13200	>;TENX
     
00100	; NARRATIVE FILSPC ACCOUNTS
00200	
00300	STANFO <  ; ACTUALLY, NOT KEPT UP LATELY
00400	COMMENT 
00500	HISTORY OF SAIL SYSTEMS
00600	3-1-71   VERSION 'SG1',,10
00700	 NEW SAIL SYSTEM UP, COMPILER AND RUNTIME
00800	 FEATURES:
00900	   NEW SEGMENT SCHEME ELIMINATES SAISYM GARBAGE, ALLOWS EXPO SHARED
01000		SEGMENTS, USE OF LATEST DEC LOADER.
01100	   NEW RAID WENT UP AT SAME TIME.
01200	   NEW LOADER (.052 MODIFIED) AT SAME TIME; WORKS AS LISP LOADER.
01300	   NEW DDT?
01400	   I/O ERROR ENABLE BUSINESS; BETTER SUBSTRING STUFF;
01500		PUNCTUATION ERROR ENABLE IN LOOKUP, ETC.
01600	   NONSTD BUFFER SIZES
01700	   USERCON
01800	   FREITM
01900	   GC CHANGE (WORKS WITH XPAND 0)
02000	   CVFIL, CVOS BETTER.
02100	3-12-71  GLOBAL SEGMENT GLBLOW,GLBSG2 UP
02200	   FIXED PTYALL BUG, WHICH CAUSED MESSAGE PROCEDURES TO BLOW
02300	3-15-71 GLOBAL SEGMENT GLBLOW,GLBSG3 UP
02400	   PTYALL FIXES SOME MORE -- GLUB.
02500	3-21-71  GLBLOW, GLBSG4 CREATED, TESTED
02600	    REQUIRE -1 NEW!ITEMS (GLOBAL OR NOT) INHIBITS LOCAL MODEL
02700	3-21-71 FILES FOR RUNTIMES, GREATLY MODIFIED, TRANSFERRED
02800	    FROM T,AIL WHERE THEY HAD BEEN SUCCESSFULLY TESTED IN
02900	    ALL CONFIGURATIONS I COULD THINK OF -- FACILITATE MUCH
03000	    MORE RAPID LIBRARY CREATION (THERE IS NOW ONLY 1 SCISS).
03100	6-22-71  MESPRO CHANGED TO ADD NEW FEATURE TO PUT!DATA.
03200	
03300	7-16-71 VERSION 'SG2',,11  (version SG6 for global model)
03400	 NEW SAIL SYSTEM, COMPILER AND RUNTIME
03500	 FEATURES:
03600	  CASE STATEMENT IMPROVEMENTS OUTLINED IN NEWMAN AND DOCS.UPD
03700	  REQUIRE n VERSION IMPLEMENTED
03800	  MYRIAD BUGS FIXED
03900	  LEABOT AND FRLOC TABLES ELIMINATED FROM USER TABLE
04000	  REQUIRE -1 NEW!ITEMS GIVES NO LOCAL MODEL ALLOCATION
04100	  RETURN CODE CHANGED -- MORE EFFICIENT -- NOW A LOCAL STRING
04200	    VARIABLE MAY BE RETURNED FROM A RECURSIVE STRING PROCEDURE.
04300	  AOS PAT/SOS PAT STUFF REMOVED FROM GENERATED PROCEDURES.
04400	  FREITM MOVED TO BE WITH OTHERS IN USER TABLE
04500	  THE RES COUNTER SYSTEM (/K) INSTALLED (SEE DOCS.UPD ETC.)
04600	7-21-71 VERSION GLBLOW,GLBSG7 UP
04700		MESSAGE PROCEDURE ROUTINE PUT!DATA(0,0,NAME) CHANGED TO REQUIRE
04800	ALL JOBS ENTERED TO HAVE SAME VERSION NUMBER
04900	10-20-71 VERSION GLBSG8 UP - RANDOM BUGS FIXED
05000	
05100	5-13-72 VERSION 16 (16 runtime) OF SAIL UP FOR EXPERIMENTATION
05200	 FEATURES:
05300	  1. Various improvements
05400	  2. New stack structure, up-level addressing, jumps out BY RHT
05500	  3. Improved LEAP by JRL
05600	  4. Improved macros by HJS
05700	 SAISG3
05800	6-25-72 VERSION 16 PUT UP AS STANDARD PROCESSOR,  NSAIL.  The files:
05900	  NSAIL.DMP[1,3] is the compiler, ext. NSA (uses SAISG4).
06000	  SAILOY.REL[1,3] is the low segment (always for NSAIL)
06100	  SAISG4.SEG[1,3] is the segment
06200	  LIBSA1, HLBSA1[1,3] are the libraries.
06300	 Will go back to SAISG3 shortly.
06400	7-3-72 VESRION 16 PUT UP AS STANDARD SAIL
06500	  OLD SAIL (VERSION "15") BECOMES STANDARD PROCESSOR "OSAIL"
06600		EXTENSION .OSA , LOW SEGMENT IS SAILOX (PREV SAILOW)
06700		SAISG2.REL IS ITS UPPER
06800	  NOW SAISG3.SEG IS THE UPPER, SAILOW.REL IS THE LOWER, LIBSA1, HLBSA1 
06900	  ARE THE LIBRARIES.
07000	10-22-72 NEWER, BETTER SAIL PUT UP.  SAISG4 IS THE SEGMENT
07100	
07200	12-7-72 VERSION 16 (REVISED) PUT UP AS STANDARD PROCESSOR
07300	 FEATURES:
07400	  1. miscellaneous bugs fixed
07500	  2. More LEAP modifications by JRL
07600	  3. CLEANUPs to blocks
07700	  4. User initialization happens as first executable statement.
07800	
07900	 SAISG5.SEG is the segment.  LIBSA5.REL is the library.
08000	
08100	7-25-73 VERSION 17 PUT UP AS STANDARD PROCESSOR (DECUS RELEASE??)
08200	 FEATURES
08300	  1. bug fixes
08400	  2. macro changes
08500	  3. process changes
08600	 SAISG6.SEG is the segment. LIBSA6.REL, the library.
08700	 GLBSG6.SEG is the global segment.
08800	
08900	8-19-73 TRANSFERRED FILES OVER TO X,AIL FOR DECUS RELEASE
09000	
09100	>;STANFO
09200	
09300	
     
00100	;LISTING CONTROL MACROS & THE LIKE
00200	
00300	;VARIOUS HANDY MACRO DEFINITIONS TO TRY TO MAKE THE CODE
00400	;SOMEWHAT MORE READABLE.
00500	
00600	II__1
00700	FOR @' JJ IN (HEAD,SAIL,PARSE,PDEFS,PRODS,SUBRS,SMTB,SYM,GEN,ARRAY) <
00800	?..'JJ__II
00900	II__II1
01000	>
01100	FOR @' JJ IN (EXPRS,STATS,LEAP,TOTAL,COMSER,GOGOL,STRSER,IOSER,LEPRUN,MESPRO,WRDGET) <
01200	?..'JJ__II
01300	II__II1
01400	>
01500	IFDEF SETLST,<SETLST>
01600	
01700	IFNDEF ..LIST,<
01800	..LIST__0
01900	FOR @' JJ IN (HEAD,SAIL,PARSE,SYM,GEN,ARRAY,EXPRS,STATS,LEAP,TOTAL,COMSER) <
02000	?..LIST__..LIST!..'JJ
02100	>
02200	FOR @' JJ IN (GOGOL,STRSER,IOSER,LEPRUN,MESPRO,WRDGET) <
02300	?..LIST__..LIST!..'JJ
02400	>>
02500	IFDEF SETLS2,<
02600		SETLS2
02700	>
02800	DEFINE LSTON ' (JJ) <
02900		XLIST
03000	IFN ..LIST & ..'JJ,<
03100		LIST>
03200	>
03300		LSTON	(HEAD)
03400	
03500	DEFINE DSCR <COMMENT  > ; FOR DIRECTORY MAKER
03600	
03700	DEFINE GEN <IFE .NOGEN,<LALL>>
03800	DEFINE NOGEN <XALL>
03900	?.NOGEN__1	;DON'T EXPAND MACROS AT ALL AFTER FIRST NOGEN
04000		NOGEN
04100	
04200	DEFINE IFNB (X) <IFDIF <><X>,>
04300	DEFINE IFB (X) <IFIDN <><X>,>
04400	
04500	
04600	DSCR  STORAGE MANAGEMENT MACROS
04700	
04800	
04900	DSCR  HERE
05000	CAL MACRO
05100	PAR ROUTINE NAME
05200	DES For runtime routine vector.  If this is a library or one-segment
05300	 run, this is equivalent to placing a label "HERE".  Otherwise, the
05400	 label is placed on a JRST instruction in a vector of JRST's in the
05500	 upper segment.  The  JRST is to "HERE".  This allows the code for
05600	 runtimes to be changed without forcing everyone to forsake their
05700	 SAIL-compiled core images.
05800	
05900	
06000	NOTENX <
06100	?DSPLEN__=280	;LAST CHANGED 2-8-77, FROM 260
06200	>;NOTENX
06300	TENX <
06400	?DSPLEN__=350	;LAST CHANGED 3-14-79, FROM 330
06500	>;TENX
06600	GLOB <
06700	?DSPLEN__DSPLEN+=50 ; SINCE THIS TAKES MORE
06800	>;GLOB
06900	
07000	;;#SM# 5-30-74 RLS TEST FOR OVERFLOW OF DISPATCH TABLE
07100	DEFINE HERE(X) <
07200	UP <
07300		FQQQQ __ .
07400		USE DSPCH	;SO THAT THE LABELS HAVE THE SAME ADDRESS
07500				;FROM ONE ASSEMBLY TO ANOTHE.
07600	^^ X :	JRST	FQQQQ
07700	IFGE .-DSPBAS-DSPLEN, <
07800	PRINTS / Dispatch vector size exceeded, bump DSPLEN
07900	/
08000	>;
08100		USE
08200	>;UP
08300	NOUP <
08400	^^ X :			;IF NOT MAKING AN UPPER SEGMENT, DOES NOT MATTER.
08500	>;NOUP
08600	>
08700	;;#SM#
08800	
08900	DEFINE HEREFK (X,XFAKE) <
09000	UP<
09100	^^ XFAKE:		; A FAKE LABEL (FELLOW WILL HAVE REAL THING IN SPARES
09200	>;UP
09300	NOUP <
09400	HERE(X)			;ONLY MATTERS IF MAKING A SEGMENT
09500	>;NOUP
09600	>
09700	
09800	DSCR SETCOR (SIZE,FIRST,LAST)
09900	CAL MACRO
10000	PAR SIZE is CORGET size desired
10100	 FIRST (optional) is vbl which will point to first word
10200	 LAST (optional) is vbl which will point to first word after block
10300	RES CORGET called, B put into FIRST, LAST computed
10400	ERR if not enough core, complains
10500	DES used in ALLOC (SAILOR sequence)
10600	SEE ALLOC
10700	
10800	
10900	DEFINE SETCOR (SIZE,FIRST,LAST) <
11000		MOVE	C,SIZE
11100		PUSHJ	P,CORGET
11200		ERR	<CAN'T GET CORE FOR FIRST ALLOCATION>
11300		IFDIF <FIRST><>, <MOVEM	B,FIRST>
11400		IFDIF <LAST><>,<
11500			ADD	C,B
11600			MOVEM	C,LAST
11700	>>
11800	
11900	DSCR DATA, ZERODATA, TABLEDATA,--etc.
12000	CAL MACRO
12100	PAR One argument, a description
12200	RES For ZERODATA, the ZVBLS PC is switched to for the data.  For others,
12300	 the VBLS PC.  A check is made to ensure that the appropriate area is
12400	 big enough for the new data.
12500	DES This allows data to be concentrated in one area (for reentrancy
12600	 consideration, one-instruction CLEAR operations, etc.), but to
12700	 be defined locally.  Some special purpose programs can examine the
12800	 CREF listing file to print summaries, sorted cross-references, etc.
12900	
13000	
13100	DEFINE DATA (MSG) <
13200		USE	VBLS
13300		IFGE	.-DBASE-DSIZE,<
13400		PRINTX	DATA AREA TOO SMALL [you will get a FAIL error on next line]
13500		#DATERR
13600	>>
13700	
13800	DEFINE TABLEDATA (MSG) <
13900		ZERODATA ()
14000	>
14100	
14200	DEFINE TABCONDATA (MSG) <
14300		DATA ( )
14400	>
14500	
14600	DEFINE ZERODATA (MSG) <
14700		USE	ZVBLS
14800		IFGE	.-ZBASE-ZSIZE,<
14900		PRINTX	ZEROED DATA AREA TOO SMALL [you will get a FAIL error on next line]
15000		#DATERR
15100	>>
15200	
15300	DEFINE BITDATA (MSG) <	USE>
15400	
15500	DEFINE BITDDATA (MSG) <	USE>
15600	
15700	DEFINE BIT2DATA (MSG) <	USE>
15800	
15900	DEFINE BITD2DATA (MSG) < USE>
16000	
16100	DEFINE ACDATA (MSG) <	USE>
16200	
16300	DEFINE AC2DATA (MSG) <	USE>
16400	
16500	DEFINE ENDDATA <
16600	IFDEF ZBASE, <
16700		DATA ()		;CHECK
16800		ZERODATA ()		;CHECK
16900		USE
17000	>>
17100	
17200	
17300	
17400	
17500	COMMENT 
17600	
17700	DSCR LEVPOINT
17800	DES CHEAP MACRO TO GENERATE POINTERS TO DISPLAY LEVEL FIELD OF WORDS
17900	
18000	
18100	DEFINE LEVPOINT(AD)< POINT DLFLDL,AD,35-LLFLDL>
18200	
18300	;;%  % CMU STYLE TRAP CALL MACRO -- SHOULD REALLY BE TURNED INTO ROUTINE CALL
18400	DEFINE TRPCAL (P1,P2,P3,P4,ADR) <
18500	BEGIN
18600		SKIPN	ADR
18700		 JRST 	 NOTRP
18800	CMU <  GGGON	;
18900	>;CMU
19000	GLOB <
19100		PUSH	P,USER
19200		MOVE	USER,GOGTAB	;IT MAY HAVE BEEN GLUSER
19300	>;GLOB
19400		PUSH	P,TEMP
19500		PUSH	P,UUO1(USER)
19600		MOVEI	TEMP,.TRACS
19700		BLT	TEMP,.TRACS+11
19800		MOVE	TEMP,-1(P)
19900		PUSH	P,P1
20000		PUSH	P,P2
20100		PUSH	P,P3
20200		PUSH	P,P4
20300		PUSHJ	P,@ADR
20400		MOVSI	TEMP,.TRACS
20500		BLT	TEMP,11
20600		POP	P,UUO1(USER)
20700		POP	P,TEMP
20800	GLOB <
20900		POP	P,USER		;GET IT BACK
21000	>;GLOB
21100	CMU <   GGGOFF			;DELSELECT GLOBAL STUFF
21200	>;CMU
21300	NOTRP:
21400	BEND
21500	>;END TRPCAL DEF
     
00100	; MACHINE-EXTENDING MACROS (SOME USEFUL CONSTANT, STORAGE/STORAGE MANIPULATORS)
00200	
00300	DSCR MOVEWI, MOVEW, MOVE6, MOVEI7, LOAD6, LOADI7
00400	CAL MACRO
00500	DES Provide extended "instructions" for data movement
00600	 MOVEWI(I,J) moves J (immed) to I via TEMP
00700	 MOVEW(I,J)  moves J to I via TEMP
00800	 MOVE6(I,J)  moves SIXBIT /J/ to I via TEMP
00900	 MOVEI7(I,J) moves addr of ASCIZ /J/ to I via TEMP
01000	 LOAD6 (I,J) moves SIXBIT /J/ to AC I
01100	 LOADI7(I,J) moves addr of ASCIS /J/ to AC I
01200	SID TEMP -- sometimes changed
01300	
01400	
01500	DEFINE MOVEWI (I,J) <
01600			MOVEI TEMP,J
01700			MOVEM TEMP,I
01800	>
01900	
02000	DEFINE MOVEW (I,J) <
02100			MOVE	TEMP,J
02200			MOVEM	TEMP,I
02300	>
02400	
02500	DEFINE MOVE6 (I,J) <
02600			MOVE	TEMP,[SIXBIT /J/]
02700			MOVEM	TEMP,I
02800	>
02900	
03000	DEFINE MOVEI7 (I,J) <
03100			MOVEI	TEMP,[ASCIZ /J/]
03200			MOVEM	TEMP,I
03300	>
03400	
03500	DEFINE LOAD6 (I,J) <
03600			MOVE	I,[SIXBIT /J/]
03700	>
03800	
03900	DEFINE LOADI7 (I,J) <
04000			MOVEI	I,[ASCIZ /J/]
04100	>
04200	
04300	DSCR	PWORD,PCHAR,IPWORD,IPCHAR,PLEFT,PRIGHT,IPLEFT,IPRIGHT
04400	CAL MACRO
04500	DES MAKE BYTE POINTERS EASIER TO TYPE
04600	  THE ONES WITH "P" ARE SETUP SO THAT AN LDB FETCHES THE VALUE
04700	  THE ONES WITH "IP" ARE SETUP SO THAT AN ILDB FETCHES THE VALUE
04800	
04900	
05000	DEFINE PWORD (A) <
05100		POINT	36,A,35>
05200	DEFINE PLEFT (A) <
05300		POINT	18,A,17>
05400	DEFINE PRIGHT (A) <
05500		POINT	18,A,35>
05600	DEFINE PCHAR (A) <
05700		POINT	7,A,35>
05800	DEFINE IPWORD (A) <
05900		POINT	36,A>
06000	DEFINE IPLEFT (A) <
06100		POINT	18,A>
06200	DEFINE IPRIGHT (A) <
06300		POINT	18,A,17>
06400	DEFINE IPCHAR(A) <
06500		POINT	7,A>
06600	
06700	DSCR SAVACS, RESTACS (L)
06800	CAL MACRO
06900	PAR a list like <A,C,LPSA>
07000	RES specified AC's pushed on (popped from) P-stack
07100	
07200	DEFINE SAVACS (L) <
07300	 FOR II IN  L ,<
07400		PUSH	P,II
07500	>>
07600	DEFINE RESTACS (L) <
07700	FOR II  IN  L, <
07800		POP	P,II
07900	>>
08000	
08100	DSCR CALL6(I,J)
08200	CAL MACRO
08300	PAR I is AC# if J is present, else see J
08400	 J is symbolic value for a system CALL
08500	RES does CALLI AC,U&INDEX 
08600	 AC defaulted to 0
08700	
08800	
08900	NOTENX <
09000	NOSTANFO <
09100	DEFINE CALL6 ' (I,J) <
09200		IFDIF <><J>,<
09300			IFDIF <><I>,<CALLI I,U'J;>  CALLI U'J
09400	>
09500		IFIDN <><J>,<
09600			CALLI	U'I
09700	>>
09800	>;NOSTANFO
09900	
10000	STANFO <
10100	DEFINE CALL6 ' (I,J) <
10200		IFDIF <><J>,<
10300			IFDIF <><I>,<J I,;> J
10400	>
10500		IFIDN <><J>,<
10600			I
10700	>>
10800	>;STANFO
10900	
11000	NOSTANFO <
11100	DEFINE CX ' (Y,Z) <
11200	?U'Y__Z
11300	>
11400	
11500		CX RESET,0	;0 RESET IO
11600		CX DDTIN,1	;1 EXT-GET DDT CHAR.
11700		CX SETDDT,2	;2 SETDDT LOC IN PROTECTED JOB DATA
11800		CX DDTOUT,3	;3 EXT:SEND DDT CHAR.
11900		CX DEVCHR,4	;4 DEVICE CHARACTISTICS
12000		CX DDTGT,5	;5 GET DDT MODE
12100		CX GETCHR,6	;6 DEVICE CHAR.(DIFF. NAME)
12200		CX DDTRL,7	;7 RELEASE DDT MODE
12300		CX WAIT,10	;10 WAIT TILL DEVICE INACTIVE
12400		CX CORE,11	;11 CORE UUO
12500		CX EXIT,12	;12 EXIT
12600		CX UTPCLR,13	;13 CLEAR DEC TAPE DIRECTORY 
12700		CX DATE,14	;14 GET DATE
12800		CX APRENB,16	;16 ENABLE APR FOR TRAPPING
12900		CX SWITCH,17	;20 RETURN DATA SWITCHES
13000		CX REASSIGN,21	;21 REASSIGN DEVICE TO ANOTHER JOB
13100		CX TIMER,22	;22 RETURN JIFFY CLOCK TIME
13200		CX MSTIME,23	;23 RETURN TIME OF DAY IN MS
13300		CX GETPPN,24	;24 RETURN PROJECT-PROGRAMMER NUMBER
13400		CX TRPSET,25	;25 SET PI TRAP LOC, AND USER IO
13500		CX TRPJEN,26	;26 DISMISS INTERRUPT TO EXEC MODE
13600		CX RUNTIM,27	;27 RETURN TOTAL JOB RUNNING TIME
13700		CX PJOB,30	;30 RETURN JOB NUMBER
13800		CX SLEEP,31	;31 SLEEP FOR N SECONDS, THEN RETURN TO USER
13900		CX SETPOV,32	;32 SET PUSH DOWN OVERFLOW TRAP
14000					;(FOR COMPATIBILITY ONLY)
14100		CX PEEK,33	;33 PEEK INTO SYSTEM CORE.		;JS
14200		CX GETLIN,34	;34 GET NAME OF TTY
14300		CX RUN,35	;35 RUN COMMAND
14400		CX SETUWP,36	;36 SET USER WRITE PROTECT
14500		CX REMAP,37	;37 REDO CORE MAP
14600		CX GETSEG,40	;40 GET SEGMENT
14700		CX GETTAB,41	;41 GETTAB ILLEGAL AT STANFORD.
14800	>;NOSTANFO
14900	>;NOTENX
15000	
15100	
     
00100	;  TELETYPE COMMUNICATION MACROS
00200	
00300	DEFINE OP1 &(OPR,MS,ACC)  <
00400		IFIDN <ACC><>, <II__0>
00500		IFDIF <ACC><>, <II__ACC>
00600		OPR&. II,[ASCIZ /MS/]
00700	>
00800	
00900	DSCR IOERR (STR)
01000	CAL MACRO
01100	PAR ASCII string to be printed
01200	RES calls IOERR. UUO to print message, either restart
01300	 compiler or EXIT
01400	
01500	
01600	DSCR ERR (STR,CODE,ROUT)
01700	CAL MACRO -- calls ERR. UUO
01800	PAR STR ASCII string to be printed
01900	 CODE determines how UUO functions
02000	 ROUT is address or literal to jump to if ERR continues
02100	RES If SAIL is on DPY, displays input line
02200	 Prints STR
02300	 CODE%2 determines what else to print -- if CODE is:
02400	  0-1:  Print nothing more
02500	  2-3:  Ident name for Semantics in LPSA (SAIL only)
02600	  4-5:  Ident name for Semantics in UUO instr (SAIL only)
02700	  6-7:  Value of AC in AC field of instr preceding UUO
02800	 10-11: The UUO in octal
02900	 12-13: Value of AC field of instr preceding that indicated
03000	        by UUO1(GOGTAB)
03100	
03200	 If CODE is even, don't allow continuation -- otherwise
03300	  allow continuation in manner described by error message.
03400	 If ROUT is present, jump to it -- else continue in line
03500	
03600	FOR OP  IN  (ERR,IOERR) <
03700	DEFINE OP (MSG,AC,ADDR) <
03800		IFIDN	<ADDR><>,<OP1 (OP,<MSG>,AC)>
03900		IFDIF <ADDR><>,<JRST	[OP1 (OP,<MSG>,AC)
04000				   JRST	ADDR ]>
04100	>>
04200	
04300	DSCR CORERR
04400	CAL MACR
04500	PAR	message
04600	RES	Types the message, then exits the program 
04700	SID none
04800	
04900	DEFINE CORERR(MSG) < JRST [	PUUO	3,[ASCIZ /MSG
05000	/]
05100	NOTENX <
05200					HALT	.	;DOT IN LITERALS REFERS TO THE
05300							;LOC COUNTER OUTSIDE THE LITERAL
05400	>;NOTENX
05500	TENX <
05600					JSYS	HALTF
05700	>;TENX
05800								]>
05900	
06000	DSCR PRINT, TERPRI (STR)
06100	CAL MACRO -- calls prin.. uuo.  
06200	PAR Ascii message
06300	RES Types string -- types CRLF after if TERPRI -- ERRPRI sends to log file if
06400	user is enabled for that.
06500	SID none
06600	
06700	DEFINE ERRPRI (X) <
06800		PUSH	P,A
06900		MOVEI	A,[ASCIZ /X
07000	/]
07100		PUSHJ	P,PRINT.
07200		POP	P,A
07300	>
07400	
07500	DEFINE PRINT (X) <
07600		PUUO 3,[ASCIZ /X/]
07700	>
07800	
07900	DEFINE TERPRI (X) <
08000		PUUO	3,[ASCIZ /X
08100	/]>
08200	
08300	DEFINE SPRINT(X) <	;SAFE PRINT, BEFORE UUO SET UP
08400		TTCALL 	3,[ASCIZ /X/]
08500	>
08600	
     
00100	;  INPUT/OUTPUT AIDS
00200	
00300	DSCR MAKCDB (CHN, NAM, MODE, I, O)
00400	CAL MACRO
00500	PAR CHN channel number
00600	 NAM Prefix for symbols defined
00700	 MODE data mode
00800	 I,O # input, # output buffers
00900	RES generates a table to specify all (most?) data about
01000	 a file (Source, Rel, Command, etc.), instructions
01100	 tailored for this channel -- it takes the form: 
01200	
01300	
01400	DEFINE MAKCDB &  (CHN,NAM,MODD,I,O)  <
01500	NAM&CDB:
01600	NAM&MOD: MODD			;DATA MODE
01700	NAM&DEV: 0			;DEVICE NAME IN SIXBIT
01800	NAM&HED:
01900		IFN O,<XWD NAM&HDR,0;> NAM&HDR  ;BLOCK HEADER POINTER
02000	NAM&HDR: 0			;I/O HEADER BLOCK
02100	NAM&PNT: 0			;I/O BYTE POINTER
02200	NAM&CNT: 0			;I/O CHAR COUNT
02300	^NAM&FIL: 0			;I/O FILE NAME
02400	^NAM&EXT: 0			;I/O EXTENSION
02500	;;#%%# BY JFR 11-7-74 KEEP PPN HERE, TOO
02600	^NAM&PPN: 0			;I/O PPN
02700	NAM&OP:	OPEN	CHN,NAM&CDB	;OPEN INSTRUCTION
02800	NAM&NT:
02900		IFN I,<LOOKUP CHN,NAME;> ENTER CHN,NAME
03000	NAM&SPC:
03100		IFN O,<OUTBUF CHN,O>
03200	IFE O,<
03300	NOSTANFO <
03400		 IFIDN <NAM> <SRC>, <
03500			PUSHJ P,[MOVEI TEMP,.+1 ; PTR TO DESCRIPTOR, CALL UINBF ROUTINE
03600				 JRST	UINBF] ;>INBUF CHN,I
03700	>;NOSTANFO
03800	STANFO <
03900			    UINBF CHN,.+1
04000	>;STANFO
04100	>;IFE O
04200	NAM&BFS: IFN O,<O;>	I		;# OF BUFFERS
04300		202	;MAKE BIGGER BUFFERS THAN NORMAL (INPUT ONLY)
04400	;;=I10=	ADD PLACE FOR SFD'S
04500	SFDS<
04600	NAM&PTH:	BLOCK 4+SFDLVL	;PLACE FOR PATH TO GO
04700	> ;SFDS
04800	>
04900	
05000	DSCR CHKCHN, TSTERR, TSTEOF
05100	CAL MACRO
05200	PAR First argument is channel # (AC containing same for CHKCHN)
05300	 2d argument is routine name for CHKCHN, address for TSTEOF
05400	RES CHKCHN makes sure channel # in AC is legal
05500	  prints error message using routine name, if not legal
05600	 TSTERR does an error STATZ
05700	 TSTEOF jumps to Address if EOF is present on the channel
05800	
05900	DEFINE CHKCHN (AA,ROUTIN) & <
06000			TRZE	AA,777760	;ZERO BITS AND TEST VALID
06100			ERR <ROUTIN&: INVALID CHANNEL NUMBER>
06200	>
06300	
06400	DEFINE TSTERR (CHAN) <
06500			STATZ CHAN,740000 ;ANY ERRORS?
06600	>
06700	
06800	DEFINE TSTEOF (CHAN,EOFADD) <
06900			STATZ CHAN,20000  ;END OF FILE?
07000			JRST EOFADD	  ; YES
07100	>
07200	
     
00100	; RANDOM OTHER MACROS
00200	
00300	DEFINE SETNIT <
00400		MOVE	TEMP,[PUSHJ P,%UUOLNK]	;MAKE SURE WE CAN DO UUOS
00500		MOVEM	TEMP,41
00600		MOVE	P,ALLPDP	;AND PUSHJ'S
00700	>
00800	
00900	DSCR SETPOV(AC,STR)
01000	CAL MACRO
01100	PAR AC REPRESENTING PUSH-DOWN POINTER
01200	STR REPRESENTING SOME SUGGESTIONS FOR ACTION WHEN THIS PTR OVERFLOWS
01300	RES POVTAB has one entry for each AC.  the string pointer (0 if none)
01400	 is put into this entry.  If a PDP in this AC overflows,  POVTRP, which
01500	 is enabled in SALNIT for PDL-OV, prints the string as a standard fatal
01600	 error message.  POVTRP is in  COMSER.
01700	SEE POVTRP
01800	
01900	
02000	DEFINE SETPOV (AC,STR) <
02100	 IFIDN <STR><><MOVEI TEMP,0;>MOVEI TEMP,[ASCIZ ?STR?] ;GET VALUE
02200	 II__(AC+17)&17			;BETWEEN 0 AND 17
02300	 JJ__II-(2*(II/2))		;ODD OR EVEN
02400	 IFE JJ,<HRLM TEMP,POVTAB+(II/2); EVEN-- LEFT> HRRM TEMP,POVTAB+(II/2)
02500	>;SETPOV
02600	
02700	DSCR OPTSYM(SYM)
02800	CAL MACRO
02900	PAR SYM IS SYMBOL TO BE DEFINED
03000	RES IF  WHERSW  IS ON, THEN  SYM  is defined as a loader symbol
03100	with value of PCNT.
03200	Principally to help external code optimizer.
03300	
03400	
03500	DEFINE OPTSYM(SYM)<
03600		MOVE	TEMP,[RADIX50 50,SYM]
03700		PUSHJ	P,OPTSY.
03800	>
03900	
     
00100	;TBITS DEFINITIONS
00200	
00300	DEFINE BIT(NAME,BITT) <IFDIF <NAME><SPARE>,<?NAME__BITT>>
00400	DEFINE DEFTBS <
00500		BIT	(RES,400000)	;RESERVED WORD
00600		BIT	(CNST,200000)	;CONSTANT ENTRY
00700		BIT	(WASIDX,100000)	;[1] INDXED WAS SET SOMETIME
00800		BIT	(INTRNL,40000)	;INTERNAL SYMBOL (SYMBOL EXPORTED)
00900		BIT	(EXTRNL,20000)	;EXTERNAL SYMBOL (STORAGE FOUND ELSEWHERE)
01000		BIT	(MPBIND,10000)	;MATCHING PROCEDURE OR BINDING ITEMVAR
01100		BIT	(VALUE,4000)	;FORMAL PARAMETER CALL BY VALUE
01200		BIT	(REFRNC,2000)	;FORMAL PARAMETER CALL BY REFERENCE
01300		BIT	(CONOK,1000)	;OK TO CALL INTRINSIC WITH CONST ARGS AT COMPTIME
01400		BIT	(SIMPLE,400)	;FOR DISPLAY SYSTEMS ONLY
01500		BIT	(MESSAGE,200)	;A MESSAGE PROCEDURE !!!!!(STANFORD ONLY).
01600		BIT	(OWN,100)	;OWN VARIABLE ?
01700		BIT	(ANYTYP,40)	;ANYTYPED VARIABLE (USED IN PROCEDURE CALLS)
01800		BIT	(SAFE,20)	;SAFE -- FOR ARRAYS AND SUCH.
01900		BIT	(DEFINE,10)	;DEFINED MACRO IDENTIFIER
02000		BIT	(RECURS,4)	;THIS ROUTINE IS REENTRANT
02100		BIT	(BILTIN,2)	;IF ON IN TBITS, DON'T SAVE AC'S ON CALL.
02200		BIT	(SBSCRP,1)	;SUBSCRIPED VARIABLE (ARRAY)
02300	
02400	;RIGHT HALF BITS -- TBITS WORD.
02500	
02600		BIT	(INPROG,400000)	;PROCEDURE BEING DEFINED, KEEP FIXUP CHAIN
02700		BIT	(GLOBL,200000)	;GLOBAL LEAP VARIABLE
02800		BIT	(FORTRAN,100000);FORTRAN PROCEDURE (EXTERNAL)
02900		BIT	(FORWRD,40000)	;FORWARD PROCEDURE OR LABEL
03000		BIT	(PROCED,20000)	;PROCEDURE
03100		BIT	(SHORT,10000)	;SHORT INTEGER OR SHORT REAL
03200		BIT	(ITMVAR,4000)	;LEAP ITEMVAR
03300		BIT	(PNTVAR,2000)	;RECORD POINTER VARIABLE
03400		BIT	(BOOLEAN,1000)	;BOOLEAN VARIABLE ?? (SAME AS INTEGER FOR NOW
03500					; SEE TYPSET IN FILE "GEN"
03600		BIT	(ITEM,400)	;LEAP ITEM
03700		BIT	(STRING,200)	;A FHQ STRING
03800		BIT	(LPARRAY,100)	;TYPE OF THIS ITEM IS ARRAY
03900		BIT	(SET,40)	;LEAP SET
04000		BIT	(LABEL,20)	;LABEL
04100		BIT	(LSTBIT,10)	; COMPLEX NUMBER ?? (NOT IMPLEMENTED)
04200		BIT	(DBLPRC,4)	; DOUBLE PRECISION NUMBER ?? (NOT IMPLEMENTED)
04300		BIT	(FLOTNG,2)	;REAL NUMBER
04400		BIT	(INTEGR,1)	;INTEGER NUMBER
04500	
04600	;LEFT HALF OF %ERFLGS WORD -- STATE OF ERROR HANDLER
04700	
04800		BIT	(KEEP,1)	;DO NOT FLUSH TYPE AHEAD
04900		BIT	(QUIET,2)	;DO NOT PRINT MESSAGES
05000		BIT	(NUMBS,4)	;DO PRINT THE "CALLED FROM .." STUFF
05100		BIT	(LOGGIN,10)	;SEND MESSAGES TO LOG FILE
05200		BIT	(CONT,20)	;CONTINUABLE ERROR
05300		BIT	(AUTO,40)	;AUTOMATIC CONTINUATION MODE
05400		BIT	(LOGOPN,100)	;LOG FILE IS CURRENTLY OPEN
05500		BIT	(ERRNOW,200)	;WE ARE CURRENTLY IN THE MIDDLE OF AN ERR. UUO
05600		BIT	(MINUS,400)	;WE JUST SAW A MINUS!
05700		BIT	(MADEPT,1000)	;WE HAVE ALREADY MADE A BYTE POINTER FOR FAKETTY
05800		BIT	(BUFOPN,2000)	;HE HAVE A BUFFER FOR DUMP MODE LOGGING
05900	
06000	>
06100	
06200	DEFTBS		;DEFINE THE TBITS
06300	
06400	?FNYNAM __ RECURS 		;EXTERNAL+OWN+FNYNAM MEANS EXT REQ IS FOR
06500					; FOO$ INSTEAD OF FOO (CF SIN)
06600	
     
00100	; VARIOUS DEFINITIONS OF USER UUO'S.
00200	FLOAT_2B8	OPDEF	FLOAT	[2B8]
00300	STANFO <
00400	PDPFIX_<KAFIX>	OPDEF	PDPFIX	[KAFIX]
00500	>;STANFO
00600	FIX_3B8		OPDEF	FIX	[3B8]
00700	
00800	DMOVE_120B8	OPDEF	DMOVE	[120B8]
00900	DMOVEM_124B8	OPDEF	DMOVEM	[124B8]
01000	DMOVN_121B8	OPDEF	DMOVN	[121B8]
01100	DMOVNM_125B8	OPDEF	DMOVNM	[125B8]
01200	
01300	FIXR_126B8	OPDEF	FIXR	[126B8]
01400	FLTR_127B8	OPDEF	FLTR	[127B8]
01500	KIFIX_122B8	OPDEF	KIFIX	[122B8]
01600	ADJSP_105B8	OPDEF	ADJSP	[105B8]
01700	
01800	DFAD_110B8	OPDEF	DFAD	[110B8]
01900	DFSB_111B8	OPDEF	DFSB	[111B8]
02000	DFMP_112B8	OPDEF	DFMP	[112B8]
02100	DFDV_113B8	OPDEF	DFDV	[113B8]
02200	
02300	DADD_114B8	OPDEF	DADD	[114B8]
02400	DSUB_115B8	OPDEF	DSUB	[115B8]
02500	DMUL_116B8	OPDEF	DMUL	[116B8]
02600	DDIV_117B8	OPDEF	DDIV	[117B8]
02700	
02800	IOERR._4B8	OPDEF	IOERR.	[4B8]
02900	ERR._5B8	OPDEF	ERR.	[5B8]
03000	SIXPNT_6B8	OPDEF	SIXPNT	[6B8]
03100	ARERR_7B8	OPDEF	ARERR	[7B8]
03200	;;%BI% --! RECORDS
03300	RECUUO _ 10B8	OPDEF	RECUUO	[10B8]
03400	DECPNT_11B8	OPDEF	DECPNT	[11B8]
03500	OCTPNT_12B8	OPDEF	OCTPNT	[12B8]
03600	;;%CJ% JFR 7-20-75
03700	ERRSPL_13B8	OPDEF	ERRSPL	[13B8]
03800	SNGL_14B8	OPDEF	SNGL	[14B8]
03900	TENX <
04000	PUUO_15B8	OPDEF	PUUO	[15B8]
04100			OPDEF	TTCALL	[PUUO]
04200	>;TENX
04300	NOTENX <
04400	PUUO_<TTYUUO>	OPDEF	PUUO	[TTYUUO]
04500			OPDEF	TTCALL	[TTYUUO]
04600	>;NOTENX
04700	
04800	JFOV_<JFCL 1,0>	OPDEF	JFOV	[JFCL 1,0]
04900	
05000	;;3! JFR 9-17-75 CHEAP WAY TO GET SOME MICRO-EFFICIENCY
05100			OPDEF	TRZ	[ANDCMI]
05200			OPDEF	TRC	[XORI]
05300			OPDEF	TRO	[IORI]
05400	
05500	STANFO <
05600	DPYOUT_703B8	OPDEF	DPYOUT	[703B8]
05700	DPYCLR_701B8	OPDEF	DPYCLR	[701B8]
05800	UINBF_704B8	OPDEF 	UINBF	[704B8]
05900	
06000	?SEGSIZUUO 	_ 400022	;GET SIZE OF SECOND SEGMENT.
06100	?CORE2UUO	_ 400015	;GET SOME MORE SECOND SEGMENT.
06200	?GLBAR		__ 1000		;CURRENT LENGTH OF GLOBAL MODEL AREA.
06300	>;STANFO
06400	
06500	
06600	
06700	SUBTTL	SAIL/GOGOL USER TABLE DESCRIPTION
     
00100	DSCR USER DATA AREA TEMPLATE  
00200	DES These values serve as indices for the run-time routines
00300	  into the user's data table. The table is necessary to allow
00400	  the routines to be re-entrant.  The table is allocated
00500	  in the SAILOR sequence at startup time; many of its values
00600	  (data area bounds, etc.) are placed in it at that time.
00700	 One can force re-initialization of this and all other dynamic
00800	  areas by setting GOGTAB to 0 before next CORGET.
00900	SEE XX descriptions for all these goodies directly below
01000	
01100	
01200	DEFINE XX (SYMBOL,SIZE,BACKUP) <
01300		?SYMBOL__LOCAT
01400	IFN HEDSYM,<
01500		ENTRY	SYMBOL			;FOR HEAD.REL SYMBOL FILE
01600	>;N HEDSYM
01700		LOCAT__LOCAT+1
01800		IFDIF<SIZE><>< LOCAT__LOCAT+SIZE-1>
01900		IFDIF<BACKUP><>< LOCAT__LOCAT-BACKUP>
02000	>
02100	
02200	LOCAT__0		;MAKES SYMBOLS ABSOLUTE
02300	
02400	; THESE VARIABLES WILL NOT BE RE-INITIALIZED BY THE INIT ROUTINE
02500	
02600	
02700	; LINK TO STRING BLOCKS FOR STRING GARBAGE COLLECTOR
02800	
02900	 XX CLER,,1
03000	
03100	 XX UUO1	;TRADITIONAL LOC FOR GOGOL RETRN ADRS FOR ERROR MSGS.
03200	
03300	;LOADER LINK CHAINS
03400	 XX STRLNK
03500	 XX SPLNK	;LINK END FOR SPACE ALLOCATION.
03600	 XX SETLNK	;LINK END FOR SETS.
03700	 XX SGROUT	;LINK UP STRING DSCRPTR GENERATOR ROUTINES HERE
03800	 XX KNTLNK	;PROFILE COUNTER LINK END
03900	
04000	;IMPORTANT STRING SPACE ENTRIES
04100	 XX ST		;BOTTOM OF STRING SPACE
04200	 XX STTOP	;TOP OF SAME
04300	;;%  % DCS 12-3-73 New entries
04400	 XX STLIST	;HEAD OF LIST OF STRING SPACES
04500	 XX TOPBYTE	;NEXT FREE BYTE
04600	 XX REMCHR	;-REMAINING FREE CHARS
04700	;;#GI# DCS 2-5-72 REMOVE TOPSTR
04800	 XX SGLIGN	;ON IF MUST BE ALIGNED TO FW BDRY (COMPILER ONLY).
04900	
05000	; I/O CHANNEL POINTER TABLE
05100	; EACH POINTS TO A "CHANNEL DATA BLOCK" FULL OF GOODIES
05200	 XX CHANS,20
05300	
05400	; I/O BREAK TABLES (FOR INPUT SCANNING ROUTINES)
05500	;;%BS%
05600	 XX BKTPRV		;0UNPRIVILEGED, 0PRIVILEGED
05700	 XX BKTPTR,4,,		;POINTERS TO CORGET BLOCKS OF 18 BREAKTABLES EACH
05800		DSPTBL__0		;BREAK CHAR DISPOSITION TABLE
05900		LINTBL__=19+DSPTBL	;LINE NUMBE    "	"
06000		BRKTBL__=19+LINTBL	;BREAK CHAR TABLE
06100		BKJFFO__=128+BRKTBL	;RESERVATION WORD
06200		BRKCVT__1+BKJFFO	;UPPER CASE CONVERSION
06300		BRKOMT__1+BRKCVT	;OMIT SPEED UP
06400		BRKDUM__1+BRKOMT	;%DQ% used to hold "Z" bit flag
06500	;;%BS% ^ MOVED INTO CORGET BLOCK FOR BREAK TABLES
06600	
06700	;;%##% RHT THESE FOR ADDED RUNTIMES
06800	XX  TTYCVT		; DITTO FOR TTY INPUT
06900	XX  FSTATS		; FOR GETSTS
07000	
07100	 XX PDL		;IOWD SIZE,BASE  FOR SYSTEM PDL
07200	 XX SPDL	;XWD SIZE,BASE FOR STRING PDL
07300	
07400	STANFO <
07500	XX  ZAPBEG,,1	;BEGINNING OF SECOND SEGMENT COPY OF STUFF.
07600			;FOR GLOBAL MODEL ONLY.
07700	>;STANFO
07800	CMU <
07900	XX  ZAPBEG,,1	;JUST LIKE SU-AI
08000	>; CMU
08100	
08200	;LEAP   THINGS.
08300	
08400	STANFO <
08500	 XX CURMES		;CURRENT MESSAGE.
08600	>;STANFO
08700	 XX MAXITM		;CURRENT TOP ITEM NUMBER.
08800	 XX OLDITM		;LINKED LIST OF OLD ITEMS (DUMP HEAP).
08900	 XX INFOTAB		;POINTER TO "GOOD POINTER" BLOCK OF CORE.
09000	 XX DATAB		;POINTER TO DATUM AREA.
09100	 XX HASTAB		;POINTER TO THE LEAP HASH TABLE.
09200	 XX FP1			;FREE STORAGE -- 1 WORD.
09300	 XX FP2			;FREE STORAGE -- 2 WORDS.
09400	 XX HASMSK		;THE MASK FOR HASHING INTO OUR HASH SPACE.
09500	;; \UR#3\ START OF NEW USER TABLE ENTRIES FOR BIG LEAP
09600	URHASH <
09700	XX RMASK1		;NEW MASK FOR MODIFIED LEAP ROUTINES
09800				;(RICK RASHID 3/15/76) WHICH IMPROVE
09900				;A XOR Y EQV Z AND X XOR B EQV Z SEARCHES
10000	XX RMASK2
10100	XX RMASK3
10200	XX RMASK4		;END OF NEW MASKS (3/15/76 --
10300				;BEWARE THE IDES OF MARCH!)
10400	>;URHASH
10500	URLEAP <
10600	XX BRACKL		;POINTER TO LIST OF BRACKETED TRIPLE BLOCKS
10700	>;URLEAP
10800	;; \UR#3\ END OF NEW USER TABLE ENTRIES FOR BIG LEAP
10900	 XX HASHP		;FOR PNAMES. XWD NEXT FREE ARRAY ENTRY,ARRAY BASE.
11000	 XX MKBP		;MAKE BREAK-POINT
11100	 XX ERBP		;ERASE BREAK-POINT
11200	 XX PUBP		;PUT BREAK-POINT (NOT IMPLEMENTED)
11300	 XX REBP		;REMOVE BREAK-POINT.(NOT IMPLEMENTED)
11400	 XX ITMTOP		;MAXIMUM PERMISSIBLE ITEM NUMBER.
11500	 XX LEABOT		; PTR TO SEARCH CONTROL BLOCK FOR DERIVED SETS ERASE. 
11600	 XX FRLOC		; PTR TO CURRENT ACTIVE FOREACH CONTROL BLOCK POINTER
11700	 XX SCBCHN		; PTR TO CHAIN OF ABANDONED SCB'S
11800	 XX FREITM	;NUMBER OF FREE ITEMS REMAINING
11900	
12000	; MISC. ARRAY THINGS.
12100	 XX ARYDIR	;FOR TELLING FOUR ARRAY ROUTINES WHICH END IS UP.
12200	 XX ARYLS	;A LINKED LIST (LUCKILY) OF STRING ARRAYS IN LEAP, AND SO FORTH.
12300			;THIS IS SO STRING GARB COLLECTOR CAN FIND THEM ALL.
12400	
12500	; BLOCK CONTROL TABLE INFORMATION
12600	;THIS IS FOR SAIL'S CORE MANAGEMENT ROUTINES (CORGET,CORREL,CORINC...)
12700	
12800	XX BLKTAB,3,3	;BASE OF BLOCK CONTROL TABLE
12900	   XX LOWC	;LOW LIMIT OF ALLOCATABLE "BLOCK" CORE
13000	   XX TOP	;UPPER LIMIT OF SAME
13100	   XX FRELST	;POINTER TO BLOCK FREE STORAGE LIST
13200	
13300	 XX XPAND	;PERMISSION TO EXPAND IN CORREL IF 0
13400	 XX ATTOP	;REQUEST TO ALLOCATE OFF TOP OF CORE IF NON-0
13500	 XX NOSHRK	;IF ON, CORREL NOT GIVEN PERMISSION TO SHRINK CORE
13600	STANFO <
13700	 XX USCOR2	;IF ON, CORGET WILL USE CORE2 ROUTINES.
13800	>;STANFO
13900	
14000	 XX BUFACS,10,,	;FOR BUFFER ALLOCATOR
14100	STANFO <
14200	XX ZAPEND,,1	;END OF SECOND SEGMENT AREA.
14300	>;STANFO
14400	CMU <
14500	XX USCOR2		;THE COPYCATS
14600	XX ZAPEND,,1		;ditto ZAPBEG
14700	>;CMU
14800	
14900	; INTERNAL VARIABLES FOR RE-ENTRANT ROUTINES
15000	
15100	;;%  % DCS 12-3-73 New entries, delete some old ones (strngc) 
15200	 XX STBUCK,1,1	;USED IN STRING GC TO KEEP TRACK OF BLOCKS
15300	   XX OFFSET		;Distance to move a string space, see STRNGC
15400	 XX STINCR		;String space increment size, see STRNGC
15500	 XX STREQD		;String space threshold size, see STRNGC
15600	
15700	 XX SGCCNT		;NUMBER OF TIMES STRNGC HAS BEEN CALLED
15800	 XX SGCTIME		;Time of last GC if non-zero, else not enabled
15900	 XX SGCTOTAL		;Total GC time while enabled (set SGCTIME -1 to enable)
16000	 XX SGCNUM		;Number of strings collected last GC
16100	 XX SGCWASTE		;Number of wasted words after last GC
16200	
16300	 XX SRELOC
16400	 XX CODAC		;SAVE AC 1 OVER CALLS ON "CODE" RUNTIME ROUTINE
16500	 XX WDTH		;GLOBAL WIDTH FOR STRING CONVERSION ROUTNES
16600	 XX DIGS		; "" FOR # OF DECIMAL DIGITS
16700	
16800	; I/O INTERNAL VARIABLES
16900	
17000	 XX CDBLOC	;IF CHNL IS A CH #, @CDBLOC(USER) GETS ITS CDB ADDR
17100	
17200	 XX FNAME	;ENTER-LOOKUP TABLE
17300	 XX EXT
17400	 XX WD3
17500	 XX PRPN
17600	 XX LONGWD	;LONG FORM LOOKUPS AND ENTERS POKE THIS
17700	 XX LONG2	; AND THIS -- FILEINFO ROUTINE GIVES TO USER
17800	
17900	 XX PROJ		;USED BY FILNAM ROUTINE
18000	
18100	TYMSHR<
18200	XX FUSER
18300	XX FUSER1	;TYMSHARE USER NAMES
18400	>
18500	; AC SAVE AREAS
18600	
18700	 XX RACS,13,,	;RE-ENTRANT ROUTINES SAVE HERE
18800	 XX SGACS,14,,	;AVAILABLE ANY TIME IF YOU ARE NOT
18900	 		; LIKELY TO CALL STRNGC
19000	 XX STACS,14,,	;YET ANOTHER AC SAVE AREA
19100	 XX PGNNFL
19200	
19300	;SOME STUFF FOR MULTIPLE PROCESSES
19400	
19500	?NPRIS__20	;NUMBER OF PRIORITIES
19600	 XX PRILIS,NPRIS,, 	;PRIORITY LIST HEADERS
19700	 XX GGDAD		;THE BASE FOR THE MAIN PROCESS (IF HAVE ONE)
19800	 XX TIMER		;COUNTED DOWN FOR CLOCK INTERRUPTS
19900	 XX SCHDRQ		;SET 0 FOR A SCHEDULER REQUEST
20000				;(USED BY EVENTS)
20100	 XX STKURT		;PLACE FOR STACKUNWINDER RETN ADRS
20200	 XX INTQWP		;INTERRUPT NOTICE BUFFER WRITE PTR
20300	 XX INTQRP		;READ PTR
20400	 XX INTQWT		;TOP OF BUFFER 
20500	 XX INTQWB		;BOTTOM OF BUFFER
20600	 XX INTPRC		;INTERRUPT PROCESS BASE
20700	 XX DISPAT		;DISPATCH TABLE FOR INTERRUPT LEVEL MODULE
20800	 XX DFRINF		; AOBJN PTR TABLE FOR DEFERRED INTERRUPTS
20900	NOTENX<
21000	 XX IPDP		;INTERRUPT PDP
21100	>;NOTENX
21200	TENX<
21300	 XX IPDP1
21400	 XX IPDP2
21500	 XX IPDP3
21600	 XX ISPDP1
21700	 XX ISPDP2
21800	 XX ISPDP3
21900	 XX TIMFRK		;TABLE OF FORK HANDLES FOR INTERRUPT SYSTEM, PROCESSES
22000	>;TENX
22100	 XX IJBCNI		;JOBCNI FROM A DEFERRED INTERRUPT
22200	 XX IJBTPC		;JOBTPC FROM DEFERRED INTERRUPT
22300	 XX IRUNNR		;RUNNER AT TIME OF DEFERRED INTERRUPT
22400	NOTENX<
22500	 XX ISPDP		;STRING PDP FOR INTERRUPT LEVEL
22600	>;NOTENX
22700	;;%##%  ADDING THESE
22800	 XX $FSLIS		;LIST OF FREE STORAGE ALLOCATORS
22900	 XX PRNINF		;$PRINT DEFAULTS
23000	;;%##% BY JFR 11-17-74 COMMUNICATION BETWEEN BAIL AND ERROR HANDLER
23100	 XX BAILOC		;IF NONZERO, ADDRESS OF BAIL INTERCEPT ROUTINE
23200	 XX JFRCEL		; USED TO BE XX <NOTHING>
23300	;;%CC% FOR STRNGC OF RECORD STRINGS
23400	 XX RSGCLK		;THE TWO WORD BLOCK REQUIRED BY SGINS
23500	 XX RSGCL2		; AND A SECOND WORD
23600	 XX STBLST		;HEAD OF CHAIN OF STRING DESCR ARRAYS FOR RECORDS
23700	;;%CC% ^
23800	;;%DA%			
23900	 XX RGCOFF		;SET THIS TO TURN OFF AUTO GC
24000	 XX TGRADJ		;PUT PUSHJ ADR HERE TO ADJUST OWN TRIGGER LEVELS
24100	 XX RGCRHO		;-1.0+1/"%FILL" LEVEL DESIRED FOR RECORD SPACES
24200	;;%BR% -- RHT USED TO BE 2 %DA MADE IT 1 (FROM 4)
24300	 XX SPARUT,1,,		;SPARE USER TABLE ENTRIES
24400	;;%DA% ^^
24500	 XX PRTINF		;PRINT OUTPUT INFORMATION  XWD BITS,CHAN
24600	 XX $$PROU		;PRINT OUTPUT TRAP FOR ALL STRINGS
24700	 XX $$FINT		;USER FORMATTING FUNCTION FOR INTEGERS
24800	 XX $$FREL		; "         "       "      "  REALS
24900	 XX $$FITM		; "         "       "      "  ITEMS
25000	 XX $$FSET		; "         "	    "	   "  SETS
25100	 XX $$FLST		; "	    "	    "	   "  LISTS
25200	 XX $$FSTR		; "	    "       "      "  STRINGS
25300	 XX $$FREC		; "         "       "      "  RECORDS
25400	;;%DU%
25500	 XX $$FLRL		;LONG REAL
25600	
25700	;;=I09=	ADD PATH BLOCK FOR USE BY I/O ROUTINES WITH SFD'S
25800	SFDS<
25900	 XX PATHBL,4+SFDLVL,,		;PATH BLOCK
26000	> ;SFDS
26100	
26200	;;%DY% ! GJA/JFR 1-13-77
26300	 XX EXPCHR	;"@" OR "E" FOR REAL NUMBER EXPONENT CHARACTER
26400	;;%DZ% 2! GJA/JFR 1-13-77
26500	 XX SEGBOT	;ADDR WHICH SAIL FREE STORAGE MUST NOT EXCEED
26600			; (DEFAULT TO 400000 = LOWEST ADDR OF USER PURE CODE)
26700	 XX ENDREN	; END OF USER DATA TABLE
26800	
26900	
27000	
27100	
27200	
     
00100	SUBTTL	Global AC Definitions, Indices, Bits
00200	
00300	AC2DATA (GLOBAL AC ASSIGNMENTS)
00400	?P	_17
00500	?SP	_16
00600	?USER	_15
00700	?TEMP	_14
00800	?LPSA	_13
00900	?RF	__12			;THE ALMIGHTY F REGISTER
01000	?TAC1	__TEMP
01100	?TAC2	__LPSA
01200	
01300	BITDATA (BITS FOR %ALLOC SPACE REQUEST BLOCK ENTRIES)
01400	?STDSPC __400000	;"INDIRECT" SPECIFICATION OF STANDARD AREA
01500	?WNTADR __200000	;ADDRESS OF AREA TO BE STORED AS SPECIFIED
01600	?WNTEND __100000	;ADDRESS OF NEXT AREA TO BE STORED AS SPECIFIED
01700	?WNTPDP __ 40000	;PDP TO AREA TO BE STORED " "
01800	?WNTPDL __ WNTPDP	;WNTPDP, WNTPDL -- WHAT'S THE DIFFERENCE?
01900	?USRTB  __ 20000	;RESULT ADDRESSES ARE IN THE USER TABLE
02000	?MINSZ  __ 10000	;THIS SIZE TO BE USED ONLY IF NO OTHERS GIVEN
02100	
02200	BITDATA (INDICES OF STANDARDLY ALLOCATED AREAS (SEE %ALLOC))
02300	?SYSPD	__ 1		;SYSTEM!PDL
02400	?SYSSPD	__ 2		;STRING!PDL
02500	?STRSP	__ 3		;STRING!SPACE
02600	
02700	BITDATA (INDICES INTO THE FIXED PORTION OF EACH %ALLOC SPACE REQ. BLOCK)
02800	?$ITNO	__1		;MAX ITEM NUMBER DECLARED THIS COMPILATION
02900	?$NWITM __2		;XWD REQUIRED BUCKETS,REQUIRE  NEW!ITEMS 
03000	?$GITNO	__3		;MAX (MIN?) GLOBAL ITEM NUMBER DECLARED
03100	?$MSLNK	__4		;POINTER TO MESSAGE PROCEDURE LIST PUT HERE
03200	?$PNMNO	__5		;REQUIRE n PNAMES PUTS n HERE
03300	?$VRNO	__6		;VERSION NUMBER
03400	?$SGNM	__7		;REQUIRED GLOBAL SEGMENT NAME (USUALLY EMPTY)
03500	?$SGD	__10		;REQUIRED GLOBAL SEGMENT FILE DEVICE
03600	?$SGF	__11		;" FILE NAME
03700	?$SGPP	__12		;" PPN
03800	?$TINIT __13		; POINTER TO INITIAL ITEM TYPES
03900	?$PINIT __14		; POINTER TO INITIAL PRINTNAMES
04000	?$CMVER __ 15		;com version
04100	?$OBPDA __ 16		; pointer to outer block pda
04200	?$SPREQ __ 20		; leaves a spare
04300			; *** SEE ALSO SPCSIZ (TOTAL) IF CHANGE THIS ***
04400	ENDDATA
04500	
04600	
04700	BITDATA (LINK NAMES)
04800	?%STLNK __ 1
04900	?%SPLNK __ 2
05000	?%SETLK __ 3
05100	?%SGROT __ 4
05200	?%KTLNK __ 5
05300	?%PDLNK __ 6
05400	?%INLNK __ 7
05500	?%RBLNK __ 10
05600	BAIL<
05700	?%BALNK __ 11
05800	>;BAIL
05900	;;%CB% ! NEED A NEW LINK TYPE
06000	?%RCLNK __ 12		;RECORD CLASS LINK
06100	
06200	BITDATA (PROCEDURE DESCRIPTOR INDICES)
06300	
06400		DEFINE PDX(I),
06500			<?I __ PD.XXX
06600			PD.XXX__PD.XXX+1
06700	>
06800	PD.XXX	__ 0
06900		PDX	PD.	;0
07000		PDX	PD.ID1	;1
07100		PDX	PD.ID2	;2
07200		PDX	PD.PDB	;3
07300		PDX	PD.NPW	;4
07400		PDX	PD.DSW	;5
07500		PDX	PD.LLW	;6
07600		PDX	PD.DLW	;7
07700		PDX	PD.PDA	;10
07800		PDX	PD.PPD	;11
07900		PDX	PD.PCW	;12
08000		PDX	PD.BDI	;13
08100	
08200	?PD.XXX__PD.XXX
08300	
08400	BITDATA (TYPE CODES WITHIN RH OF INFOTAB ENTRY)
08500		NOTYPE __ 1	;NO TYPE AT ALL
08600	        BRKITM __ 2	;BRACKETED TRIPLE
08700		STTYPE __ 3	;STRING ITEM
08800		FLTYPE __ 4	;REAL ITEM
08900		INTYPE __ 5	;INTEGER ITEM
09000		LSTYPE __ 7	;LIST ITEM (TYPE SHOULD ALWAYS BE 1 MORE THN SETYPE
09100		SETYPE __ 6	;SET ITEM
09200		PITTYP __ 10	;PROCEDURE ITEM
09300		PRCTYP __ 11	;PROCESS ITEM
09400		EVTTYP __ 12	;EVENT TYPE ITEM
09500		CTXTYP __ 13	;CONTEXT ITEM
09600		RFITYP __ 14	;REFERENCE ITEM
09700		RECTYP __ 15	;RECORD
09800	;;%BR% -- ADD A FEW & LEAVE ROOM TO GROW
09900		LBLTYP __ 16	;LABEL
10000		RCLTYP __ 17	;RECORD CLASS
10100	;;#%%# 2! BY JFR 2-2-75 CLAIM ONE FOR BAIL
10200		ITVTYP __ 20	;ITEMVAR	***** UNUSED 12-9-76 *****
10300	;;%DU%
10400		LFLTYP __ 21	;LONG REAL
10500		LINTYP __ 22	;LONG INTEGER
10600		MXSTYP __ LINTYP; LAST SIMPLE TYPE
10700		ARRTYP __ 24	;ARRAYS ARE THIS PLUS SIMPLE TYPE CODE
10800				; used to be 15
10900	;;%BR% ^
11000		INVTYP __ MXSTYP+ARRTYP+1; NON-VALID TYPE CODE
11100	
11200	BITDATA (RECORD CLASS TYPE BITS)
11300		NODELC __ 1	;DO NOT DELETE RECORDS OF THIS CLASS (VIA GC)
11400		CMPLDC __ 2	;THIS RECORD CLASS IS COMPILED-IN
11500		HASRPS __ 4	;HAS RPTR / RPTR ARRAY
11600		HASSTR __ 10	;HAS STRING / STRING ARRAY SUBFIELDS
11700	;;%DU%
11800		HASDBL __ 20	;HAS DOUBLE (LONG REAL) FIELDS
11900	
12000	BITDATA( PROC DESC STUFF)
12100	?BLKCOD__17				;BLOCK BOUNDARY CODE
12200	?EOPCOD__0				;END OF PROC LVI CODE
12300	?AACOD__1					;ARITH ARRAY
12400	?SACOD__2					;STRING ARRAY
12500	?SETCOD__3				;SET
12600	?LACOD__4					;LIST OR SET ARRAY
12700	?FRCCOD__5				;FOREACH STATEMENT
12800	?KLCOD__6				;KILL LIST
12900	?CTXCOD __ 7				;CONTEXT
13000	?CLNCOD __ 10				;CLEANUP PROC
13100	?RPCOD __ 11				;RECORD PTR
13200	?RPACOD __ 12				;RECORD PTR ARRAY
13300	ENDDATA
13400	
13500	BITDATA (USE OF THE RESERVED ITEMS)
13600	; ANY IS REPRESENTED BY 0
13700		ITMANY __ 0	;ITEM FOR ANY
13800		MAINPI __ 1	;ITEM NUMBER OF THE MAIN PROCESS ITEM
13900		UNBND  __ 2	;UNBOUND (?ITEMVARS ETC)
14000		EVTYPI __ 3	;THE ITEM EVENT!TYPE
14100		NIC    __ UNBND	;ITEM GET BACK FROM EMPTY NOTICE QUEUE
14200	;;# # MAKE NIC & UNBOUND THE SAME ITEM -- RHT
14300	;;     I.E. NULL INTERROGATIONS RETURN UNBOUND NOW
14400	
14500		?MAXLOC __ =10	;MAXIMUM NUMBER OF LOCAL ITEMVARS IN FOREACH
14600		?QBIND __ 200	;A ? ITMVR (NOT A MP PARM)
14700		?FBIND __ 100	;A BIND ITMVR(HERE BECAUSE OF STATS)
14800	
14900	BITDATA (THE NAMED BITS FOR REF ITEMS)
15000	;;%BH% RHT ADD TEMP BIT
15100		?TMPB __ 400000 ; SIGN BIT MEANS A TEMP REF ITEM
15200		?REFB __ 200000	;USUALLY SET
15300		?QUESB __ 100000;FOR ? ITEMVARS
15400		?BINDB __ 40000	;FOR BIND ITEMVAR
15500		?PROCB __ 20000	;NOT NOW REALLY USED
15600		?ITEMB __ 10000	; AN ITEM (ITEMVAR)
15700		?ARY2B __ 4000	;FOR * ARRAY ITEMVAR ARRAY REFERENCES
15800		?MSK6BT __ 3740 ; BITS FOR SIX BIT TYPE
15900		?MSKUNT __ 3700	;BIT MASK FOR UNTYPED 
16000	ENDDATA
16100	
16200	;;%AM% MANY USER PHASES 
16300	 SYSPHS__2			;TWO SYSTEM PHASES
16400	 USRPHS__3			;THREE USER PHASES (FOR NOW)
16500					; (0, 1, 2) -- 1 IS DEFAULT
16600	
16700	IFN HEDSYM, <		;MAKE AN HONEST ASSEMBLY OUT OF IT
16800		TITLE	HEAD
16900		END
17000	>;IFN HEDSYM
17100