Google
 

Trailing-Edge - PDP-10 Archives - AP-D471B-SB_1978 - mgnmis.bli
There are no other files named mgnmis.bli in the archive.
!***COPYRIGHT (C) 1974, 1975, 1976, 1977 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***
MODULE MIS1(SREG = #17, FREG = #16,  VREG = #15,
MLIST,TIMER=EXTERNAL(SIX12),FSAVE)=
BEGIN

GLOBAL BIND MIS = 2;
! ***  LAST MODIFIED BY   ILG    30 DEC 76

REQUIRE MGNMAC.BLI;
REQ(MGNEXT);
REQ(MGNMC2);

EXTERNAL
	MOVE,
	LINK,
	UNLINK,
	PUTBLK,
	PUTWORD,
	GETBLK,
	GETWORD,
	COMPARE,
	SIBSAMENAME,
	TRCODESAME,
	LL,
	TRMCOUNT;

BIND	SYSNAMELEN = 24 %CHARACTERS% ,
	SYSNAMESIZE = SYSNAMELEN / 5 + 1,
	MC0LEN = 8 %CHARACTERS%,
	MC0SIZE = MC0LEN / 5 + 1;

GLOBAL
	MISCDEFFLAG,
	HIST30[N0NAMELEN],		!NEE ERRLEAF
	HIST31[M0NAMELEN],		!NEE ERRMPR
	TRCLEN,
	TRCSIZE,

	SYSNAME[ SYSNAMESIZE ],

	HIST3,			!OBSOLETE, NEVER REFERENCED BUT PLACE
!				RESERVED FOR OLD BIN FILES (PHYSCORE)
	MAXSLOTS,
	PASSWORDS,
	PBQUOTA,
	MC0ALL[ MC0SIZE ],
	MC0DFERRED[ MC0SIZE ],
	MC0IMMEDIATE[ MC0SIZE ],
	MC0DFAULT,

	SOT,
	SOTRC,
	TRCDL,
	TRCDLC,
	HIST35,			!NEE SOTID
	HIST5,			!NEE TIDLEN
	HIST6,			!NEE TIDEL
	HIST7,			!NEE TIDELC
	HIST8,			!NEE DONTHAVETID

	SDMOQ,

	GOTCODE,
	HIST10,			!NEE GOTLEAF

	HIST11,			!NEE SONGIVEN
	SON,
	HIST12,			!NEE SNLFGIVEN
	HIST13[N0NAMELEN],	!NEE SNLF
	HIST9,			!SNMPRGIVEN
	HIST14[M0NAMELEN],	!NEE SNMPR
	HIST15,			!NEE SOFFGIVEN
	SOFF,
	HIST16,			!NEE SFLFGIVEN
	HIST17[N0NAMELEN],	!NEE SFLF
	HIST18,			!SFMPRGIVEN
	HIST19[N0NAMELEN],	!NEE SFMPR
	HIST20,			!NEE RLFGIVEN
	HIST21[N0NAMELEN],	!NEE RLF
	HIST22,			!NEE RMPRGIVEN
	HIST23[M0NAMELEN],	!NEE RMPR
	HIST24,			!NEE RDMGIVEN
	RDM,
	HIST25,			!NEE RCLFGIVEN
	HIST26[N0NAMELEN],	!NEE RCLF
	HIST27,			!NEE RCMPRGIVEN
	HIST28[M0NAMELEN],	!NEE RCMPR
	HIST29,			!NEE RDMCGIVEN
	RDMC,

	HIST36,			!NEE MAXCPS
	HIST37,			!NEE MAXSPM
	HIST38,			!NEE MAXMPG


	HIST4,				!OBSOLETED, WORD LEFT IN BIN FILE FOR
!					COMPATABILITY (JOURNALLING)

	INJOURNALLING,
	OUTJOURNALLING,
	JSPEC1[ SPECBLKLEN ],
	JSPEC2[ SPECBLKLEN ],

	MPPLOGGING,
	MSPEC1[ SPECBLKLEN ],
	MSPEC2[ SPECBLKLEN ],

	FAILSOFT,
	ROLLING,
	FSFILESPEC[ SPECBLKLEN ],
	FSSIZE,

	ESI,
	EMI,
	EGI,
	EPI;

MAP	FORMAT SON;
MAP	FORMAT SOFF;
MAP	FORMAT RDM;
MAP	FORMAT RDMC;
COMMENT;

! ROUTINE STOREPASSWORD
! ======= =============

! THIS ROUTINE ADDS A PASSWORD TO THE END OF THE PASSWORD LIST

GLOBAL ROUTINE STOREPSWRDS =
    BEGIN
	REGISTER PSWRD, PSWPTR;
	MAP	FORMAT PSWPTR;
	MAP	FORMAT PSWRD;

	PSWPTR _ .PASSWORDS<FORE>;		! CHECK FOR REDUNDENCIES
	WHILE .PSWPTR NEQ 0 DO
	    BEGIN
		IF COMPARE( PSWPTR[ PW0WORD ], PRIM, PW0WORDSIZE ) THEN
			RETURN ( WARN( 14 ) );
		PSWPTR _ .PSWPTR[ PW0FORE ]
	    END;

	PSWRD _ GMEM( PW0SIZE );
	PSWRD[ PW0LINKS ] _ 0;

	MOVE( PRIM, PSWRD[ PW0WORD ], PW0WORDSIZE );

	LINK( %TO% PASSWORDS, .PSWRD );
    END;

