

; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 1

;

;	0001	MODULE SNDERL (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0003'

;	0004			) =

;	0005	BEGIN

;	0006	

;	0007	!

;	0008	! Copyright (c) 1977

;	0009	! Digital Equipment Corporation, Maynard, Massachusetts 01754

;	0010	!

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

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

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

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

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

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

;	0017	! remain in DEC.

;	0018	!

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

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

;	0021	! Corporation.

;	0022	!

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

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

;	0025	

;	0026	!++

;	0027	!

;	0028	! FACILITY:  F11ACP Structure Level 1

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	This routine sends a message to the error logger to inform it of a

;	0033	!	volume mount or dismount.

;	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:  23-Jun-1978  18:47

;	0044	!

;	0045	! REVISION HISTORY:

;	0046	!

;	0047	!   D. H. Gillespie, 27-Jun-78  12:55

;	0048	!   A0002 - add magtape specific code

;	0049	!

;	0050	!   Andrew C. Goldstein, 17-Jul-78  10:12

;	0051	!   A0003 - Put code into locked PSECT

;	0052	!

;	0053	!**

;	0054	

;	0055	



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 1-1

;

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

;	0057	REQUIRE 'SRC$:FCPDEF.B32';

;	0376	

;	0377	!

;	0378	! This routine is called at raised IPL and must be locked into the working set.

;	0379	!

;	0380	

;	0381	LOCK_CODE;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 2

;

;	0382	GLOBAL ROUTINE SEND_ERRLOG (MODE, UCB) =

;	0383	

;	0384	!++

;	0385	!

;	0386	! FUNCTIONAL DESCRIPTION:

;	0387	!

;	0388	!	This routine sends a message to the error logger to inform it of a

;	0389	!	volume mount or dismount.

;	0390	!

;	0391	!

;	0392	! CALLING SEQUENCE:

;	0393	!	SEND_ERRLOG (ARG1, ARG2)

;	0394	!

;	0395	! INPUT PARAMETERS:

;	0396	!	ARG1: 1 to signal mount

;	0397	!	      0 to signal dismount

;	0398	!	ARG3: address of UCB

;	0399	!

;	0400	! IMPLICIT INPUTS:

;	0401	!	NONE

;	0402	!

;	0403	! OUTPUT PARAMETERS:

;	0404	!	NONE

;	0405	!

;	0406	! IMPLICIT OUTPUTS:

;	0407	!	NONE

;	0408	!

;	0409	! ROUTINE VALUE:

;	0410	!	1

;	0411	!

;	0412	! SIDE EFFECTS:

;	0413	!	Message sent to error logger

;	0414	!

;	0415	!--

;	0416	

;	0417	BEGIN

;	0418	

;	0419	MAP

;	0420		UCB		: REF BBLOCK;	! UCB argument

;	0421	

;	0422	LINKAGE

;	0423		L_ERL_ALLOC	= JSB (REGISTER = 1) :

;	0424				  GLOBAL (ADDRESS = 2)

;	0425				  NOTUSED (3, 4, 5, 6, 7, 8, 9, 10, 11),

;	0426	

;	0427		L_ERL_RELEASE	= JSB (REGISTER = 2) :

;	0428				  NOTUSED (3, 4, 5, 6, 7, 8, 9, 10, 11);

;	0429	

;	0430	LOCAL

;	0431		MSG_BUFFER	: REF BBLOCK;	! other buffer pointer to dodge MOVC

;	0432	

;	0433	EXTERNAL ROUTINE

;	0434		ERL$ALLOCEMB	: L_ERL_ALLOC ADDRESSING_MODE (GENERAL),

;	0435						! allocate error log buffer

;	0436		ERL$RELEASEMB	: L_ERL_RELEASE ADDRESSING_MODE (GENERAL);



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 2-1

;

;	0437						! release error log buffer

;	0438	

;	0439	

;	0440	! Allocate an errror log buffer. If this fails, forget it.

