

; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE INIVOL (

;	0002			MAIN = INIT_VOLUME,

;	0003			LANGUAGE (BLISS32),

;	0004			IDENT = 'X0009'

;	0005			) =

;	0006	BEGIN

;	0007	

;	0008	!

;	0009	! Copyright (c) 1977

;	0010	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0011	!

;	0012	! This software is furnished  under a license for use only on a single

;	0013	! computer  system and  may be  copied only with  the inclusion of the

;	0014	! above copyright notice.  This software, or any other copies thereof,

;	0015	! may not be provided or  otherwise made available to any other person

;	0016	! except for use on such system and to one who agrees to these license

;	0017	! terms.  Title to and  ownership of the  software  shall at all times

;	0018	! remain in DEC.

;	0019	!

;	0020	! The information in this software is subject to change without notice

;	0021	! and should  not be construed  as a commitment  by Digital  Equipment

;	0022	! Corporation.

;	0023	!

;	0024	! DEC assumes  no  responsibility  for  the use or  reliability of its

;	0025	! software on equipment which is not supplied by DEC.

;	0026	

;	0027	!++

;	0028	!

;	0029	! FACILITY:  INIT Utility Structure Level 2

;	0030	!

;	0031	! ABSTRACT:

;	0032	!

;	0033	!	This is the main program for the INITIALIZE volume utility.

;	0034	!

;	0035	! ENVIRONMENT:

;	0036	!

;	0037	!	STARLET operating system, including privileged system services

;	0038	!	and internal exec routines.

;	0039	!

;	0040	!--

;	0041	!

;	0042	!

;	0043	! AUTHOR:  Andrew C. Goldstein,	 CREATION DATE:  9-Nov-1977  18:17

;	0044	!

;	0045	! REVISION HISTORY:

;	0046	!

;	0047	!   D. H. Gillespie, 16-Dec-1977  12:20

;	0048	!   X0002 - RETURN ERROR CODE IN MECHANISM PARAMETER

;	0049	!

;	0050	!   Andrew C. Goldstein, 17-Feb-1978  15:08

;	0051	!   X0003 - Default volume owner name correctly

;	0052	!

;	0053	!   Andrew C. Goldstein, 29-Mar-1978  17:16

;	0054	!   X0004 - Remove generic device search

;	0055	!



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 1-1

; Digital Equipment Corporation

;

;	0056	!   Andrew C. Goldstein, 15-May-78  16:06

;	0057	!   X0005 - Clear software volume valid on failure

;	0058	!

;	0059	!   Andrew C. Goldstein, 14-Jun-78  17:48

;	0060	!   X0006 - Send errors out via resignal rather than unwind

;	0061	!

;	0062	!   Andrew C. Goldstein, 18-Jul-78  21:15

;	0063	!   X0007 - Propagate random facility codes through signal

;	0064	!

;	0065	!   D. H. Gillespie, 19-Jul-78  15:45

;	0066	!   X0008 - make init options 64 bits

;	0067	!

;	0068	!   Andrew C. Goldstein, 15-Aug-78  15:22

;	0069	!   X0009 - Change name of MOUNT message file

;	0070	!

;	0071	!**

;	0072	

;	0073	

;	0074	LIBRARY 'SYS$LIBRARY:LIB.L32';

;	0075	REQUIRE 'SRC$:INIDEF.B32';

;	0337	REQUIRE 'LIBD$:[VMSLIB.OBJ]MOUNTMSG.REQ';

;	0437	REQUIRE 'LIBD$:[VMSLIB.OBJ]INITMSG.B32';

;	0497	

;	0498	

;	0499	FORWARD ROUTINE

;	0500		INIT_VOLUME,			! main program

;	0501		MAIN_HANDLER;			! condition handler



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 2

; Digital Equipment Corporation

;

;	0502	!+

;	0503	!

;	0504	! General impure storage for the INIT utility.

;	0505	!

;	0506	!-

;	0507	

;	0508	GLOBAL LITERAL

;	0509		NAMEBUF_LEN	= 32,		! length of device name buffer

;	0510		DEVCHAR_LEN	= 32,		! length of device characteristics buffer

;	0511		USERNAME_LEN	= 12;		! maximum length of user name string

;	0512	

;	0513	GLOBAL

;	0514		CHANNEL,			! channel for all I/O