FORWARD	MAKTRCODE;

COMMENT;

! ROUTINE MAKEMISC
! ======= ========
! THIS ROUTINE ASKS ALL THE QUESTIONS ABOUT INFORMATION NOT CONTAINED
! IN ANY OTHER CATAGORY

GLOBAL ROUTINE MAKEMISC=
    BEGIN

	OWN	FLAG;
	MAP	ROOTFORMAT FSFILESPEC;
	MAP	ROOTFORMAT JSPEC1;
	MAP	ROOTFORMAT MSPEC1;
	LABEL	LOOP1, LOOP2;
	LABEL	SONLOOP,SOFFLOOP, RDMLOOP,RDMCLOOP;

	%LOCAL% ROUTINE SETIMM =
	    BEGIN
		MC0DFAULT _ 0
	    END;

	%LOCAL% ROUTINE SETDEF =
	    BEGIN
		MC0DFAULT _ 1
	    END;

	%LOCAL% ROUTINE SETALL =
	    BEGIN
		MC0DFAULT _ 2
	    END;

	
COMMENT;
	GLOBAL ROUTINE MPRSAMENAME( MPRNAME ) =
	    BEGIN

		IF COMPARE( PLIT('SON'), .MPRNAME, M0NAMELEN ) THEN RETURN TRUE;

		IF COMPARE( PLIT('SOFF'), .MPRNAME, M0NAMELEN ) THEN RETURN TRUE;
		IF COMPARE( PLIT('DMR'), .MPRNAME, M0NAMELEN ) THEN RETURN TRUE;
		IF COMPARE( PLIT('DCR'), .MPRNAME, M0NAMELEN ) THEN RETURN TRUE;
		IF COMPARE( PLIT('ERR'), .MPRNAME, M0NAMELEN ) THEN RETURN TRUE;
		FALSE
	    END;

! BEGIN !

	IF NOT NULL( PRIM, N0NAMELEN * MAXLEVEL ) THEN
	    BEGIN
		ERROR( 94 );			% GARBAGE AFTER THE COMMAND%
		RETURN
	    END;

	IF .MISCDEFFLAG THEN
	    BEGIN
		ERROR( 74 );
		IF NOT ( CONFIRMED() ) THEN RETURN
	    END;

	MISCDEFFLAG _ TRUE;

	WHILE ( ASKCHARS( '[NAME OF THE SYSTEM]?R(<STRING>?R)[:	??]',
		SYSNAME,
		SYSNAMELEN ) ) EQL CRONLY DO
	    BEGIN
		ERROR( 39 );
		WARN( 0 )
	    END;

	MAXSLOTS _ ASKDNUM( '[MAX]IMUM NUMBER OF[ JOB SLOTS] FOR MCS?R(<DECIMAL NUMBER>?R)[:	??]',
			NOT DEFAULTOK,
			0,
			1,
			BIGNUMBER );

	ASKNAME( '[PASSWORDS]?R(<done>, <NAME>?R)[:	??]', PW0LEN );

	WHILE .PRIM NEQ 0 DO
	    BEGIN
		STOREPSWRDS();
		ASKNAME( '[				??]', PW0LEN)
	    END;

	INJOURNALLING _ ASKYESORNO( '[INPUT] MESSAGE[ JOURNALLING]?R(YES,NO?R)[:	??]', TRUE);
	OUTJOURNALLING _ ASKYESORNO( '[OUTPUT] MESSAGE[ JOURNALLING]?R(YES,NO?R)[:	??]', TRUE);
		JSPEC1[SB0DEVICE] _ JSPEC1[SB0NAME] _  0;
		IF .INJOURNALLING OR .OUTJOURNALLING THEN
		WHILE (.JSPEC1[SB0DEVICE] OR .JSPEC1[SB0NAME]) EQL 0 DO
		BEGIN
		  ASK2FSPEC( '[JOURNALLING FILES]?R(<FILE-SPEC-PAIR>?R)[:	??]',
				JSPEC1,
				JSPEC2 );
		  IF (.JSPEC1[SB0DEVICE] OR .JSPEC1[SB0NAME]) EQL 0 THEN ERROR(127)
		END;

	MPPLOGGING _ ASKYESORNO( '[MPP LOGGING] TO BE DONE?R(YES,NO?R)[:	??]', TRUE);

	MSPEC1[SB0DEVICE] _ MSPEC1[SB0NAME] _  0;
	IF .MPPLOGGING THEN WHILE (.MSPEC1[SB0DEVICE] OR .MSPEC1[SB0NAME]) EQL 0 DO
	    BEGIN
		ASK2FSPEC( '[MPP LOGGING FILES]?R(<FILE-SPEC-PAIR>?R)[:	??]',
				MSPEC1,
				MSPEC2 );
		IF (.MSPEC1[SB0NAME] OR .MSPEC1[SB0DEVICE])  EQL 0 THEN ERROR(128)
	    END;

	FAILSOFT _ ASKYESORNO( '[FAILSOFTING] TO BE DONE?R(YES,NO?R)[:	??]', TRUE);

	ROLLING _ ASKYESORNO( '[ROLLOUT] TO BE DONE?R(YES,NO?R)[:	??]', TRUE);

	OUTPUT('FAILSOFT/ROLLOUT FILE DEFINITION:?M?J');
	ASKFSPEC( '[?IFILE ]NAME?R(MCS.QQQ, <FILE-SPEC>?R)[:	??]',
	    FSFILESPEC );

	IF .FSFILESPEC[SB0NAME] EQL 0 THEN FSFILESPEC[SB0NAME] _ SIXBIT 'MCS';
	IF .FSFILESPEC[SB0EXT] EQL 0 THEN FSFILESPEC[SB0EXT] _ SIXBIT "QQQ";

	FSSIZE _ 1152 * ASKDNUM( '[?IINITIAL SIZE IN SECTIONS]?R(1,<DECIMAL NUMBER>?R)[:	??]',
		DEFAULTOK,
		1,
		1,
		56 );
	IF NOT ASKYESORNO('[?I]CAN MCS [EXTEND FILE] IF IT BECOMES FULL?R(YES,NO?R)[:  ??]',TRUE) 
	   THEN FSSIZE _ -.FSSIZE;

	TYPE( '[MESSAGE CLASS CODES FOR:?M?J]');
	ASKNAME( '[        ALL]?R( <none>, <NAME>?R)[:	??]', MC0LEN);
	MOVE( PRIM, MC0ALL, MC0SIZE );