;	0441	!

;	0442	

;	0443	BEGIN

;	0444	GLOBAL REGISTER

;	0445		ADDRESS		= 2 : REF BBLOCK; ! pointer to error log buffer

;	0446	

;	0447	IF NOT ERL$ALLOCEMB (EMB$K_VM_LENGTH)

;	0448	THEN RETURN 1;

;	0449	MSG_BUFFER = .ADDRESS;

;	0450	END;

;	0451	

;	0452	! Now fill in the message buffer.

;	0453	!

;	0454	

;	0455	IF .MODE

;	0456	THEN MSG_BUFFER[EMB$W_VM_ENTRY] = EMB$K_VM

;	0457	ELSE MSG_BUFFER[EMB$W_VM_ENTRY] = EMB$K_VD;	! log entry type

;	0458	

;	0459	MSG_BUFFER[EMB$L_VM_OWNUIC]	= .UCB[UCB$L_OWNUIC];

;	0460	MSG_BUFFER[EMB$L_VM_ERRCNT]	= .UCB[UCB$W_ERRCNT];

;	0461	MSG_BUFFER[EMB$L_VM_OPRCNT]	= .UCB[UCB$L_OPCNT];

;	0462	MSG_BUFFER[EMB$W_VM_UNIT]	= .UCB[UCB$W_UNIT];

;	0463	

;	0464	MSG_BUFFER[EMB$W_VM_VOLNUM]	= 0;

;	0465	MSG_BUFFER[EMB$W_VM_NUMSET]	= 0;

;	0466	

;	0467	CH$MOVE (.(BBLOCK [.UCB[UCB$L_DDB], DDB$T_NAME])<0,8> + 1,

;	0468		 BBLOCK [.UCB[UCB$L_DDB], DDB$T_NAME],

;	0469		 MSG_BUFFER[EMB$B_VM_NAMLNG]);

;	0470	

;	0471	IF .BBLOCK[UCB[UCB$L_DEVCHAR],DEV$V_FOR]

;	0472	OR NOT .BBLOCK[UCB[UCB$L_DEVCHAR],DEV$V_SQD]

;	0473	THEN

;	0474	    CH$MOVE (VCB$S_VOLNAME,

;	0475		 BBLOCK [.UCB[UCB$L_VCB], VCB$T_VOLNAME],

;	0476		 MSG_BUFFER[EMB$T_VM_LABEL])

;	0477	ELSE

;	0478	    BEGIN

;	0479	    LOCAL

;	0480		MVL		: REF BBLOCK,		! magtape volume labels

;	0481		MVL_ENTRY	: REF BBLOCK,		! address of label entry

;	0482		RUN,					! relative unit number

;	0483		RVT		: REF BBLOCK,		! relative volume table

;	0484		UCBLIST		: REF VECTOR,		! address of UCB list

;	0485		VCB		: REF BBLOCK;		! volume control block

;	0486	    VCB = .UCB[UCB$L_VCB];

;	0487	    RVT = .VCB[VCB$L_RVT];

;	0488	    UCBLIST = RVT[RVT$L_UCBLST];

;	0489	    MVL = .VCB[VCB$L_MVL];

;	0490	    MSG_BUFFER[EMB$W_VM_NUMSET] = .MVL[MVL$B_NVOLS];	! no of volumes in vol set known

;	0491	    CH$FILL(' ',VCB$S_VOLNAME,MSG_BUFFER[EMB$T_VM_LABEL]);



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 2-2

;

;	0492	    INCR I FROM 0 TO .RVT[RVT$B_NVOLS] - 1 DO

;	0493		BEGIN

;	0494		RUN = .I;

;	0495		IF .UCBLIST[.I] EQL .UCB THEN EXITLOOP;

;	0496		END;

;	0497	    MVL_ENTRY = .MVL + MVL$K_FIXLEN;

;	0498	    INCR I FROM 0 TO .MVL[MVL$B_NVOLS] -1 DO

