

; Bliss-32 7.352	Saturday 21-AUG-1978 23:31:38	DBB3:[MTAACP.SRC]EXPIRE.B32;4					Page 1

; Digital Equipment Corporation

;

;	0001	MODULE EXPIRE (		LANGUAGE (BLISS32),

;	0002			IDENT = 'A0001'

;	0003			) =

;	0004	BEGIN

;	0005	

;	0006	!

;	0007	! COPYRIGHT (C) 1977

;	0008	! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

;	0009	!

;	0010	! THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

;	0011	! COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

;	0012	! ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

;	0013	! MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

;	0014	! EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

;	0015	! TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

;	0016	! REMAIN IN DEC.

;	0017	!

;	0018	! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

;	0019	! AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

;	0020	! CORPORATION.

;	0021	!

;	0022	! DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

;	0023	! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

;	0024	

;	0025	!++

;	0026	!

;	0027	! FACILITY:  MTAACP

;	0028	!

;	0029	! ABSTRACT:

;	0030	!	THIS MODULE CHECKS THAT EITHER OVERRIDE EXPIRATION DATE

;	0031	!	WAS A MOUNT PARAMETER OR THE FILE HAS EXPIRED.

;	0032		

;	0033	!

;	0034	! ENVIRONMENT:

;	0035	!

;	0036	!	STARLET OPERATING SYSTEM, INCLUDING PRIVILEGED SYSTEM SERVICES

;	0037	!	AND INTERNAL EXEC ROUTINES.

;	0038	!

;	0039	!--

;	0040	!

;	0041	!

;	0042	! AUTHOR:  D. H. GILLESPIE,	 CREATION DATE:  7-JUN-77  

;	0043	!

;	0044	! REVISION HISTORY:

;	0045	!

;	0046	!   D. H. Gillespie, 12-May-78  10:15

;	0047	!   A0001 - change CURRENT_VCB to a register

;	0048	!

;	0049	!**

;	0050	

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

;	0052	REQUIRE 'SRC$:MTADEF.B32';



; Bliss-32 7.352	Saturday 21-AUG-1978 23:31:38	DBB3:[MTAACP.SRC]EXPIRE.B32;4					Page 2

; Digital Equipment Corporation

;

;	0348	GLOBAL ROUTINE EXPIRED(ADDR) : COMMON_CALL   =

;	0349	

;	0350	!++

;	0351	!

;	0352	! FUNCTIONAL DESCRIPTION:

;	0353	!	THIS ROUTINE DETERMINES IF A FILE HAS EXPIRED OR OVERRIDE EXPIRATION

;	0354	!	WAS ENTERED ON MOUNT

;	0355	!

;	0356	! CALLING SEQUENCE:

;	0357	!	EXPIRED(ARG1)

;	0358	!

;	0359	! INPUT PARAMETERS:

;	0360	!	ARG1 - ADDRESS OF DATE IN YYDDD FORMAT

;	0361	!

;	0362	! IMPLICIT INPUTS:

;	0363	!	CURRENT_VCB - ADDRESS OF CURRENT VCB, OVERRIDE EXPIRATION INDICATOR

;	0364	!

;	0365	! OUTPUT PARAMETERS:

;	0366	!	NONE

;	0367	!

;	0368	! IMPLICIT OUTPUTS:

;	0369	!	IF FILE HAS NOT EXPIRED AND OVERRRIDE EXPIRATION IS NOT SET,

;	0370	!	THEN ERROR EXIT IS TAKEN WITH SS$_FILNOTEXP IN USER STATUS

;	0371	!

;	0372	! ROUTINE VALUE:

;	0373	!	0 - FILE NOT EXPIRED

;	0374	!	1 - FILE EXPIRED

;	0375	!

;	0376	! SIDE EFFECTS:

;	0377	!	NONE

;	0378	!

;	0379	!--

;	0380	

;	0381	BEGIN

;	0382	

;	0383	EXTERNAL REGISTER

;	0384		COMMON_REG;

;	0385	

;	0386	

;	0387	EXTERNAL ROUTINE

;	0388		CALDAYNO,					!CALCULATE DAY NUMBER GIVEN 64 BIT DATE

;	0389		CONVDATE_J2R,					!CONVERT ANSI JULIAN TO REG DATE

;	0390		SYS$BINTIM:		ADDRESSING_MODE(ABSOLUTE),	!GET BINARY TIME

;	0391		SYS$GETTIM:		ADDRESSING_MODE(ABSOLUTE);	!GET SYSTEM TIME

;	0392	

;	0393	LOCAL

;	0394		REGDATE:		VECTOR [12,BYTE],	!INPUT DD_MMM-YYYY

;	0395		DATE:			VECTOR [2],		!BINARY INPUT DATE