LOOP1:	REPEAT
	    BEGIN
		ASKNAME( '[        DEFERRED]?R( <none>, <NAME>?R)[:	??]', MC0LEN);
		IF COMPARE( PRIM, MC0ALL, MC0SIZE ) AND NOT NULL( PRIM, MC0SIZE ) THEN
		    BEGIN
			ERROR( 118 );
			WARN( 0 )
		    END
		    ELSE LEAVE LOOP1
	    END;
	MOVE( PRIM, MC0DFERRED, MC0SIZE );
LOOP2:	REPEAT
	    BEGIN
		ASKNAME( '[        IMMEDIATE]?R( <none>, <NAME>?R)[:	??]', MC0LEN);
		IF ( COMPARE( PRIM, MC0ALL, MC0SIZE ) OR COMPARE( PRIM, MC0DFERRED, MC0SIZE ) ) AND NOT NULL( PRIM, MC0SIZE ) THEN
		    BEGIN
			ERROR( 118 );
			WARN( 0 )
		    END
		    ELSE LEAVE LOOP2
	    END;
	MOVE( PRIM, MC0IMMEDIATE, MC0SIZE );

	ASKSTR( 'WHAT IS THE [DEFAULT MESSAGE CLASS] IF NONE SPECIFIED BY THE COBOL PROGRAM?R(IMMEDIATE,DEFERRED,ALL?R)[:	??]',
		PLIT(	ASCII 'IMMED',	SETIMM,
			ASCII 'DEFER',	SETDEF,
			ASCII 'ALL',	SETALL,
			0,		SETIMM ),
		0 );

	SDMOQ _ ASKDNUM( '[SIGNON DEFERRED MESSAGE OUTPUT QUOTA]?R(0,<DECIMAL NUMBER>?R)[:	??]',
			DEFAULTOK,
			0,
			0,
			BIGNUMBER );

	PBQUOTA _ ASKDNUM( '[DEFERRED MESSAGE ]?R(PIGGYBACK?R) QUOTA?R(0,<DECIMAL NUMBER>?R)[:	??]',
			DEFAULTOK,
			0,
			0,
			BIGNUMBER );

	TYPE( '[TRCODE STARTING POSITION]?R(' );
	SOTRC _ ASKDNUM('0,<DECIMAL NUMBER>?R)[:	??]',
			DEFAULTOK,
			0,
			0,
			BIGNUMBER );

	TRCLEN _ ASKDNUM( '[	LENGTH]?R(<DECIMAL NUMBER>?R)[:	??]',
			NOT DEFAULTOK,
			0,
			1,
			BIGNUMBER );

	TRCSIZE _ .TRCLEN / 5 + 2;

	TRCDL _ NOT ASKBITS( '[	DELIMITER]?R(<none>,<CHARACTER>?R)[:	??]',
				TRCDLC,
				1 );

	TYPE( '[STARTING POSITION OF MSG TXT]?R(' );
	IF .MSGLEVEL EQL 0 THEN OUTD( .SOTRC + .TRCLEN );
	SOT _ ASKDNUM( ',<DECIMAL NUMBER>?R)[:	??]',
			DEFAULTOK,
			.SOTRC + .TRCLEN,
			.SOTRC + .TRCLEN,
			BIGNUMBER );


	TYPE( '[TRCODES FOR:?M?J]' );

SONLOOP:REPEAT
	BEGIN
	  MAKTRCODE( PAZ 'SIGNON ', SON, GOTCODE);
	  IF .GOTCODE THEN LEAVE SONLOOP ELSE ERROR(41)
	END;

SOFFLOOP:REPEAT
	BEGIN
	  MAKTRCODE( PAZ 'SIGNOFF ', SOFF, GOTCODE);
	  IF .GOTCODE THEN LEAVE SOFFLOOP ELSE ERROR(41)
	END;

RDMLOOP:REPEAT
	BEGIN
	  MAKTRCODE( PAZ 'REQUEST DEFERRED MESSAGES ', RDM, GOTCODE);
	  IF .GOTCODE THEN LEAVE RDMLOOP ELSE ERROR(41)
	END;

