perm filename TOTAL.MS[MEW,AIL] blob sn#091946 filedate 1974-03-19 generic text, type T, neo UTF8

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 1,1

******** TOTAL **** PAGE 1
1)	COMMENT ⊗   VALID 00051 PAGES VERSION 17-1(13)
1)	RECORD PAGE   DESCRIPTION
1)	 00001 00001
1)	 00011 00002	HISTORY
1)	 00017 00003	DATA for Total (Low-level Code Production) Routines
1)	 00020 00004	Description of Total Routines
1)	 00030 00005	CONV, PRE, POST -- Type-Conversion routines
1)	 00034 00006	
1)	 00038 00007	  
1)	 00043 00008	
1)	 00044 00009	PUT
1)	 00047 00010	ACCESS,GETSDR,GETDR,DISBLK,ZOTDIS--last four  only for dis
1)	 00055 00011	GET
1)	 00059 00012	
1)	 00062 00013	
1)	 00065 00014	
1)	 00069 00015	STACK -- Issue Instrs. to Stack Anything on Approp. Stack
1)	 00073 00016	MARK, MARKINT, MARKME -- Mark Semblk with Correct Temp Semantics
1)	 00076 00017	INCOR -- Issue Code to Clear this Entity from ACs
1)	 00077 00018	REMOPs, CLEARs -- Remove Temps, ACs, from Use
1)	 00083 00019	DSCR CLEAR,CLEARL,CLEARA
1)	 00085 00020	STROP -- Bit-Driven String Operation Code Generator
1)	 00090 00021	GETTEM, etc. -- Temp Semblk Allocators
1)	 00093 00022	GETAC, GETAN0 -- AC Allocators
1)	 00099 00023	AC Store routines -- BOLSTO, FORSTO, STORIX, GOSTO, STORZ
1)	 00104 00024	 STORA -- main AC-storing subr. -- called by above
1)	 00109 00025	EMITER -- Descriptions of Routine and Control Bits
1)	 00112 00026	 EMITER Routine
1)	 00116 00027	
1)	 00121 00028		SUBI	TEMP,1		FIX IT
1)	 00126 00029	
1)	 00129 00030	Qstack Routines -- BPUSH, etc.
1)	 00133 00031	
1)	 00136 00032	
1)	 00139 00033	PWR2
1)	 00140 00034	GBOUT Description, Loader Block Format Description
1)	 00143 00035	 Control Variables for Loader Block Output
1)	 00146 00036	 Loader Output Blocks-- Entry, Program Name, Initial Stuff
1)	 00149 00037	                        Code, Boolean Code, Fixups, Links
1)	 00153 00038	                        Space Allocation Block
1)	 00156 00039	                        Request Blocks -- RELfile, Libraries
1)	 00158 00040	                        Ending Code, Symbols -- END Block
1)	 00162 00041	 RELINI -- Loader Block Initialization
1)	 00163 00042	 GBOUT Routine
1)	 00165 00043	 CODOUT Routine -- Output Code or Data
1)	 00169 00044	
1)	 00170 00045	 FBOUT, etc. -- Output Fixups

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 1,1

1)	 00173 00046	 SCOUT, etc. -- Output Symbols
1)	 00177 00047	 LNKOUT -- Output Linkage Block
1)	 00179 00048	 PRGOUT, FILSCN -- Output Request Blocks, Scan for Source!file Rqst
1)	 00186 00049	
1)	 00189 00050	  RAD50, RAD52 -- Radix-50 Functions for Scout Routines
1)	 00193 00051	
1)	 00194 ENDMK
1)	⊗;
*** TOTAL[S,AIL] *** PAGE 1
2)	COMMENT ⊗   VALID 00049 PAGES VERSION 17-1(13)
2)	RECORD PAGE   DESCRIPTION
2)	 00001 00001
2)	 00006 00002	HISTORY
2)	 00012 00003	DATA for Total (Low-level Code Production) Routines
2)	 00015 00004	Description of Total Routines
2)	 00025 00005	CONV, PRE, POST -- Type-Conversion routines
2)	 00029 00006	
2)	 00033 00007	  
2)	 00038 00008	
2)	 00039 00009	PUT
2)	 00042 00010	ACCESS,GETSDR,GETDR,DISBLK,ZOTDIS--last four  only for dis
2)	 00050 00011	GET
2)	 00054 00012	
2)	 00057 00013	
2)	 00061 00014	
2)	 00065 00015	STACK -- Issue Instrs. to Stack Anything on Approp. Stack
2)	 00069 00016	MARK, MARKINT, MARKME -- Mark Semblk with Correct Temp Semantics
2)	 00072 00017	INCOR -- Issue Code to Clear this Entity from ACs
2)	 00073 00018	REMOPs, CLEARs -- Remove Temps, ACs, from Use
2)	 00079 00019	DSCR CLEAR,CLEARL,CLEARA
2)	 00081 00020	STROP -- Bit-Driven String Operation Code Generator
2)	 00086 00021	GETTEM, etc. -- Temp Semblk Allocators
2)	 00089 00022	GETAC, GETAN0 -- AC Allocators
2)	 00095 00023	AC Store routines -- BOLSTO, FORSTO, STORIX, GOSTO, STORZ
2)	 00100 00024	 STORA -- main AC-storing subr. -- called by above
2)	 00105 00025	EMITER -- Descriptions of Routine and Control Bits
2)	 00108 00026	 EMITER Routine
2)	 00112 00027	
2)	 00117 00028		SUBI	TEMP,1		FIX IT
2)	 00122 00029	
2)	 00125 00030	Qstack Routines -- BPUSH, etc.
2)	 00129 00031	
2)	 00132 00032	
2)	 00135 00033	PWR2
2)	 00136 00034	GBOUT Description, Loader Block Format Description
2)	 00139 00035	 Control Variables for Loader Block Output
2)	 00142 00036	 Loader Output Blocks-- Entry, Program Name, Initial Stuff
2)	 00145 00037	                        Code, Boolean Code, Fixups, Links

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 1,1