;	0396		TODAY:			VECTOR [2],		!BINARY TODAY

;	0397		DESC1:			VECTOR [2,LONG];	!DESCRIPTOR

;	0398	

;	0399	IF NOT .CURRENT_VCB[VCB$V_OVREXP] 

;	0400	THEN

;	0401	    BEGIN

;	0402	! FIRST CONVERT INPUT DATE TO DATE STARLET CAN UNDERSTAND



; Bliss-32 7.352	Saturday 21-AUG-1978 23:31:38	DBB3:[MTAACP.SRC]EXPIRE.B32;4					Page 2-1

; Digital Equipment Corporation

;

;	0403	    IF NOT CONVDATE_J2R(REGDATE,.ADDR) THEN RETURN;		!CONVERT MAG TAPE DATE TO DD-MMM-YYYY

;	0404	

;	0405	! NOW CONVERT INPUT DATE TO 64 BIT BINARY AND GET TODAY'S DATE IN 64 BIT BINARY

;	0406	    DESC1[0] = 12;

;	0407	    DESC1[1] = REGDATE;

;	0408	    REGDATE[11] = %C' ';				!PUT IN TERMINATOR

;	0409	    SYS$BINTIM(DESC1,DATE);					!CONVERT TO 64-BIT TIME

;	0410	    SYS$GETTIM(TODAY);						!GET TODAY'S DATE IN 64-BIT TIME

;	0411	

;	0412	! CALCULATE DAY NUMBER GIVEN 64 BIT FORMAT

;	0413	    CALDAYNO(DATE,TODAY);	

;	0414	

;	0415	! FINALLY IS THE FILE EXPIRED

;	0416	    IF .DATE GTRU .TODAY

;	0417	    THEN RETURN 0;

;	0418	    END;

;	0419	

;	0420	RETURN 1;

;	0421	END; 					!END OF ROUTINE





							    .TITLE  EXPIRE

							    .IDENT  \A0001\



							    .GLOBL  CALDAYNO, CONVDATE_J2R, SYS$BINTIM, SYS$GETTIM



							    .PSECT  $CODE$,NOWRT,2



					 0000 00000 	    .ENTRY  EXPIRED, Save nothing				      ; 0348

		         5E	       24  C2 00002 	    SUBL2   #36, SP						      ;

		         43	  2C   AB  E8 00005 	    BLBS    44(CURRENT_VCB), 1$					      ; 0399

				  04   AC  DD 00009 	    PUSHL   ADDR						      ; 0403

				  1C   AE  9F 0000C 	    PUSHAB  REGDATE						      ;

		  0000G  CF	       02  FB 0000F 	    CALLS   #2, CONVDATE_J2R					      ;

		         39	       50  E9 00014 	    BLBC    R0, 2$						      ;

		         6E	       0C  D0 00017 	    MOVL    #12, DESC1						      ; 0406

		    04   AE	  18   AE  9E 0001A 	    MOVAB   REGDATE, DESC1+4					      ; 0407

		    23   AE	       20  90 0001F 	    MOVB    #32, REGDATE+11					      ; 0408

				  10   AE  9F 00023 	    PUSHAB  DATE						      ; 0409

				  04   AE  9F 00026 	    PUSHAB  DESC1						      ;

	      00000000G  9F	       02  FB 00029 	    CALLS   #2, @#SYS$BINTIM					      ;

				  08   AE  9F 00030 	    PUSHAB  TODAY						      ; 0410

	      00000000G  9F	       01  FB 00033 	    CALLS   #1, @#SYS$GETTIM					      ;

				  08   AE  9F 0003A 	    PUSHAB  TODAY						      ; 0413

				  14   AE  9F 0003D 	    PUSHAB  DATE						      ;

		  0000G  CF	       02  FB 00040 	    CALLS   #2, CALDAYNO					      ;

		    08   AE	  10   AE  D1 00045 	    CMPL    DATE, TODAY						      ; 0416

				       04  1A 0004A 	    BGTRU   2$							      ;

		         50	       01  D0 0004C 1$:     MOVL    #1, R0						      ; 0420

					   04 0004F 	    RET     							      ;

				       50  D4 00050 2$:     CLRL    R0							      ; 0348

					   04 00052 	    RET     							      ;



; Routine Size:  83 bytes





; Bliss-32 7.352	Saturday 21-AUG-1978 23:31:38	DBB3:[MTAACP.SRC]EXPIRE.B32;4					Page 2-2

; Digital Equipment Corporation

;



;	0422	

;	0423	END

;	0424	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

;  $CODE$         	    83  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         7         0       225











; Size:		83 code + 0 data bytes

; Run Time:	00:05.0

; Elapsed Time:	00:12.2

; Memory Used:	259 pages

; Compilation Complete