RDMCLOOP:REPEAT
	BEGIN
	  MAKTRCODE( PAZ 'REQUEST DEFERRED MESSAGE COUNT ', RDMC,GOTCODE);
	  IF .GOTCODE THEN LEAVE RDMCLOOP ELSE ERROR(41)
	END;

	TYPE( 'WHAT IS THE [ASCII] TRANSMISSION[ CODE] FOR[:?M?J]' );

	ESI _ ASKONUM( '[	ESI]?R(<OCTAL NUMBER>?R)[:	??]',
			NOT DEFAULTOK,
			0,
			0,
			127 );

	EMI _ ASKONUM( '[	EMI]?R(<OCTAL NUMBER>?R)[:	??]',
			NOT DEFAULTOK,
			0,
			0,
			127 );

	IF .EMI EQL .ESI THEN WARN( 15 );

	EGI _ ASKONUM( '[	EGI]?R(<OCTAL NUMBER>?R)[:	??]',
			NOT DEFAULTOK,
			0,
			0,
			127 );

	IF (.EGI EQL .EMI) OR (.EGI EQL .ESI) THEN WARN( 15 );

	EPI _ ASKONUM( '[	EPI]?R(<OCTAL NUMBER>?R)[:	??]',
			NOT DEFAULTOK,
			0,
			0,
			127 );

	IF (.EPI EQL .EGI) OR (.EPI EQL .EMI) OR (.EPI EQL .ESI) THEN WARN( 15 );

    END;
COMMENT;

! ROUTINE MAKTRCODE
! ======= =========
! THIS ROUTINE ASKS FOR A TROCDE FOR SIGNON, SIGNOFF, REQUEST DEFERRED
! MESSAGES, AND REQUEST DEFERRED COUNT, AND STORES THE RESPONSE

GLOBAL ROUTINE MAKTRCODE( NAME, TRCODEPTR, FLAG ) =
    BEGIN
	REGISTER
		GIVEN,
		TRCODE,
		DONE;

	MAP	FORMAT TRCODE;

	TRCODE _ GMEM( .TRCSIZE );		! MAKE A TRANSACTION CODE CHUNK
	TRCODE[ TR0SIZE ] _ .TRCSIZE;
	TRCODE[ TR0CHAR ] _ .TRCLEN;

	DO
	    BEGIN
		TAB;
		OUTSA( .NAME );
		GIVEN _ NOT ASKBITS('?R(<STRING>?R)[: ??]',
					TRCODE[ TR0CODE ],
					.TRCLEN );

		DONE _ TRUE;
		IF .GIVEN THEN
			IF TRCODESAME( 0, TRCODE[ TR0CODE ] ) THEN
			    BEGIN
				DONE _ FALSE;
				WARN( 0 )
			    END
	    END
	WHILE NOT .DONE;

	IF NOT .GIVEN THEN
	    BEGIN
		PMEM( .TRCODE, .TRCSIZE );
		TRCODE _ 0
	    END;

	.TRCODEPTR _ .TRCODE;
	.FLAG _ .GIVEN

    END;
FORWARD	KILLMISC;

GLOBAL ROUTINE DELEMISC =
    BEGIN
	IF NOT NULL( PRIM, N0NAMELEN * MAXLEVEL ) THEN
	    BEGIN
		ERROR( 94 );			% GARBAGE AFTER THE COMMAND%
		RETURN
	    END;

	IF NOT ( CONFIRMED() ) THEN RETURN;
	KILLMISC()
    END;

FORWARD	ZAPMISC, DELPSWRDS, DELTRCODES;

GLOBAL ROUTINE KILLMISC =
    BEGIN
	DELPSWRDS();				! ZAP THE PASSWORDS
	DELTRCODES();				! ZAP THE TRCODES
	ZAPMISC()				! ZERO EVERYTHING ELSE
    END;

GLOBAL ROUTINE DELPSWRDS =
    BEGIN
	REGISTER
		NEXT,
		LINKPTR;
	MAP	FORMAT LINKPTR;

	LINKPTR _ .PASSWORDS<FORE>;			! RETURN THE MEMORY USED BY THE PASSWORDS
	WHILE .LINKPTR NEQ 0 DO
	    BEGIN
		NEXT _ .LINKPTR[ PW0FORE ];
		PMEM( .LINKPTR, PW0SIZE );
		LINKPTR _ .NEXT
	    END;
	PASSWORDS _ 0
    END;

ROUTINE DELTRCODES =
    BEGIN
	MAP	FORMAT SON;
	MAP	FORMAT SOFF;
	MAP	FORMAT RDM;
	MAP	FORMAT RDMC;

	PMEM( .SON, .SON[ TR0SIZE ] );
	SON _ 0;
	PMEM( .SOFF, .SOFF[ TR0SIZE ] );
	SOFF _ 0;

	PMEM( .RDM, .RDM[ TR0SIZE ] );
	RDM _ 0;
	PMEM( .RDMC, .RDMC[ TR0SIZE ] );
	RDMC _ 0;
    END;
