Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99e-bb - initia.c11
There are no other files named initia.c11 in the archive.
 REP 29/1	;11C1
	INTEDT==224		; EDIT LEVEL
 WIT
	INTEDT==236		; EDIT LEVEL
 REP 54/1	;11C2
	ND	L$PDL,20	;LENGTH OF PUSH-DOWN LIST
 WIT
	ND	L$PDL,40	;[234] LENGTH OF PUSH-DOWN LIST
 INS 229/3	;11C3
	;234	NO SPR		DRB 12-Feb-85
	;	LENGTHEN THE STACK TO ACCOMODATE THE NEW HELPER.
	;
	;236	10-35151	DRB 28-MAR-85
	;	ADD THE "ACCOUNT" ARGUMENT FOR TTY.INI TO BE APPLIED TO JOBS WE'RE
	;	LOGGING IN.  CREATE A NEW "FRCLIN" TTY SPECIFIER TO MEAN THE
	;	FRCLIN JOB.  ALLOW THIS ARGUMENT ON THE "STOMP" COMMAND AS WELL.
	;
 INS 13/16	;11C4
		PUSHJ	P,ACCT$		;GO SET THE ACCOUNT STRING
		 CTYSTR	[ASCIZ\%FRCLIN INITIA: Unable to set account string for TTY STOMPER
	\]				;COMPLAIN IF ERRORS HERE
 INS 33/23	;11C5
		CAMN	WD,['FRCLIN']	;DO WE JUST WANT TO SET FRCLIN PARAMETERS?
		 JRST	FRCLIN		;YES, GO SET STUFF
 INS 18/25	;11C6
	;HERE IF "FRCLIN" SEEN IN TTY.INI

	FRCLIN:	TXNN	F,F.FLN		;RUNNING ON FRCLIN?
		JRST	FILELS		;NO, IGNORE THIS COMMAND
		JRST	STMP.0		;GO LOOK FOR FRCLIN COMMANDS

 REP 23/25	;11C7
		JRST	FILELS		;AND IGNORE THE REST OF THE LINE

 WIT
	STMP.0:	TXNE	F,F.ECMD!F.EOF	;SEE IF END OF COMMAND
		POPJ	P,		;YES--RETURN
		PUSHJ	P,GETSIX	;GET NEXT WORD
		JUMPE	WD,STMP.1	;IF NULL, IGNORE IT
		MOVE	T2,[IOWD CMDS-CMDLL,CMDT+CMDLL]	;ALLOWABLE STOMP COMMANDS TABLE
		PUSHJ	P,FNDCMD	;FIND AND STORE COMMAND
		  JRST	ERRFCR		;ERROR IF MISSING
	STMP.1:	CAIN	CH,"-"		;SEE IF - XYZ
		PUSHJ	P,NO$		;YES--SET NOXYZ
		TXZN	F,F.CERR	;SEE IF ERROR
		JRST	STMP.0		;NO--LOOP
		JRST	ERRFCR		;YES--SAY SO
 REP 19/29	;11C8
		SKIPGE	T1,CMDP(T2)	;GET PROCESSOR
 WIT
		ADDI	T2,CMDP-CMDT+1(T7);POINT TO THE PROCESSOR
		SKIPGE	T1,(T2)		;GET PROCESSOR
 INS 7/32	;11C9
	;		  S IF ALLOWED ON STOMP OR FRCLIN
 INS 29/32	;11C10
	W	ACCOUNT,REDACT,S,
 REP 12/34	;11C11
	IFDIF	<$COM><C>,<
 WIT
	IFIDN	<$COM><S>,<
 INS 16/34	;11C12
	CMDS==.-CMDT

		DEFINE	W($KEY,$PROC,$COM,$JUMP),<
	IFDIF	<$COM><C>,< IFDIF <$COM><S>,<
		EXP	<SIXBIT /$KEY/>	; $KEY
	>>>
		CMDLST	(-1,1,2,4)
 REP 28/34	;11C13
	IFDIF	<$COM><C>,<
 WIT
	IFIDN	<$COM><S>,<
 INS 32/34	;11C14

		DEFINE	W($KEY,$PROC,$COM,$JUMP),<
	IFDIF	<$COM><C>,< IFDIF <$COM><S>,<
		XWD	$JUMP,$PROC		;$KEY
	>>>
		CMDLST	(-1,1,2,4)
 INS 1/37	;11C15

	SUBTTL	ACCOUNT COMMAND HANDLER

	REDACT:	TXZN	F,F.NO		;DID HE SAY NO?
		JRST	REDA.1		;NO, GET THE STRING VALUE
		SETZM	ACTSTR		;YES, THEN
		MOVE	T1,[ACTSTR,,ACTSTR+1] ; ZERO
		BLT	T1,ACTSTR+7	;  ANY LEFTOVER STUFF
	REDA.1:	MOVE	T1,[POINT 7,ACTSTR] ;POINT TO THE STRING STORAGE
		MOVEI	T2,^D39		;GET THE MAXIMUM LENGTH (NOT INCL NULL)
		PUSHJ	P,GSTARG	;GET THE STRING ARGUMENT
		  TXO	F,F.CERR	;ERROR, SO LITE THE BIT
		POPJ	P,		;RETURN
 INS 1/55	;11C16
	;SUBROUTINE TO READ A STRING ARGUMENT, DELIMITED BY EITHER FLAVOR OF QUOTE.
	;CALLED WITH STRING POINTER IN T1, MAX BYTE COUNT (NOT INCLUDING TERMINATING
	;NULL) IN T2.

	;DESTROYS T1-T3

	GSTARG:	PUSHJ	P,SKIPTV	;SKIP TO VALUE IF ANY
		PUSHJ	P,GETCHA	;GET THE FIRST QUOTE
		CAIE	CH,""""		;IS IT A QUOTE
		CAIN	CH,"'"		;  OF EITHER TYPE?
		SKIPA			;YES, GO ON
		POPJ	P,		;NO, RETURN ERROR
		MOVE	T3,CH		;SAVE THE DELIMITER
		JRST	GSTA.2		;SKIP INTO THE LOOP
	GSTA.1:	SOSL	T2		;ALLOWED TO STORE THIS ONE?
		IDPB	CH,T1		;YES, STORE IT THEN
	GSTA.2:	PUSHJ	P,GETCHA	;GET THE NEXT CHARACTER
		TXNE	F,F.EOF!F.ECMD	;ARE WE AT THE END OF THE LINE?
		POPJ	P,		;YES, THAT'S AN ERROR
		CAME	CH,T3		;IS IT THE DELIMITER AGAIN?
		JRST	GSTA.1		;NO, STORE IT AND TRY ANOTHER
		PUSHJ	P,GETCHA	;GET THE NEXT CHARACTER
		CAMN	CH,T3		;IS IT THE QUOTE AGAIN?
		JRST	GSTA.1		;YES, GO STORE IT
		MOVEM	CH,REEAT	;NO, PUT IT BACK
		SETZ	T2,		;GET A NULL
		IDPB	T2,T1		;TERMINATE THE STRING
		JRST	CPOPJ1		;AND RETURN HAPPY
 INS 36/68	;11C17
		PUSHJ	P,ACCT$		;GO SET THE ACCOUNT STRING
		 JRST	[SKIPN	ACTSTR		;ERROR. DO WE EVEN HAVE A STRING?
			 INTWRN	(NAS,<No account string specified in TTY.INI
	>,<JRST .+1>)
			 INTWRN	(ESA,<Error setting account string
	>,<JRST .+1>)]
 INS 1/73	;11C18
	;HERE TO SET THE ACCOUNT STRING FOR A JOB THAT WE'RE GOING TO LOG IN.
	;IF ONE IS SET, USE IT.  OTHERWISE, GO LOOK FOR A SYSTEM DEFAULT ACCOUNT
	;STRING.  RETURN ERROR IF ACCOUNT VALIDATION IS REQUIRED AND WE FAILED
	;IN SOME WAY.

	;DESTROYS T1 AND T3

	ACCT$:	MOVX	T3,%CNST2	;GET THE SECOND MONITOR
		GETTAB	T3,		; STATES WORD
		  SETZ	T3,		;WELL, ASSUME NO STATES
		MOVX	T1,<.ACTRD,,[EXP 2,0,ACTSTR]> ;GET ACCT. ARG BLOCK
		SKIPN	ACTSTR		;DO WE HAVE AN ACCOUNT STRING?
		 ACCT.	T1,		;NO, READ JOB ZERO'S ACCOUNT STRING
		  JFCL			;ERRORS CAN ALWAYS HAPPEN
		MOVX	T1,<.ACTCH,,[EXP 1,<POINT 7,ACTSTR>]> ;GET ACCT. ARGUMENT BLOCK
		SKIPE	ACTSTR		;DO WE HAVE AN ACCOUNT STRING YET?
		ACCT.	T1,		;YES, GO SET IT
		 TXNN	T3,ST%ACV	;ERROR, ACCOUNT VALIDATION REQUIRED?
		  AOS	(P)		;NOPE.  NO ERROR HERE
		POPJ	P,		;RETURN
 INS 13/86	;11C19
	ACTSTR:	BLOCK	10	;ACCOUNT STRING FROM TTY.INI
 SUM 186722