;	0515		PROCESS_UIC,			! UIC of this process

;	0516		DEVICE_CHAR	: BBLOCK [DEVCHAR_LEN],

;	0517						! buffer for device characteristics

;	0518		PHYS_NAME	: VECTOR [2],	! physical device name descriptor

;	0519		NAME_BUFFER	: VECTOR [NAMEBUF_LEN, BYTE],

;	0520						! buffer for physical device name

;	0521		USER_STRING	: VECTOR [USERNAME_LEN, BYTE];

;	0522						! buffer for user name string

;	0523	

;	0524	OWN

;	0525		DEVCHAR_DESC	: VECTOR [2] INITIAL (DEVCHAR_LEN, DEVICE_CHAR);

;	0526						! descriptor for device characteristics



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 3

; Digital Equipment Corporation

;

;	0527	GLOBAL ROUTINE INIT_VOLUME (START_ADDRESS, CLI_CALLBACK) =

;	0528	

;	0529	!++

;	0530	!

;	0531	! FUNCTIONAL DESCRIPTION:

;	0532	!

;	0533	!	This is the main routine of the INITIALIZE volume utility.

;	0534	!

;	0535	!

;	0536	! CALLING SEQUENCE:

;	0537	!	INIT_VOLUME (ARG1, ARG2)

;	0538	!

;	0539	! INPUT PARAMETERS:

;	0540	!	ARG1: program start address

;	0541	!	ARG2: CLI service callback address

;	0542	!

;	0543	! IMPLICIT INPUTS:

;	0544	!	NONE

;	0545	!

;	0546	! OUTPUT PARAMETERS:

;	0547	!	NONE

;	0548	!

;	0549	! IMPLICIT OUTPUTS:

;	0550	!	NONE

;	0551	!

;	0552	! ROUTINE VALUE:

;	0553	!	assorted status values

;	0554	!

;	0555	! SIDE EFFECTS:

;	0556	!	volume initialized

;	0557	!

;	0558	!--

;	0559	

;	0560	BEGIN

;	0561	

;	0562	LOCAL

;	0563		P,				! string scan pointer

;	0564		STATUS,				! system service status

;	0565		DEVICE_NAME	: VECTOR [2];	! device name descriptor

;	0566	

;	0567	EXTERNAL

;	0568		INIT_OPTIONS	: BITVECTOR,	! parser option flags

;	0569		DEVICE_STRING	: VECTOR,	! device name string descriptor

;	0570		LABEL_STRING	: VECTOR,	! volume label string descriptor

;	0571		USER_NAME	: VECTOR;	! user name string descriptor

;	0572	

;	0573	EXTERNAL ROUTINE

;	0574		INIT_PARSE,			! command parser

;	0575		TRAN_LOGNAME,			! translate logical name

;	0576		INIT_TAPE,			! initialize magtape

;	0577		INIT_DISK;			! initialize disk

;	0578	

;	0579	BIND OPTIONS = INIT_OPTIONS : VECTOR;

;	0580	

;	0581	ENABLE MAIN_HANDLER;



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 3-1

; Digital Equipment Corporation

;

;	0582	

;	0583	! Get the UIC of this process for use in defaulting volume ownership.

;	0584	!

;	0585	

;	0586	$GETJPI (ITMLST = UPLIT (WORD (4), WORD (JPI$_UIC),

;     P 0587				 LONG (PROCESS_UIC, 0, 0)));

;	0588	

;	0589	USER_NAME[1] = USER_STRING;

;	0590	$GETJPI (ITMLST = UPLIT (WORD (USERNAME_LEN), WORD (JPI$_USERNAME),

;     P 0591				 LONG (USER_STRING, USER_NAME[0], 0)));

;	0592	

;	0593	! Parse the command line. Errors are signalled.

;	0594	!

;	0595	

;	0596	CHANNEL = 0;

;	0597	

;	0598	INIT_PARSE (.CLI_CALLBACK);

;	0599	

;	0600	! First allocate the volume and assign a channel to it. Allocating does most

;	0601	! of the checking that we in fact have a right to touch this device.

;	0602	! Note that we append a zero to the device name if a unit number is not

;	0603	! present. This prevents a generic device search, which is not desirable

;	0604	! in doing an INIT.

;	0605	!

;	0606	

;	0607	DEVICE_NAME[0] = NAMEBUF_LEN;