GLOBAL ROUTINE WHATMISC( TELL ) =
    BEGIN
	MAP ROOTFORMAT	JSPEC1;
	MAP ROOTFORMAT	MSPEC1;
	REGISTER	STATUS;


	STATUS _ GOOD;
	IF .TELL THEN
	    BEGIN
		IF NOT .MISCDEFFLAG THEN
		    BEGIN
			ERROR( 67 );
			RETURN BAD
		    END
		   ELSE
		    BEGIN
			IF ABS(.FSSIZE) GEQ 0 AND ABS(.FSSIZE) LSS 1152 THEN
			BEGIN
			   ERROR(126);
			   STATUS _ BAD
			END;
			IF (.INJOURNALLING OR .OUTJOURNALLING) AND (.JSPEC1[SB0DEVICE] OR .JSPEC1[SB0NAME] EQL 0) THEN
			  BEGIN
			    ERROR(127);
			    STATUS _ BAD;
			  END;
			IF .MPPLOGGING AND ( .MSPEC1[SB0DEVICE] OR .MSPEC1[SB0NAME] EQL 0) THEN
			  BEGIN
			    ERROR(128);
			    STATUS _ BAD;
			  END;
			IF .SON EQL 0 OR .SOFF EQL 0 OR .RDM EQL 0 OR .RDMC EQL 0 THEN
			BEGIN
			   ERROR(61);
			   STATUS _ BAD
			END;
		    END
	    END
	    ELSE	IF NOT .MISCDEFFLAG THEN MAKEMISC();

	.STATUS

    END;
FORWARD WCPASSWORDS;
COMMENT;

! ROUTINE WCMISC
! ======= ========
! THIS ROUTINE WRITES A COMPILE FILE FOR THE MISCELLANEOUS QUESTIONS
! IN ANY OTHER CATAGORY