;	0499		BEGIN

;	0500		IF .MVL_ENTRY[MVL$B_RVN] EQL .RUN

;	0501		AND .MVL_ENTRY[MVL$V_MOUNTED] 

;	0502		THEN

;	0503		    BEGIN

;	0504		    MSG_BUFFER[EMB$W_VM_VOLNUM] = .I + 1;

;	0505		    CH$COPY(MVL$S_VOLLBL,MVL_ENTRY[MVL$T_VOLLBL],' ',

;	0506			VCB$S_VOLNAME,MSG_BUFFER[EMB$T_VM_LABEL]);

;	0507		    EXITLOOP;

;	0508		    END;

;	0509		MVL_ENTRY = .MVL_ENTRY + MVL$K_LENGTH;

;	0510		END;

;	0511	    END;

;	0512	

;	0513	! Finally release the buffer and make the entry.

;	0514	!

;	0515	

;	0516	ERL$RELEASEMB (.MSG_BUFFER);

;	0517	

;	0518	RETURN 1;

;	0519	

;	0520	END;					! end of routine SEND_ERRLOG





							    .TITLE  SNDERL

							    .IDENT  \A0003\



							    .EXTRN  ERL$ALLOCEMB, ERL$RELEASEMB



							    .PSECT  $LOCKEDC1$,NOWRT,2



					 07FC 00000 	    .ENTRY  SEND_ERRLOG, Save R2,R3,R4,R5,R6,R7,R8,R9,R10	      ; 0382

		         51 	       3E  D0 00002 	    MOVL    #62, R1						      ; 0447

			    00000000G  00  16 00005 	    JSB     ERL$ALLOCEMB					      ;

		         03 	       50  E8 0000B 	    BLBS    R0, 1$						      ;

				     00BC  31 0000E 	    BRW     13$							      ;

		         57 	       52  D0 00011 1$:     MOVL    ADDRESS, MSG_BUFFER					      ; 0449

		         07 	  04   AC  E9 00014 	    BLBC    MODE, 2$						      ; 0455

		    04   A7	  40   8F  9B 00018 	    MOVZBW  #64, 4(MSG_BUFFER)					      ; 0456

				       05  11 0001D 	    BRB     3$							      ; 0455

		    04   A7	  41   8F  9B 0001F 2$:     MOVZBW  #65, 4(MSG_BUFFER)					      ; 0457

		         56 	  08   AC  D0 00024 3$:     MOVL    UCB, R6						      ; 0459

		    10   A7	  1C   A6  D0 00028 	    MOVL    28(R6), 16(MSG_BUFFER)				      ;

		    14   A7	  72   A6  3C 0002D 	    MOVZWL  114(R6), 20(MSG_BUFFER)				      ; 0460

		    18   A7	  60   A6  D0 00032 	    MOVL    96(R6), 24(MSG_BUFFER)				      ; 0461

		    1C   A7	  48   A6  B0 00037 	    MOVW    72(R6), 28(MSG_BUFFER)				      ; 0462

				  2E   A7  D4 0003C 	    CLRL    46(MSG_BUFFER)					      ; 0464

		         50 	  24   A6  D0 0003F 	    MOVL    36(R6), R0						      ; 0467



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 2-3