;	0608	DEVICE_NAME[1] = NAME_BUFFER;

;	0609	TRAN_LOGNAME (DEVICE_STRING[0], DEVICE_NAME[0]);

;	0610	

;	0611	P = CH$FIND_CH (.DEVICE_NAME[0], .DEVICE_NAME[1], ':');

;	0612	IF CH$FAIL (.P)

;	0613	THEN P = .DEVICE_NAME[0] + .DEVICE_NAME[1];

;	0614	IF CH$RCHAR (.P-1) LSSU '0' OR CH$RCHAR (.P-1) GTRU '9'

;	0615	THEN

;	0616	    BEGIN

;	0617	    CH$WCHAR_A ('0', P);

;	0618	    CH$WCHAR_A (':', P);

;	0619	    DEVICE_NAME[0] = .DEVICE_NAME[0] + 1;

;	0620	    END;

;	0621	

;	0622	PHYS_NAME[0] = NAMEBUF_LEN;

;	0623	PHYS_NAME[1] = NAME_BUFFER;

;	0624	STATUS = $ALLOC (DEVNAM = DEVICE_NAME[0],

;     P 0625			 PHYLEN = PHYS_NAME[0],

;     P 0626			 PHYBUF = PHYS_NAME[0]);

;	0627	IF NOT .STATUS THEN ERR_EXIT (.STATUS);

;	0628	

;	0629	STATUS = $ASSIGN (DEVNAM = PHYS_NAME[0],

;     P 0630			  CHAN   = CHANNEL);

;	0631	IF NOT .STATUS THEN ERR_EXIT (.STATUS);

;	0632	

;	0633	! Get the device characteristics and make sure that the device can be

;	0634	! initialized - i.e., that it is file oriented, etc.

;	0635	!

;	0636	



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 3-2

; Digital Equipment Corporation

;

;	0637	$GETCHN (CHAN = .CHANNEL, PRIBUF = DEVCHAR_DESC);

;	0638	

;	0639	IF NOT .DEVICE_CHAR[DEV$V_FOD]

;	0640	THEN ERR_EXIT (SS$_NOTFILEDEV);

;	0641	

;	0642	IF NOT .DEVICE_CHAR[DEV$V_AVL]

;	0643	THEN ERR_EXIT (SS$_DEVOFFLINE);

;	0644	

;	0645	IF .DEVICE_CHAR[DEV$V_MNT]

;	0646	THEN ERR_EXIT (SS$_DEVMOUNT);

;	0647	

;	0648	IF

;	0649	    BEGIN

;	0650	    IF .DEVICE_CHAR[DEV$V_SQD]

;	0651	    THEN

;	0652		((.OPTIONS[0] AND NOT TAPE_OPTIONS) NEQ 0

;	0653		OR (.OPTIONS[1] AND NOT TAPE_OPTIONS2) NEQ 0 )

;	0654	    ELSE

;	0655		((.OPTIONS[0] AND NOT DISK_OPTIONS) NEQ 0

;	0656		OR (.OPTIONS[1] AND NOT DISK_OPTIONS2) NEQ 0 )

;	0657	    END

;	0658	THEN ERR_EXIT (INIT$_ILLOPT);

;	0659	

;	0660	! Now initialize the volume, depending on its type.

;	0661	!

;	0662	

;	0663	IF .DEVICE_CHAR[DEV$V_SQD]

;	0664	THEN

;	0665	    INIT_TAPE ()

;	0666	ELSE

;	0667	    INIT_DISK ();

;	0668	

;	0669	$DASSGN (CHAN = .CHANNEL);

;	0670	$DALLOC (DEVNAM = PHYS_NAME);

;	0671	

;	0672	RETURN 1;

;	0673	

;	0674	END;					! end of routine INIT_VOLUME





							    .TITLE  INIVOL

							    .IDENT  \X0009\



							    .PSECT  $PLIT$,NOWRT,NOEXE,2



					      00000 P.AAA:  .WORD   4							      ;

					      00002 	    .WORD   772							      ;

					      00004 	    .ADDRESS  PROCESS_UIC					      ;

					      00008 	    .LONG   0, 0						      ;

					      00010 P.AAB:  .WORD   12							      ;

					      00012 	    .WORD   514							      ;

					      00014 	    .ADDRESS  USER_STRING , USER_NAME				      ;

					      0001C 	    .LONG   0							      ;



							    .PSECT  $OWN$,NOEXE,2



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 3-3