GLOBAL ROUTINE WCMISC=
    BEGIN
	MAP	ROOTFORMAT FSFILESPEC;

	LOCAL
		A,
		B,
		C,
		ITOP;

	OUTPUT( '	TITLE	MCSCNF	MCS-10 CONFIGURATION FILE?M?J?IRADIX	10?M?J?ISALL?M?J?M?J' );
	OUTPUT( '	SEARCH	MCSS?M?J?M?J' );
	OUTPUT('        $VRCHK(^O');	!SET UP TO CHECK VERSION NUMBERS
	OUTPUTO(.VER<VMAJOR>);		!TO MAKE SURE THEY AGREE
	OUTPUT(')?M?J');

	OUTPUT( '	SUBTTL	MISC?M?J' );
	OUTPUTCRLF;

	OUTPUT( 'MCSNAM::	GETNAM(' );
	XOUTPUT( SYSNAME<36,7> );
	OUTPUT( ', SYSNAMLEN, SYSTEM NAME )?M?J?IZ?M?J' );
	OUTPUTCRLF;

	OUTPUT( '	MAXJSN==:^D' );
	OUTPUTD( .MAXSLOTS );
	OUTPUT('	;NUMBER OF JOB SLOT NUMBERS AVAILABLE?M?J');

	OUTPUT(';  OUTPUT AND INPUT JOURNALLING?M?JOLOGGING:: ');
	OUTPUTB( .OUTJOURNALLING );
	OUTPUT('?M?JILOGGING:: ');
	OUTPUTB( .INJOURNALLING );
	OUTPUTCRLF;
	OUTPUT( 'JORCUR::0			; CURRENT?M?JJORSPC::IAUDPRIM		; PRIMARY AUDIT FILE?M?J' );
	OUTPUT( '	IAUDSEC			; SECONDARY AUDIT FILE?M?J?M?J	; FILE SPECS FOR IAUDING DEVICES?M?J' );
	OUTPUT( 'IAUDPRIM:?M?J' );
	OUTPUTFB( JSPEC1 );
	OUTPUTCRLF;
	OUTPUT( 'IAUDSEC:?M?J' );
	OUTPUTFB( JSPEC2 );
	OUTPUTCRLF;

	OUTPUT( 'MLOGGING::	');
	OUTPUTB( .MPPLOGGING );
	OUTPUTCRLF;
	OUTPUT( 'LOGCUR::0			; CURRENT?M?JLOGSPC::MLOGPRIM		; PRIMARY MPP LOGGING FILE?M?J' );
	OUTPUT( '	MLOGSEC	; SECONDARY SPEC?M?J?M?J	; FILE SPECS FOR MLOGGING DEVICES?M?J' );
	OUTPUT( 'MLOGPRIM:?M?J' );
	OUTPUTFB( MSPEC1 );
	OUTPUT( 'MLOGSEC:?M?J' );
	OUTPUTFB( MSPEC2 );
	OUTPUTCRLF;

	OUTPUT( 'CHECKPOINTING:: ');
	OUTPUTB( .FAILSOFT );
	OUTPUTCRLF;

	OUTPUT( 'ROLLING::	');
	OUTPUTB( .ROLLING );
	OUTPUTCRLF;
	OUTPUT( '	0			; CURRENT?M?J	FSPRIM			; FAILSOFT/ROLLING FILE?M?J' );
	OUTPUT( '	0			?M?J?M?J	; FILE SPECS FOR FAILSOFT/ROLLING DEVICES?M?J' );
	OUTPUT( 'FSPRIM::?M?J' );
	IF .FSFILESPEC[SB0DEVICE] EQL 0 AND
		.FSFILESPEC[SB0NAME] EQL 0 THEN OUTPUTFB( PLIT(	SIXBIT 'DSK', SIXBIT 'MCS', SIXBIT 'QQQ', 0 ) )
		ELSE OUTPUTFB( FSFILESPEC );
	OUTPUTCRLF;

	OUTPUT( 'FSSIZE::	');
	OUTPUTD( .FSSIZE );
	OUTPUTCRLF;

	OUTPUT( 'SDMO::	');
	OUTPUTD( .SDMOQ );
	OUTPUTCRLF;

	OUTPUT( 'PIGGYB::	');
	OUTPUTD( .PBQUOTA );
	OUTPUTCRLF;

	OUTPUT( 'TRCLEN::	');
	OUTPUTD( .TRCLEN );
	OUTPUTCRLF;

	OUTPUT( 'TRCSIZ==');
	OUTPUTD( .TRCLEN );
	OUTPUTCRLF;

	OUTPUT( 'TRCDEL::	XWD	');
	OUTPUTB( .TRCDL );
	OUTPUTCOMMA;
	OUTPUTSTR( TRCDLC, 1 );
	OUTPUTCRLF;

	OUTPUT( 'TRCW::	<<');
	OUTPUTD( .TRCLEN );
	OUTPUT( '-1>/5>+1' );
	OUTPUTCRLF;

	OUTPUT( 'FILLRB::	');
	OUTPUTD(.SOTRC);
	OUTPUT('?I;STARTING POSITION OF TRCODE?M?J');

	OUTPUT( 'FILLRC::	');
	OUTPUTD( ( C _ .SOT - ( .SOTRC + .TRCLEN ) ) );
	OUTPUT('?I;SPACE BETWEEN TRCODE AND START OF TEXT?M?J?M?J');

	OUTPUT( '; ASCII CODES FOR THE END INDICATORS?M?J' );
	OUTPUT( 'ESI==:^O');
	OUTPUTO( .ESI );
	OUTPUTCRLF;

	OUTPUT( 'EMI==:^O');
	OUTPUTO( .EMI );
	OUTPUTCRLF;

	OUTPUT( 'EGI==:^O');
	OUTPUTO( .EGI );
	OUTPUTCRLF;

	OUTPUT( 'EPI==:^O');
	OUTPUTO( .EPI );
	OUTPUTCRLF;

	OUTPUT( 'IBASE::	4?M?JITOP::	' );
	ITOP _ 4 + ( ( .LL + 1 ) / 2 ) / PTLSIZE;
	OUTPUTD( .ITOP );
	OUTPUT( '?M?J?M?JOBASE::	' );
	OUTPUTD( .ITOP + 1 );
	OUTPUT( '?M?JOTOP::	' );
	OUTPUTD( .ITOP + 1 + ( .TRMCOUNT / 2 ) / PTLSIZE );
	OUTPUTCRLF;

	OUTPUT( '?L?ISUBTTL MESSAGE CLASS TABLES?M?J?M?J' );
	OUTPUT('?I%MCNT=0?M?JMCLASS::?I%MCLASS(' );
	XOUTPUT( MC0IMMEDIATE );
	OUTPUT( ')	; IMMEDIATE MODE?M?J	%MCLASS(' );
	XOUTPUT( MC0DFERRED );
	OUTPUT( ')	; DEFERRED MODE?M?J	%MCLASS(' );
	XOUTPUT( MC0ALL );
	OUTPUT( ')		; BROADCAST MODE?M?J?M?JMCOUNT::	<%MCNT-1>*2?M?J' );
	OUTPUT( '?M?JMDEFAULT::	' );
	OUTPUTD( .MC0DFAULT );
	OUTPUT( '		; IMMEDIATE IS DEFAULT?M?J' );

	OUTPUT( '?L?ISUBTTL PASSWORDS?M?J' );
	OUTPUT( '?M?J?IPCOUNT=0?M?J' );
	OUTPUTCRLF;

	OUTPUT( 'PSWRDTAB::?M?J' );
	WCPASSWORDS();
	OUTPUTCRLF;
	OUTPUT( 'PSWRDCOUNT::?M?J' );
	OUTPUT( '?IEXP	PCOUNT?M?J' );

	OUTPUT( '?L	SUBTTL	JOB TABLES FOR THE KERNEL?M?J?M?J' );
	OUTPUT( '	$JBTBL?M?J' );

    END;
COMMENT;

! ROUTINE WCPASSWORDS
! ======= ===========
! THIS ROUTINE OUTPUTS THE PASSWORDS

ROUTINE WCPASSWORDS=
    BEGIN
	REGISTER PSWRDPTR;
	MAP	FORMAT PSWRDPTR;

	PSWRDPTR _ .PASSWORDS<FORE>;
	WHILE .PSWRDPTR NEQ 0 DO
	    BEGIN
		OUTPUT('	PASSWORD(' );
		XOUTPUT( PSWRDPTR[PW0WORD] );
		OUTPUT( ')?M?J' );
		PSWRDPTR _ .PSWRDPTR[PW0FORE]
	    END
    END;
