

; Bliss-32 7.352	Saturday 21-AUG-1978 23:49:28	DBB3:[MOUNT.SRC]CHKHM1.B32;8					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE CHKHM1 (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'X0001'

;	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:  MOUNT Utility Structure Level 1

;	0029	!

;	0030	! ABSTRACT:

;	0031	!

;	0032	!	This routine verifies whether a given block is Files-11 Structure

;	0033	!	Level 1 home block.

;	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:  21-Nov-1977  19:23

;	0044	!

;	0045	! REVISION HISTORY:

;	0046	!

;	0047	!**

;	0048	

;	0049	

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

;	0051	REQUIRE 'SRC$:MOUDEF.B32';

;	0358	REQUIRE 'LIBD$:[VMSLIB.OBJ]MOUNTMSG.B32';



; Bliss-32 7.352	Saturday 21-AUG-1978 23:49:28	DBB3:[MOUNT.SRC]CHKHM1.B32;8					Page 2

; Digital Equipment Corporation

;

;	0458	GLOBAL ROUTINE CHECK_HOMEBLK1 (HOME_BLOCK, LBN, VOLUME_LABEL) =

;	0459	

;	0460	!++

;	0461	!

;	0462	! FUNCTIONAL DESCRIPTION:

;	0463	!

;	0464	!	This routine verifies whether the given block is a Files-11 Structure

;	0465	!	Level 1 home block.

;	0466	!

;	0467	!

;	0468	! CALLING SEQUENCE:

;	0469	!	CHECK_HOMEBLK1 (ARG1, ARG2, ARG3)

;	0470	!

;	0471	! INPUT PARAMETERS:

;	0472	!	ARG1: address of buffer containing block

;	0473	!	ARG2: LBN of block

;	0474	!	ARG3: string descriptor of user specified volume label

;	0475	!

;	0476	! IMPLICIT INPUTS:

;	0477	!	NONE

;	0478	!

;	0479	! OUTPUT PARAMETERS:

;	0480	!	NONE

;	0481	!

;	0482	! IMPLICIT OUTPUTS:

;	0483	!	NONE

;	0484	!

;	0485	! ROUTINE VALUE:

;	0486	!	1 if valid and correct

;	0487	!	0 if not

;	0488	!	SS$_INCVOLLABEL if valid but volume label is wrong

;	0489	!

;	0490	! SIDE EFFECTS:

;	0491	!	NONE

;	0492	!

;	0493	!--

;	0494	

;	0495	BEGIN

;	0496	

;	0497	MAP

;	0498		HOME_BLOCK	: REF BBLOCK,	! home block buffer

;	0499		VOLUME_LABEL	: REF VECTOR;	! volume label descriptor

;	0500	

;	0501	EXTERNAL ROUTINE

;	0502		CHECKSUM2;			! compute home block checksums

;	0503	

;	0504	

;	0505	! Check the required non-zero fields and compute the checksums.

;	0506	!

;	0507	

;	0508	IF NOT (

;	0509		.HOME_BLOCK[HM1$W_IBMAPSIZE] NEQ 0

;	0510	    AND .HOME_BLOCK[HM1$L_IBMAPLBN] NEQ 0

;	0511	    AND .HOME_BLOCK[HM1$W_MAXFILES] NEQ 0

;	0512	    AND .HOME_BLOCK[HM1$W_CLUSTER] NEQ 0



; Bliss-32 7.352	Saturday 21-AUG-1978 23:49:28	DBB3:[MOUNT.SRC]CHKHM1.B32;8					Page 2-1

; Digital Equipment Corporation

;

;	0513	    AND CHECKSUM2 (.HOME_BLOCK, $BYTEOFFSET (HM1$W_CHECKSUM1))

;	0514	    AND CHECKSUM2 (.HOME_BLOCK, $BYTEOFFSET (HM1$W_CHECKSUM2))

;	0515		)

;	0516	THEN RETURN 0;

;	0517	

;	0518	IF .HOME_BLOCK[HM1$W_STRUCLEV] NEQ HM1$C_LEVEL1

;	0519	THEN ERR_EXIT (SS$_FILESTRUCT);

;	0520	

;	0521	IF CH$NEQ (.VOLUME_LABEL[0], .VOLUME_LABEL[1],

;	0522		   HM1$S_VOLNAME, HOME_BLOCK[HM1$T_VOLNAME], 0)

;	0523	THEN RETURN (SS$_INCVOLLABEL);

;	0524	

;	0525	RETURN 1;

;	0526	

;	0527	END;					! end of routine CHECK_HOMEBLK1





							    .TITLE  CHKHM1

							    .IDENT  \X0001\



							    .GLOBL  CHECKSUM2



							    .PSECT  $CODE$,NOWRT,2



					 000C 00000 	    .ENTRY  CHECK_HOMEBLK1, Save R2,R3				      ; 0458

		         52	  04   AC  D0 00002 	    MOVL    HOME_BLOCK, R2					      ; 0509

				       62  B5 00006 	    TSTW    (R2)						      ;

				       56  13 00008 	    BEQL    3$							      ;

				  02   A2  D5 0000A 	    TSTL    2(R2)						      ; 0510

				       51  13 0000D 	    BEQL    3$							      ;

				  06   A2  B5 0000F 	    TSTW    6(R2)						      ; 0511

				       4C  13 00012 	    BEQL    3$							      ;

				  08   A2  B5 00014 	    TSTW    8(R2)						      ; 0512

				       47  13 00017 	    BEQL    3$							      ;

				       3A  DD 00019 	    PUSHL   #58							      ; 0513

				       52  DD 0001B 	    PUSHL   R2							      ;

		  0000G  CF	       02  FB 0001D 	    CALLS   #2, CHECKSUM2					      ;

		         3B	       50  E9 00022 	    BLBC    R0, 3$						      ;

		         7E	01FE   8F  3C 00025 	    MOVZWL  #510, -(SP)						      ; 0514

				       52  DD 0002A 	    PUSHL   R2							      ;

		  0000G  CF	       02  FB 0002C 	    CALLS   #2, CHECKSUM2					      ;

		         2C	       50  E9 00031 	    BLBC    R0, 3$						      ;

		  0101   8F	  0C   A2  B1 00034 	    CMPW    12(R2), #257					      ; 0518

				       0C  13 0003A 	    BEQL    1$							      ;

		         7E	08C0   8F  3C 0003C 	    MOVZWL  #2240, -(SP)					      ; 0519

	      00000000G  00	       01  FB 00041 	    CALLS   #1, LIB$STOP					      ;

		         50	  0C   AC  D0 00048 1$:     MOVL    VOLUME_LABEL, R0					      ; 0521

	   00	    04   B0	       60  2D 0004C 	    CMPC5   (R0), @4(R0), #0, #12, 14(R2)			      ;

		    0E   A2	       0C     00051									      ;

				       06  13 00054 	    BEQL    2$							      ;

		         50	010C   8F  3C 00056 	    MOVZWL  #268, R0						      ; 0523

					   04 0005B 	    RET     							      ;

		         50	       01  D0 0005C 2$:     MOVL    #1, R0						      ; 0525

					   04 0005F 	    RET     							      ;

				       50  D4 00060 3$:     CLRL    R0							      ; 0458



; Bliss-32 7.352	Saturday 21-AUG-1978 23:49:28	DBB3:[MOUNT.SRC]CHKHM1.B32;8					Page 2-2

; Digital Equipment Corporation

;

					   04 00062 	    RET     							      ;



; Routine Size:  99 bytes





;	0528	

;	0529	END

;	0530	ELUDOM









							    .GLOBL  LIB$STOP



;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	    99  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        17         0       231











; Size:		99 code + 0 data bytes

; Run Time:	00:12.3

; Elapsed Time:	00:30.8

; Memory Used:	271 pages

; Compilation Complete

