Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - initia.c12
There are no other files named initia.c12 in the archive.
 REP 29/1	;12C1
	INTEDT==224		; EDIT LEVEL
 WIT
	INTEDT==240		; EDIT LEVEL
 REP 54/1	;12C2
	ND	L$PDL,20	;LENGTH OF PUSH-DOWN LIST
 WIT
	ND	L$PDL,40	;[234] LENGTH OF PUSH-DOWN LIST
 INS 229/3	;12C3
	;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.
	;
	;240	NO SPR		DRB 8-Apr-85
	;	DON'T TYPE ANYTHING ON DIALUPS THAT AREN'T DIALED INTO.  REWORK THE
	;	CODE FOR NOT TYPING ON SLAVED LINES SO THAT SYSDPY CAN STILL BE RUN.
	;
 INS 13/16	;12C4
		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	;12C5
		CAMN	WD,['FRCLIN']	;DO WE JUST WANT TO SET FRCLIN PARAMETERS?
		 JRST	FRCLIN		;YES, GO SET STUFF
 INS 18/25	;12C6
	;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	;12C7
		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	;12C8
		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	;12C9
	;		  S IF ALLOWED ON STOMP OR FRCLIN
 INS 29/32	;12C10
	W	ACCOUNT,REDACT,S,
 REP 12/34	;12C11
	IFDIF	<$COM><C>,<
 WIT
	IFIDN	<$COM><S>,<
 INS 16/34	;12C12
	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	;12C13
	IFDIF	<$COM><C>,<
 WIT
	IFIDN	<$COM><S>,<
 INS 32/34	;12C14

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

	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
 REP 38/37	;12C16
	DOTT.2:	PUSHJ	P,SIGNON	;ISSUE SIGNON MESSAGE
 WIT
		SKIPE	T1,SLAVE	;DID WE SET/CLEAR SLAVE?
		 TRNN	T1,-1		;YES, DID WE SET IT?
		  SKIPA			;NO, GO ON
		   JRST	DOTT0A		;YES, DON'T TYPE ANYTHING
	DOTT.2:	MOVE	T1,[2,,T2]	;SETUP A TRMOP. ARGUMENT BLOCK
		MOVX	T2,.TOAPC	;  TO FIND OUT WHAT KIND OF
		MOVE	T3,TERNUM	;  LINE THIS IS
		TRMOP.	T1,		;GO ASK
		 MOVX	T1,.TOHWD	;ASSUME HARD WIRED
		CAIE	T1,.TODSD	;IS THIS A DATASET LINE?
		  JRST	DOTT.0		;NO, GO CHECK FOR SLAVE LINE
		MOVX	T2,.TODSS	;YES, SETUP A NEW TRMOP. CALL
		MOVE	T1,[2,,T2]	;  TO SEE IF WE HAVE CARRIER
		TRMOP.	T1,		;  ON THIS LINE
		  JRST	DOTT.0		;ASSUME YES
		JUMPL	T1,DOTT.0	;YES, GO AHEAD WITH THE BANNER
	DOTT0A:	MOVEI	T1,TI		;YES, GET THE TERMINAL'S CHANNEL NUMBER
		RESDV.	T1,		;GET RID OF THE TERMINAL
		  JFCL			;NO BIG DEAL IF THIS FAILS
		SETOM	SILENC		;MAKE SURE WE DON'T TRY TO TYPE ANYTHING
		POPJ	P,		;RETURN QUIETLY
	DOTT.0:	PUSHJ	P,SIGNON	;ISSUE SIGNON MESSAGE
 INS 1/55	;12C17
	;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	;12C18
		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	;12C19
	;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
 REP 3/79	;12C20
	$TTSTR:	MOVSI	OC,(POINT 7,)	;SETUP BYTE POINTER
 WIT
	$TTSTR:	SKIPE	SILENC		;ARE WE MUTE?
		POPJ	P,		;YES, JUST RETURN NOW
		MOVSI	OC,(POINT 7,)	;SETUP BYTE POINTER
 REP 13/79	;12C21
	$TTOUT:	HRRZ	OC,.JBUUO	;GET THE BYTE
 WIT
	$TTOUT:	SKIPE	SILENC		;ARE WE MUTE?
		POPJ	P,		;YES, JUST RETURN NOW
		HRRZ	OC,.JBUUO	;GET THE BYTE
 INS 13/86	;12C22
	ACTSTR:	BLOCK	10	;ACCOUNT STRING FROM TTY.INI
 INS 3/88	;12C23
	SILENC:	BLOCK	1	;DON'T TYPE ANYTHING ON TTY IF NONZERO
 SUM 186722