2)	 00149 00038	                        Space Allocation Block
2)	 00153 00039	                        Request Blocks -- RELfile, Libraries
2)	 00155 00040	                        Ending Code, Symbols -- END Block
2)	 00159 00041	 RELINI -- Loader Block Initialization
2)	 00160 00042	 GBOUT Routine
2)	 00162 00043	 CODOUT Routine -- Output Code or Data
2)	 00166 00044	
2)	 00167 00045	 FBOUT, etc. -- Output Fixups
2)	 00170 00046	 SCOUT, etc. -- Output Symbols
2)	 00174 00047	 LNKOUT -- Output Linkage Block
2)	 00176 00048	 PRGOUT, FILSCN -- Output Request Blocks, Scan for Source!file Rqst
2)	 00180 00049	  RAD50, RAD52 -- Radix-50 Functions for Scout Routines
2)	 00184 ENDMK
2)	⊗;


******** TOTAL **** PAGE 2
1)	VERSION 17-1(13) 3-17-74 BY RLS TENEX ADDITIONS
1)	VERSION 17-1(13) 2-13-74 BY JRL BUG #RE# STRING ITEMVAR ARRAY NOT STRING ARRAY
*** TOTAL[S,AIL] *** PAGE 2
2)	VERSION 17-1(13) 2-13-74 BY JRL BUG #RE# STRING ITEMVAR ARRAY NOT STRING ARRAY


******** TOTAL **** PAGE 13
1)	CHKDX:	TLNN	SBITS,INDXED	;IF INDXED, NOT STRING,  NOT ADDR,  BE
1)		JRST	ADRCK
1)	;; #RE# (1 OF 1) A STRING ITEMVAR ARRAY NOT A STRING ARRAY
1)		TRNE	TBITS,ITMVAR
*** TOTAL[S,AIL] *** PAGE 13
2)	CHKDX:
2)		TLNN	SBITS,INDXED	;IF INDXED, NOT STRING,  NOT ADDR,  BE
2)		JRST	ADRCK
2)	;; #RE# (1 OF 1) A STRING ITEVAR ARRAY NO A STRING ARRAY
2)		TRNE	TBITS,ITMVAR


******** TOTAL **** PAGE 13
1)		 TLO	 A,2		; SURE SOME SORT OF MOVE GETS DONE
*** TOTAL[S,AIL] *** PAGE 13
2)		TRNN	FF,ADDR
2)		 TLO	 A,2		; SURE SOME SORT OF MOVE GETS DONE


******** TOTAL **** PAGE 42
1)	NOTENX <
1)	BQN:	SOSLE	BINCNT		;FULL?
*** TOTAL[S,AIL] *** PAGE 42
2)	BQN:	SOSLE	BINCNT		;FULL?

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 42,42



******** TOTAL **** PAGE 42
1)	>;NOTENX
1)	TENX <
1)		PUSH	P,C
1)		MOVNI	C,(A)
1)		MOVE	B,OUTADR
1)		SKIPL	A,BINJFN	;JUST IN CASE IT'S -1 (DUMMY)
1)		 JSYS	SOUT
1)		MOVEM	B,OUTADR	;UPDATE OUTADR
1)		POP	P,C
1)	>;TENX
1)	OUTDUN:	POP	P,B		;GET BUFFER ADDR BACK
*** TOTAL[S,AIL] *** PAGE 42
2)	OUTDUN:	POP	P,B		;GET BUFFER ADDR BACK