;

		         51 	  14   A0  9A 00043 	    MOVZBL  20(R0), R1						      ;

				       51  D6 00047 	    INCL    R1							      ;

      1E   A7	    14   A0	       51  28 00049 	    MOVC3   R1, 20(R0), 30(MSG_BUFFER)				      ;

		         05 	  37   A6  E8 0004F 	    BLBS    55(R6), 4$						      ; 0471

	   0C 	    34   A6	       05  E0 00053 	    BBS     #5, 52(R6), 5$					      ; 0472

		         50 	  30   A6  D0 00058 4$:     MOVL    48(R6), R0						      ; 0475

      32   A7	    14   A0	       0C  28 0005C 	    MOVC3   #12, 20(R0), 50(MSG_BUFFER)				      ; 0474

				       60  11 00062 	    BRB     12$							      ; 0471

		         50 	  30   A6  D0 00064 5$:     MOVL    48(R6), VCB						      ; 0486

		         59 	  20   A0  D0 00068 	    MOVL    32(VCB), RVT					      ; 0487

		         5A 	  0C   A9  9E 0006C 	    MOVAB   12(R9), UCBLIST					      ; 0488

		         58 	  34   A0  D0 00070 	    MOVL    52(VCB), MVL					      ; 0489

		    30   A7	  0B   A8  9B 00074 	    MOVZBW  11(MVL), 48(MSG_BUFFER)				      ; 0490

	   20 	         6E 	       00  2C 00079 	    MOVC5   #0, (SP), #32, #12, 50(MSG_BUFFER)			      ; 0491

		    32   A7	       0C     0007D									      ;

		         51 	  0B   A9  9A 00080 	    MOVZBL  11(RVT), R1						      ; 0492

		         50 	       01  CE 00084 	    MNEGL   #1, I						      ;

				       09  11 00087 	    BRB     7$							      ;

		         59 	       50  D0 00089 6$:     MOVL    I, RUN						      ; 0494

		         56 	     6A40  D1 0008C 	    CMPL    (UCBLIST)[I], R6					      ; 0495

				       04  13 00090 	    BEQL    8$							      ;

	   F3 	         50 	       51  F2 00092 7$:     AOBLSS  R1, I, 6$						      ; 0492

		         56 	  0C   A8  9E 00096 8$:     MOVAB   12(R8), MVL_ENTRY					      ; 0497

		         5A 	  0B   A8  9A 0009A 	    MOVZBL  11(MVL), R10					      ; 0498

		         58 	       01  CE 0009E 	    MNEGL   #1, I						      ;

				       1D  11 000A1 	    BRB     11$							      ;

      06   A6	         08 	       00  ED 000A3 9$:     CMPZV   #0, #8, 6(MVL_ENTRY), RUN				      ; 0500

				       59     000A8									      ;

				       12  12 000A9 	    BNEQ    10$							      ;

		         0E 	  07   A6  E9 000AB 	    BLBC    7(MVL_ENTRY), 10$					      ; 0501

      2E   A7	         58 	       01  A1 000AF 	    ADDW3   #1, I, 46(MSG_BUFFER)				      ; 0504

	   20 	         66 	       06  2C 000B4 	    MOVC5   #6, (MVL_ENTRY), #32, #12, 50(MSG_BUFFER)		      ; 0505

		    32   A7	       0C     000B8									      ;

				       07  11 000BB 	    BRB     12$							      ; 0507

		         56 	       08  C0 000BD 10$:    ADDL2   #8, MVL_ENTRY					      ; 0509

	   DF 	         58 	       5A  F2 000C0 11$:    AOBLSS  R10, I, 9$						      ; 0498

		         52 	       57  D0 000C4 12$:    MOVL    MSG_BUFFER, R2					      ; 0516

			    00000000G  00  16 000C7 	    JSB     ERL$RELEASEMB					      ;

		         50 	       01  D0 000CD 13$:    MOVL    #1, R0						      ; 0518

					   04 000D0 	    RET     							      ; 0382



; Routine Size:  209 bytes





;	0521	

;	0522	END

;	0523	ELUDOM













;				       PSECT SUMMARY

;



; Bliss-32 10.1-416	Monday 21-AUG-1978 23:05:26	DBB3:[F11A.SRC]SNDERL.B32;6					Page 2-4

;

;	Name		 Bytes			       Attributes

;

;  $LOCKEDC1$     	   209  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        36         0       252











; Size:		209 code + 0 data bytes

; Run Time:	00:07.5

; Elapsed Time:	00:16.2

; Memory Used:	305 pages

; Compilation Complete