GLOBAL ROUTINE ZAPMISC =
    BEGIN

	MISCDEFFLAG _ FALSE;			! MISC ISN'T DEFINED ANYMORE

	ZERO( SYSNAME, SYSNAME + SYSNAMELEN / 5 + 1 );

	MAXSLOTS _ 0;
	PASSWORDS _ 0;
	PBQUOTA _ 0;
	ZERO( MC0ALL, MC0ALL + MC0SIZE );
	ZERO( MC0DFERRED, MC0DFERRED + MC0SIZE );
	ZERO( MC0IMMEDIATE, MC0IMMEDIATE + MC0SIZE );
	MC0DFAULT _ 0;

	SOT _ 0;
	SOTRC _ 0;
	TRCLEN _ 0;
	TRCSIZE _ 0;
	TRCDL _ 0;
	TRCDLC _ 0;

	SDMOQ _ 0;

	GOTCODE _ 0;

	SON _ 0;
	SOFF _ 0;
	RDM _ 0;
	RDMC _ 0;

	FSSIZE _ 0;



	INJOURNALLING _ 0;
	OUTJOURNALLING _ 0;
	ZERO( JSPEC1, JSPEC1 + SPECBLKLEN );
	ZERO( JSPEC2, JSPEC2 + SPECBLKLEN );

	MPPLOGGING _ 0;
	ZERO( MSPEC1, MSPEC1 + SPECBLKLEN );
	ZERO( MSPEC2, MSPEC2 + SPECBLKLEN );

	FAILSOFT _ 0;
	ROLLING _ 0;
	ZERO( FSFILESPEC, FSFILESPEC + SPECBLKLEN );

	ESI _ 0;
	EMI _ 0;
	EGI _ 0;
	EPI _ 0;
    END;
COMMENT;

! ROUTINE WCORMISC
! ======= ========
! THIS ROUTINE WRITES THE MISCELLANEOUS JUNK

GLOBAL ROUTINE WCORMISC =
    BEGIN
	PUTWORD ( .MISCDEFFLAG );			! MISC ISN'T DEFINED ANYMORE

	PUTBLK( SYSNAME, SYSNAME + SYSNAMELEN / 5 + 1 );

	PUTWORD ( .MAXSLOTS );
	PUTWORD	(0);	     !HIST:PHYSCORE
	PUTWORD ( .PASSWORDS );
	PUTWORD ( .PBQUOTA );
	PUTBLK( MC0ALL, MC0ALL + MC0SIZE );
	PUTBLK( MC0DFERRED, MC0DFERRED + MC0SIZE );
	PUTBLK( MC0IMMEDIATE, MC0IMMEDIATE + MC0SIZE );
	PUTWORD ( .MC0DFAULT );

	PUTWORD ( .SOT );
	PUTWORD ( .SOTRC );
	PUTWORD ( .TRCLEN );
	PUTWORD ( .TRCSIZE );
	PUTWORD ( .TRCDL );
	PUTWORD ( .TRCDLC );
	PUTWORD	(0)	;		!HIST:SOTID
	PUTWORD(0)	;		!HIST:TIDLEN
	PUTWORD(0);			!HIST:TIDEL
	PUTWORD(0);			!HIST:TIDELC

	PUTWORD ( .SDMOQ );

	PUTBLK( HIST31, HIST31+ M0NAMELEN );	!HIST:ERRMPR
	PUTWORD( .GOTCODE );
	PUTWORD(0);		!HIST:GOTLEAF

	PUTWORD(0);		!HIST:SONGIVEN
	PUTWORD( .SON );
	PUTWORD(0);		!HIST:SNLFGIVEN
	PUTBLK(HIST13,HIST13 + N0NAMELEN);	!HIST:SNLF
	PUTWORD(0);		!HIST:SNMPRGIVEN
	PUTBLK( HIST14,HIST14+ M0NAMELEN);	!HIST:SNMPR
	PUTWORD(0);		!HIST:SOFFGIVEN
	PUTWORD( .SOFF );
	PUTWORD(0);		!HIST SFLFGIVEN
	PUTBLK(HIST17,HIST17+N0NAMELEN);	!HIST:SFLG
	PUTWORD(0);		!HIST:SFMPRGIVEN
	PUTBLK( HIST19,HIST19 + M0NAMELEN);	!HIST:SFMPR
	PUTWORD(0);			!HIST:RLFGIVEN
	PUTBLK(HIST21,HIST21+ N0NAMELEN);	!HIST:RLF
	PUTWORD(0);			!HIST:RMPRGIVEN
	PUTBLK(HIST23, HIST23 + M0NAMELEN);	!HIST:RMPR
	PUTWORD(0);			!HIST:RDMGIVEN
	PUTWORD( .RDM );
	PUTWORD(0);			!HIST:RCLFGIVEN
	PUTBLK(HIST26,HIST26+ N0NAMELEN);	!HIST:RCLF
	PUTWORD(0);			!HIST:RCMPRGIVEN
	PUTBLK(HIST28,HIST28+M0NAMELEN);	!HIST:RCMPR
	PUTWORD(0);			!HIST:RDMCGIVEN
	PUTWORD( .RDMC );

	PUTWORD( .FSSIZE );

	PUTWORD(0);		!HIST:MAXCPS
	PUTWORD(0);		!HIST:MAXSPM
	PUTWORD(0);		!HIST:MAXMPG

	PUTBLK( HIST30,HIST30+ N0NAMELEN);	!HIST:ERRLEAF

	PUTWORD (0);		! USED TO BE .JOURNALLING, LEFT FOR
				! COMPATABILITY WITH OLD BIN FILES
	PUTWORD ( .INJOURNALLING );
	PUTWORD ( .OUTJOURNALLING );
	PUTBLK( JSPEC1, JSPEC1 + SPECBLKLEN );
	PUTBLK( JSPEC2, JSPEC2 + SPECBLKLEN );

	PUTWORD( .MPPLOGGING );
	PUTBLK( MSPEC1, MSPEC1 + SPECBLKLEN );
	PUTBLK( MSPEC2, MSPEC2 + SPECBLKLEN );

	PUTWORD ( .FAILSOFT );
	PUTWORD ( .ROLLING );
	PUTBLK( FSFILESPEC, FSFILESPEC + SPECBLKLEN );

	PUTWORD( .ESI );
	PUTWORD( .EMI );
	PUTWORD( .EGI );
	PUTWORD( .EPI );
    END;