******** TOTAL **** PAGE 48
1)	NOTENX <
1)	↑↑FILSCN: SETOM	TYICORE		;TYI IN COMND WILL GET CHARS FRM STRNG
*** TOTAL[S,AIL] *** PAGE 48
2)	↑↑FILSCN: SETOM	TYICORE		;TYI IN COMND WILL GET CHARS FRM STRNG


******** TOTAL **** PAGE 48
1)	>;NOTENX
1)	TENX <
1)	TFLSCN:
1)		BEGIN TFLSCN
1)	CTRLV←←"V"-100			;TENEX QUOTING CHARACTER
1)	FIND←←D
1)		SETZM	FIND
1)		PUSH	SP,PNAME	;ORIGINAL NAME -- COPY ONTO STACK
1)		PUSH	SP,PNAME+1
1)		PUSH	SP,[0]		;DEVICE TEMPORARY
1)		PUSH	SP,[0]
1)		PUSH	SP,[0]		;DIR TEMPORARY
1)		PUSH	SP,[0]
1)		PUSH	SP,[0]		;NAM TEMPORARY
1)		PUSH	SP,[0]	
1)	DEFINE ORIG <-7(SP)>
1)	DEFINE ORIG1 <-6(SP)>
1)	DEFINE DEV <-5(SP)>
1)	DEFINE DEV1 <-4(SP)>
1)	DEFINE DIR <-3(SP)>
1)	DEFINE DIR1 <-2(SP)>
1)	DEFINE NAM <-1(SP)>

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 48,48

1)	DEFINE NAM1 <0(SP)>
1)	;SIMPLE SINCE NAME IS AT THE TOP OF SP
1)	DEFINE CATNAM (X) <
1)		PUSH	P,X
1)		PUSHJ	P,CATCHR
1)	>
1)	DEFINE CATDIR (X) <
1)		PUSH	P,X
1)		PUSH	SP,DIR
1)		PUSH	SP,DIR
1)		PUSHJ	P,CATCHR
1)		POP	SP,-4(SP)
1)		POP	SP,-4(SP)
1)	>
1)	DEFINE GCH <
1)		HRRZ	A,ORIG
1)		JUMPE	A,TENDUN
1)		ILDB	C,ORIG1
1)		SOS	ORIG
1)	>
1)	TENX1:	GCH
1)		CAIE	3,CTRLV
1)		  JRST	NOQUOTE
1)		SKIPE	FIND
1)		  JRST	QUODIR
1)		PUSHJ	P,CATNA3
1)		GCH	
1)		PUSHJ	P,CATNA3 		;AND THE CHAR FOLLOWING THE CTRLV	
1)		JRST	TENX1
1)	QUODIR:	PUSHJ	P,CATDI3
1)		GCH
1)		PUSHJ	P,CATDI3
1)		JRST	TENX1			;AND CONTINUE
1)	NOQUOTE:
1)		CAIN	C,":"			;COLON -- DEVICE
1)		   JRST	ISDEV			;ITS BEEN A DEVICE ALL ALONG!!
1)		CAIN	C,","
1)		   JRST	TENX1			;IGNORE COMMA
1)		CAIE	C,40			;SPACE
1)		CAIN	C,11			;OR TAB
1)		   JRST	TENX1
1)		CAIE	C,"<"			;THESE START THE DIRECTORY NAME
1)		CAIN	C,"["
1)		   JRST	STDIR
1)		CAIE	C,">"			;THESE FINISH THE DIR. NAME
1)		CAIN	C,"]"
1)		   JRST	ENDDIR
1)		SKIPE	FIND			;DOING DIRECTORY?

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 48,48

1)		   JRST	.+3			;YES
1)		PUSHJ	P,CATNA3
1)		JRST	TENX1
1)		PUSHJ	P,CATDI3
1)		JRST	TENX1
1)	STDIR:	SETOM	FIND
1)		JRST	TENX1
1)	ENDDIR:	SETZM	FIND
1)		JRST	TENX1
1)	ISDEV:	PUSHJ	P,CATNA3		;PUT THE COLON ON THE NAME
1)		MOVE	C,NAM			;THE "NAME" HAS REALLY BEEN A DEV
1)		MOVEM	C,DEV
1)		MOVE	C,NAM1
1)		MOVEM	C,DEV1			
1)		
1)		SETZM	NAM			;SO CLEAR THE NAME -- START OVER
1)		SETZM	NAM1
1)		JRST	TENX1
1)	TENDUN:	
1)	;NOW STACK HAS ORIG,DEV,DIR,NAM
1)	GOTDIR: 
1)	;NOW FIND ONLY THE NAME -- IGNORE EXTENSION, VERSION, ETC.
1)		PUSH	SP,[0]			;NEW TEMPORARY
1)		PUSH	SP,[0]
1)	NAMLUP:	HRRZ	A,-3(SP)
1)		SOS	-3(SP)			;DECREMENT
1)		JUMPE	A,GOTDI1
1)		ILDB	C,-2(SP)
1)		CAIE	C,"."			;QUIT ON PERIOD
1)		CAIN	C,";"			;OR SEMICOLON
1)		JRST	GOTDI1
1)		PUSH	P,C
1)		PUSHJ	P,CATCHR
1)		JRST	NAMLUP
1)	GOTDI1:	POP	SP,-2(SP)		;REMOVE TEMPORARY
1)		POP	SP,-2(SP)	
1)		HRRZ	A,-1(SP)		;CHECK LENGTH OF NAME
1)		CAILE	A,6	
1)		   ERR <Name too long for loader.>,1
1)		PUSHJ	P,CVSIX			;GET SIXBIT FOR NAME
1)		MOVEM	A,C			;INTO C
1)	IFN SIXSW,<
1)		HRRZ	A,-1(SP)
1)		CAILE	A,6
1)		   ERR <Directory too long for loader.>,1
1)		PUSHJ	P,CVSIX			;SIXBIT FOR DIR
1)		MOVEM	A,D			;INTO D
1)	>;SIXSW

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 48,48