; Digital Equipment Corporation

;



					      00000 DEVCHAR_DESC:

							    .LONG   32							      ;

					      00004 	    .ADDRESS  DEVICE_CHAR					      ;



							    .PSECT  $GLOBAL$,NOEXE,2



					      00000 CHANNEL::

							    .BLKB   4

					      00004 PROCESS_UIC::

							    .BLKB   4

					      00008 DEVICE_CHAR::

							    .BLKB   32

					      00028 PHYS_NAME::

							    .BLKB   8

					      00030 NAME_BUFFER::

							    .BLKB   32

					      00050 USER_STRING::

							    .BLKB   12



						    NAMEBUF_LEN==	32

						    DEVCHAR_LEN==	32

						    USERNAME_LEN==	12

							    .GLOBL  INIT_OPTIONS, DEVICE_STRING, LABEL_STRING, USER_NAME

							    .GLOBL  INIT_PARSE, TRAN_LOGNAME, INIT_TAPE, INIT_DISK

							    .GLOBL  SYS$GETJPI, SYS$ALLOC, SYS$ASSIGN, SYS$GETCHN

							    .GLOBL  SYS$DASSGN, SYS$DALLOC



							    .PSECT  $CODE$,NOWRT,2



					 0E04 00000 	    .ENTRY  INIT_VOLUME, Save R2,R9,R10,R11			      ; 0527

		         59 00000000G  9F  9E 00002 	    MOVAB   @#SYS$GETJPI, R9					      ;

		         5A 00000000G  00  9E 00009 	    MOVAB   LIB$STOP, R10					      ;

		         5B	0000'  CF  9E 00010 	    MOVAB   PHYS_NAME, R11					      ;

		         5E	       08  C2 00015 	    SUBL2   #8, SP						      ;

		         6D 0000013C   EF  DE 00018 	    MOVAL   16$, (FP)						      ; 0560

				       7E  7C 0001F 	    CLRQ    -(SP)						      ; 0587

				       7E  D4 00021 	    CLRL    -(SP)						      ;

				0000'  CF  9F 00023 	    PUSHAB  P.AAA						      ;

				       7E  7C 00027 	    CLRQ    -(SP)						      ;

				       7E  D4 00029 	    CLRL    -(SP)						      ;

		         69	       07  FB 0002B 	    CALLS   #7, SYS$GETJPI					      ;

		  0000G  CF	  28   AB  9E 0002E 	    MOVAB   USER_STRING, USER_NAME+4				      ; 0589

				       7E  7C 00034 	    CLRQ    -(SP)						      ; 0591

				       7E  D4 00036 	    CLRL    -(SP)						      ;

				0000'  CF  9F 00038 	    PUSHAB  P.AAB						      ;

				       7E  7C 0003C 	    CLRQ    -(SP)						      ;

				       7E  D4 0003E 	    CLRL    -(SP)						      ;

		         69	       07  FB 00040 	    CALLS   #7, SYS$GETJPI					      ;

				  D8   AB  D4 00043 	    CLRL    CHANNEL						      ; 0596

				  08   AC  DD 00046 	    PUSHL   CLI_CALLBACK					      ; 0598

		  0000G  CF	       01  FB 00049 	    CALLS   #1, INIT_PARSE					      ;

		         6E	       20  D0 0004E 	    MOVL    #32, DEVICE_NAME					      ; 0607

		    04   AE	  08   AB  9E 00051 	    MOVAB   NAME_BUFFER, DEVICE_NAME+4				      ; 0608

				       5E  DD 00056 	    PUSHL   SP							      ; 0609



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 3-4

; Digital Equipment Corporation