COMMENT;

! ROUTINE RCORMISC
! ======= ========
! THIS ROUTINE READS THE MISCELLANEOUS JUNK

GLOBAL ROUTINE RCORMISC =
    BEGIN
	MISCDEFFLAG _ GETWORD();			! MISC ISN'T DEFINED ANYMORE

	GETBLK( SYSNAME, SYSNAME + SYSNAMELEN / 5 + 1 );

	MAXSLOTS _ GETWORD();
	GETWORD();	     ! EAT THE WORD THAT USED TO BE PHYSCORE
	PASSWORDS _ GETWORD();
	PBQUOTA _ GETWORD();
	GETBLK( MC0ALL, MC0ALL + MC0SIZE );
	GETBLK( MC0DFERRED, MC0DFERRED + MC0SIZE );
	GETBLK( MC0IMMEDIATE, MC0IMMEDIATE + MC0SIZE );
	MC0DFAULT _ GETWORD();

	SOT _ GETWORD();
	SOTRC _ GETWORD();
	TRCLEN _ GETWORD();
	TRCSIZE _ GETWORD();
	TRCDL _ GETWORD();
	TRCDLC _ GETWORD();
	GETWORD	(0)	;		!HIST:SOTID
	GETWORD(0)	;		!HIST:TIDLEN
	GETWORD(0);			!HIST:TIDEL
	GETWORD(0);			!HIST:TIDELC

	 SDMOQ _ GETWORD ();

	GETBLK( HIST31, HIST31+ M0NAMELEN );	!HIST:ERRMPR
	GOTCODE _ GETWORD();
	GETWORD(0);		!HIST:GOTLEAF

	GETWORD(0);		!HIST:SONGIVEN
	SON _ GETWORD();
	GETWORD(0);		!HIST:SNLFGIVEN
	GETBLK(HIST13,HIST13 + N0NAMELEN);	!HIST:SNLF
	GETWORD(0);		!HIST:SNMPRGIVEN
	GETBLK( HIST14,HIST14+ M0NAMELEN);	!HIST:SNMPR
	GETWORD(0);		!HIST:SOFFGIVEN
	SOFF _ GETWORD();
	GETWORD(0);		!HIST SFLFGIVEN
	GETBLK(HIST17,HIST17+N0NAMELEN);	!HIST:SFLG
	GETWORD(0);		!HIST:SFMPRGIVEN
	GETBLK( HIST19,HIST19 + M0NAMELEN);	!HIST:SFMPR
	GETWORD(0);			!HIST:RLFGIVEN
	GETBLK(HIST21,HIST21+ N0NAMELEN);	!HIST:RLF
	GETWORD(0);			!HIST:RMPRGIVEN
	GETBLK(HIST23, HIST23 + M0NAMELEN);	!HIST:RMPR
	GETWORD(0);			!HIST:RDMGIVEN
	RDM _ GETWORD();
	GETWORD(0);			!HIST:RCLFGIVEN
	GETBLK(HIST26,HIST26+ N0NAMELEN);	!HIST:RCLF
	GETWORD(0);			!HIST:RCMPRGIVEN
	GETBLK(HIST28,HIST28+M0NAMELEN);	!HIST:RCMPR
	GETWORD(0);			!HIST:RDMCGIVEN
	RDMC _ GETWORD();

	GETWORD( .FSSIZE );

	GETWORD();		!HIST:MAXCPS
	GETWORD();		!HIST:MAXSPM
	GETWORD();		!HIST:MAXMPG

	GETBLK( HIST30,HIST30+ N0NAMELEN);	!HIST:ERRLEAF

	GETWORD();		! EAT A ZERO, USED TO BE JOURNALLING
				! LEFT FOR DOWNWARD COMPATABILITY
	INJOURNALLING _ GETWORD();
	OUTJOURNALLING _ GETWORD();
	GETBLK( JSPEC1, JSPEC1 + SPECBLKLEN );
	GETBLK( JSPEC2, JSPEC2 + SPECBLKLEN );

	MPPLOGGING _ GETWORD();
	GETBLK( MSPEC1, MSPEC1 + SPECBLKLEN );
	GETBLK( MSPEC2, MSPEC2 + SPECBLKLEN );

	FAILSOFT _ GETWORD();
	ROLLING _ GETWORD();
	GETBLK( FSFILESPEC, FSFILESPEC + SPECBLKLEN );

	ESI _ GETWORD();
	EMI _ GETWORD();
	EGI _ GETWORD();
	EPI _ GETWORD();

    END;



END;

! END OF MGNMIS.BLI