1)	IFE SIXSW,<;DAMN -- PHONEY BBN PPNS INSTEAD OF NICE HONEST SIXBIT
1)		PUSH	P,B			;SAVE B
1)		PUSH	P,[0]
1)		PUSHJ	P,CATCHR		;NULL BYTE TO END OF STRING
1)		POP	SP,B			;FOR STDIR	
1)		SUB	SP,X11			;ADJUST
1)		MOVEI	A,1			;POSITIVE -- NO RECOGNIZE
1)		JSYS	STDIR
1)		  JFCL
1)		  ERR <This directory does not exist on this system.>
1)		HRRZM	A,D			;XWD 0,DIRNO INTO D
1)		POP	P,B
1)	>;IFE SIXSW
1)		HRRZ	A,-1(SP)
1)		CAILE	A,6
1)		  ERR <Device name too long for loader.>,1
1)		PUSHJ	P,CVSIX			;SIXBIT FOR DEVICE INTO A
1)		SKIPN	A			;ANYTHING THERE?
1)		  MOVE	A,[SIXBIT/DSK/]		;ASSUME DEVICE DSK
1)		SUB	SP,X22			;CLEAR OFF COPY OF PNAME
1)		POPJ	P,
1)		
1)	;CALL CAT MACROS WITH AC C AS THE ARG
1)	CATNA3:	CATNAM C
1)		POPJ	P,
1)	CATDI3:	CATDIR C
1)		POPJ	P,
1)		BEND TFLSCN
1)	>;TENX
1)	DSCR PRGOUT -- OUTPUT PROGRAM AND LIBRARY REQUEST BLOCKS
*** TOTAL[S,AIL] *** PAGE 48
2)	DSCR PRGOUT -- OUTPUT PROGRAM AND LIBRARY REQUEST BLOCKS


******** TOTAL **** PAGE 49
1)	NOTENX<
1)		MOVE	USER,GOGTAB		;SAVE ACS IN USER TABLE AREA
*** TOTAL[S,AIL] *** PAGE 49
2)		MOVE	USER,GOGTAB		;SAVE ACS IN USER TABLE AREA


******** TOTAL **** PAGE 49
1)	>;NOTENX
1)	TENX<
1)		PUSH	P,A			;MUST PUSH SINCE TFLSCN CALLS RUNTIMES
1)		PUSH	P,C
1)		PUSH	P,D
1)		EXCH	SP,STPSAV		;GET A STRING STACK

	1) TOTAL vs. 2) TOTAL[S,AIL]	SRCCOM	03-19-74	01:54	PAGES 49,49

1)		PUSHJ	P,TFLSCN		;DOES NOT MODIFY B
1)		EXCH	SP,STPSAV		;RESTORE IT
1)		MOVEI	TEMP,3			
1)		ADDB	TEMP,(B)
1)		ADDI	TEMP,(B)		;ptr to AREAS to be filled
1)		MOVEM	C,-1(TEMP)		;STORE NAME
1)		MOVEM	D,00(TEMP)		;STORE PPN
1)		MOVEM	A,01(TEMP)		;STORE DEVICE
1)		POP	P,D
1)		POP	P,C
1)		POP	P,A			;RESTORE
1)		PUSH	P,TEMP
1)		MOVE	USER,GOGTAB		;SAVE FOR KROCK BELOW
1)		HRRZI	TEMP,RACS(USER)	
1)		BLT	TEMP,SBITS2+RACS(USER)	
1)		POP	P,TEMP
1)	>;TENX
1)		HRRZS	TEMP
*** TOTAL[S,AIL] *** PAGE 49
2)		HRRZS	TEMP