;

				0000G  CF  9F 00058 	    PUSHAB  DEVICE_STRING					      ;

		  0000G  CF	       02  FB 0005C 	    CALLS   #2, TRAN_LOGNAME					      ;

      04   BE	         6E	       3A  3A 00061 	    LOCC    #58, DEVICE_NAME, @DEVICE_NAME+4			      ; 0611

				       02  12 00066 	    BNEQ    1$							      ;

				       51  D4 00068 	    CLRL    R1							      ;

		         50	       51  D0 0006A 1$:     MOVL    R1, P						      ;

				       05  12 0006D 	    BNEQ    2$							      ; 0612

	   50	         6E	  04   AE  C1 0006F 	    ADDL3   DEVICE_NAME+4, DEVICE_NAME, P			      ; 0613

		         30	  FF   A0  91 00074 2$:     CMPB    -1(P), #48						      ; 0614

				       06  1F 00078 	    BLSSU   3$							      ;

		         39	  FF   A0  91 0007A 	    CMPB    -1(P), #57						      ;

				       07  1B 0007E 	    BLEQU   4$							      ;

		         80	3A30   8F  B0 00080 3$:     MOVW    #14896, (P)+					      ; 0617

				       6E  D6 00085 	    INCL    DEVICE_NAME						      ; 0619

		         6B	       20  D0 00087 4$:     MOVL    #32, PHYS_NAME					      ; 0622

		    04   AB	  08   AB  9E 0008A 	    MOVAB   NAME_BUFFER, PHYS_NAME+4				      ; 0623

				       7E  D4 0008F 	    CLRL    -(SP)						      ; 0626

				       5B  DD 00091 	    PUSHL   R11							      ;

				       5B  DD 00093 	    PUSHL   R11							      ;

				  0C   AE  9F 00095 	    PUSHAB  DEVICE_NAME						      ;

	      00000000G  9F	       04  FB 00098 	    CALLS   #4, @#SYS$ALLOC					      ;

		         52	       50  D0 0009F 	    MOVL    R0, STATUS						      ;

		         05	       52  E8 000A2 	    BLBS    STATUS, 5$						      ; 0627

				       52  DD 000A5 	    PUSHL   STATUS						      ;

		         6A	       01  FB 000A7 	    CALLS   #1, LIB$STOP					      ;

				       7E  7C 000AA 5$:     CLRQ    -(SP)						      ; 0630

				  D8   AB  9F 000AC 	    PUSHAB  CHANNEL						      ;

				       5B  DD 000AF 	    PUSHL   R11							      ;

	      00000000G  9F	       04  FB 000B1 	    CALLS   #4, @#SYS$ASSIGN					      ;

		         52	       50  D0 000B8 	    MOVL    R0, STATUS						      ;

		         05	       52  E8 000BB 	    BLBS    STATUS, 6$						      ; 0631

				       52  DD 000BE 	    PUSHL   STATUS						      ;

		         6A	       01  FB 000C0 	    CALLS   #1, LIB$STOP					      ;

				       7E  7C 000C3 6$:     CLRQ    -(SP)						      ; 0637

				0000'  CF  9F 000C5 	    PUSHAB  DEVCHAR_DESC					      ;

				       7E  D4 000C9 	    CLRL    -(SP)						      ;

				  D8   AB  DD 000CB 	    PUSHL   CHANNEL						      ;

	      00000000G  9F	       05  FB 000CE 	    CALLS   #5, @#SYS$GETCHN					      ;

	   08	    E1   AB	       06  E0 000D5 	    BBS     #6, DEVICE_CHAR+1, 7$				      ; 0639

		         7E	01CC   8F  3C 000DA 	    MOVZWL  #460, -(SP)						      ; 0640

		         6A	       01  FB 000DF 	    CALLS   #1, LIB$STOP					      ;

	   07	    E2   AB	       02  E0 000E2 7$:     BBS     #2, DEVICE_CHAR+2, 8$				      ; 0642

		         7E	  84   8F  9A 000E7 	    MOVZBL  #132, -(SP)						      ; 0643

		         6A	       01  FB 000EB 	    CALLS   #1, LIB$STOP					      ;

	   07	    E2   AB	       03  E1 000EE 8$:     BBC     #3, DEVICE_CHAR+2, 9$				      ; 0645

		         7E	  6C   8F  9A 000F3 	    MOVZBL  #108, -(SP)						      ; 0646

		         6A	       01  FB 000F7 	    CALLS   #1, LIB$STOP					      ;

		         50	0000G  CF  D0 000FA 9$:     MOVL    OPTIONS+4, R0					      ; 0653

	   0F	    E0   AB	       05  E1 000FF 	    BBC     #5, DEVICE_CHAR, 10$				      ; 0650

	      B0FFDB98   8F	0000G  CF  D3 00104 	    BITL    OPTIONS, #-1325409384				      ; 0652

				       18  12 0010D 	    BNEQ    12$							      ;

				       50  D5 0010F 	    TSTL    R0							      ; 0653

				       12  11 00111 	    BRB     11$							      ;

	      48000023   8F	0000G  CF  D3 00113 10$:    BITL    OPTIONS, #1207959587				      ; 0655

				       09  12 0011C 	    BNEQ    12$							      ;



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 3-5

; Digital Equipment Corporation

;

	      FFFFFFFE   8F	       50  D3 0011E 	    BITL    R0, #-2						      ; 0656

				       09  13 00125 11$:    BEQL    13$							      ;

			    00758034   8F  DD 00127 12$:    PUSHL   #7700532						      ; 0658

		         6A	       01  FB 0012D 	    CALLS   #1, LIB$STOP					      ;

	   07	    E0   AB	       05  E1 00130 13$:    BBC     #5, DEVICE_CHAR, 14$				      ; 0663

		  0000G  CF	       00  FB 00135 	    CALLS   #0, INIT_TAPE					      ; 0665

				       05  11 0013A 	    BRB     15$							      ; 0663

		  0000G  CF	       00  FB 0013C 14$:    CALLS   #0, INIT_DISK					      ; 0667

				  D8   AB  DD 00141 15$:    PUSHL   CHANNEL						      ; 0669

	      00000000G  9F	       01  FB 00144 	    CALLS   #1, @#SYS$DASSGN					      ;

				       7E  D4 0014B 	    CLRL    -(SP)						      ; 0670

				       5B  DD 0014D 	    PUSHL   R11							      ;

	      00000000G  9F	       02  FB 0014F 	    CALLS   #2, @#SYS$DALLOC					      ;

		         50	       01  D0 00156 	    MOVL    #1, R0						      ; 0672

					   04 00159 	    RET     							      ; 0527

					 0000 0015A 16$:    .WORD   Save nothing					      ; 0560

				       7E  D4 0015C 	    CLRL    -(SP)						      ;

				       5E  DD 0015E 	    PUSHL   SP							      ;

		         7E	  04   AC  7D 00160 	    MOVQ    4(AP), -(SP)					      ;

		  0000V  CF	       03  FB 00164 	    CALLS   #3, MAIN_HANDLER					      ;

					   04 00169 	    RET     							      ;



; Routine Size:  362 bytes







; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 4

; Digital Equipment Corporation

;

;	0675	ROUTINE MAIN_HANDLER (SIGNAL, MECHANISM) =

;	0676	

;	0677	!++

;	0678	!

;	0679	! FUNCTIONAL DESCRIPTION:

;	0680	!

;	0681	!	This routine is the main level condition handler for the INIT

;	0682	!	utility. It cleans up and returns the error status to the caller

;	0683	!	(the CLI).

;	0684	!

;	0685	!

;	0686	! CALLING SEQUENCE:

;	0687	!	MAIN_HANDLER (ARG1, ARG2)

;	0688	!

;	0689	! INPUT PARAMETERS:

;	0690	!	ARG1: address of signal array

;	0691	!	ARG2: address of mechanism array

;	0692	!

;	0693	! IMPLICIT INPUTS:

;	0694	!	NONE

;	0695	!

;	0696	! OUTPUT PARAMETERS:

;	0697	!	NONE

;	0698	!

;	0699	! IMPLICIT OUTPUTS:

;	0700	!	NONE

;	0701	!

;	0702	! ROUTINE VALUE:

;	0703	!	SS$_RESIGNAL

;	0704	!

;	0705	! SIDE EFFECTS:

;	0706	!	cleanup done on unwind

;	0707	!

;	0708	!--

;	0709	

;	0710	BEGIN

;	0711	

;	0712	MAP

;	0713		SIGNAL		: REF BBLOCK,	! signal array

;	0714		MECHANISM	: REF BBLOCK;	! mechanism array

;	0715	

;	0716	EXTERNAL ROUTINE

;	0717		CLEAR_VALID;			! clear software volume valid

;	0718	

;	0719	

;	0720	

;	0721	IF .BBLOCK [SIGNAL[CHF$L_SIG_NAME], STS$V_FAC_NO] EQL 0

;	0722	OR .BBLOCK [SIGNAL[CHF$L_SIG_NAME], STS$V_FAC_NO] EQL MOUN$_FACILITY

;	0723	THEN BBLOCK [SIGNAL[CHF$L_SIG_NAME], STS$V_FAC_NO] = INIT$_FACILITY;

;	0724	

;	0725	IF .BBLOCK [SIGNAL[CHF$L_SIG_NAME], STS$V_SEVERITY] EQL STS$K_SEVERE

;	0726	THEN

;	0727	    BEGIN

;	0728	

;	0729	    IF .CHANNEL NEQ 0



; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 4-1

; Digital Equipment Corporation

;

;	0730	    THEN

;	0731		BEGIN

;	0732		KERNEL_CALL (CLEAR_VALID);

;	0733		$DASSGN (CHAN = .CHANNEL);

;	0734		CHANNEL = 0;

;	0735		END;

;	0736	

;	0737	    $DALLOC (DEVNAM = PHYS_NAME);

;	0738	

;	0739	    END;

;	0740	

;	0741	RETURN SS$_RESIGNAL;

;	0742	

;	0743	END;					! end of routine MAIN_HANDLER







							    .GLOBL  CLEAR_VALID, SYS$CMKRNL



					 0800 0016A MAIN_HANDLER:

							    .WORD   Save R11						      ; 0675

		         5B	0000'  CF  9E 0016C 	    MOVAB   CHANNEL, R11					      ;

		         50	  04   AC  D0 00171 	    MOVL    SIGNAL, R0						      ; 0721

		  0FFF   8F	  06   A0  B3 00175 	    BITW    6(R0), #4095					      ;

				       0C  13 0017B 	    BEQL    1$							      ;

      06   A0	         0C	       00  ED 0017D 	    CMPZV   #0, #12, 6(R0), #114				      ; 0722

			    00000072   8F     00182									      ;

				       0A  12 00187 	    BNEQ    2$							      ;

	   0C	         00 00000075   8F  F0 00189 1$:     INSV    #117, #0, #12, 6(R0)				      ; 0723

				  06   A0     00191									      ;

      04   A0	         03	       00  ED 00193 2$:     CMPZV   #0, #3, 4(R0), #4					      ; 0725

				       04     00198									      ;

				       2A  12 00199 	    BNEQ    4$							      ;

				       6B  D5 0019B 	    TSTL    CHANNEL						      ; 0729

				       1A  13 0019D 	    BEQL    3$							      ;

				       7E  D4 0019F 	    CLRL    -(SP)						      ; 0732

				       5E  DD 001A1 	    PUSHL   SP							      ;

				0000G  CF  9F 001A3 	    PUSHAB  CLEAR_VALID						      ;

	      00000000G  9F	       03  FB 001A7 	    CALLS   #3, @#SYS$CMKRNL					      ;

				       6B  DD 001AE 	    PUSHL   CHANNEL						      ; 0733

	      00000000G  9F	       01  FB 001B0 	    CALLS   #1, @#SYS$DASSGN					      ;

				       6B  D4 001B7 	    CLRL    CHANNEL						      ; 0734

				       7E  D4 001B9 3$:     CLRL    -(SP)						      ; 0737

				  28   AB  9F 001BB 	    PUSHAB  PHYS_NAME						      ;

	      00000000G  9F	       02  FB 001BE 	    CALLS   #2, @#SYS$DALLOC					      ;

		         50	0918   8F  3C 001C5 4$:     MOVZWL  #2328, R0						      ; 0741

					   04 001CA 	    RET     							      ; 0675



; Routine Size:  97 bytes





;	0744	

;	0745	END

;	0746	ELUDOM





; Bliss-32 7.352	Saturday 22-AUG-1978 00:16:54	DBB3:[INIT.SRC]INIVOL.B32;19					Page 4-2

; Digital Equipment Corporation

;







							    .GLOBL  LIB$STOP



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $GLOBAL$       	    92    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $OWN$          	     8    WRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $PLIT$         	    32  NOWRT,  RD ,NOEXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)

;  $CODE$         	   459  NOWRT,  RD ,  EXE,NOSHR,  LCL,  REL,  CON,NOPIC,ALIGN(2)









;				LIBRARY STATISTICS

;

;					     -------- Symbols --------    Blocks

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582        23         0       238











; Size:		459 code + 132 data bytes

; Run Time:	00:22.9

; Elapsed Time:	00:52.9

; Memory Used:	338 pages

; Compilation Complete

