

; Bliss-32 10.1-416	Monday 21-AUG-1978 22:58:34	DBB3:[F11A.SRC]GETTIM.B32;7					Page 1

;

;	0001	MODULE GETTIM (

;	0002			LANGUAGE (BLISS32),

;	0003			IDENT = 'A0002'

;	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 builds a date/time string in the format for file headers

;	0033	!	in the indicated buffer.

;	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:  2-May-1977  16:07

;	0044	!

;	0045	! REVISION HISTORY:

;	0046	!

;	0047	!   Andrew C. Goldstein, 12-Jul-1977  14:22

;	0048	!   X0002 - Add explicit time argument

;	0049	!

;	0050	!**

;	0051	

;	0052	

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

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



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:58:34	DBB3:[F11A.SRC]GETTIM.B32;7					Page 2

;

;	0373	GLOBAL ROUTINE GET_TIME (BUFFER, TIME) : NOVALUE =

;	0374	

;	0375	!++

;	0376	!

;	0377	! FUNCTIONAL DESCRIPTION:

;	0378	!

;	0379	!	This routine builds a date/time string in the format for file headers

;	0380	!	in the indicated buffer. If a time is supplied, it is used; if not,

;	0381	!	the current time is used.

;	0382	!

;	0383	! CALLING SEQUENCE:

;	0384	!	GET_TIME (ARG1, ARG2)

;	0385	!

;	0386	! INPUT PARAMETERS:

;	0387	!	NONE

;	0388	!

;	0389	! IMPLICIT INPUTS:

;	0390	!	system time of day

;	0391	!

;	0392	! OUTPUT PARAMETERS:

;	0393	!	ARG1: address of buffer to receive date/time string

;	0394	!	ARG2: optional 64 bit date/time to convert

;	0395	!

;	0396	! IMPLICIT OUTPUTS:

;	0397	!	NONE

;	0398	!

;	0399	! ROUTINE VALUE:

;	0400	!	NONE

;	0401	!

;	0402	! SIDE EFFECTS:

;	0403	!	NONE

;	0404	!

;	0405	!--

;	0406	

;	0407	BEGIN

;	0408	

;	0409	LITERAL					! entries in the numeric date/time buffer

;	0410		YEAR		= 0,

;	0411		MONTH		= 1,

;	0412		DAY		= 2,

;	0413		HOUR		= 3,

;	0414		MINUTE		= 4,

;	0415		SECOND		= 5;

;	0416	

;	0417	MAP

;	0418		BUFFER		: REF VECTOR [,BYTE]; ! date/time buffer arg

;	0419	

;	0420	LOCAL

;	0421		TIMEADDR,			! address of 64 bit date/time

;	0422		DUMMY,				! dummy to receive string length

;	0423		TIMBUF		: VECTOR [7, WORD], ! buffer to receive numeric format time

;	0424		BUF_DESCRIPT	: VECTOR [2];	! descriptor to pass buffer to FAO

;	0425	

;	0426	BIND

;	0427						! month name table



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:58:34	DBB3:[F11A.SRC]GETTIM.B32;7					Page 2-1

;

;	0428		MONTH_TABLE	= UPLIT BYTE

;	0429				('JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC ')

;	0430				: VECTOR,

;	0431						! FAO format string

;	0432		FORMAT		= DESCRIPTOR ('!2ZW!AD!4(2ZW)');

;	0433	

;	0434	EXTERNAL ROUTINE

;	0435		SYS$NUMTIM	: ADDRESSING_MODE (ABSOLUTE),

;	0436						! system time in numeric format

;	0437		SYS$FAO		: ADDRESSING_MODE (ABSOLUTE);

;	0438						! formatted ASCII output

;	0439	

;	0440	

;	0441	! Execution of this routine simply involves getting the current date and time

;	0442	! in numeric format from the system, and then calling FAO to build the ASCII

;	0443	! date/time string in the buffer. The string is of the form "DDMMMYYHHMMSS".

;	0444	!

;	0445	

;	0446	BUF_DESCRIPT[0] = FI1$S_CREDATE + FI1$S_CRETIME;

;	0447	BUF_DESCRIPT[1] = .BUFFER;

;	0448	

;	0449	TIMEADDR = 0;

;	0450	IF ACTUALCOUNT GEQ 2 THEN TIMEADDR = .TIME;

;	0451	SYS$NUMTIM (TIMBUF, .TIMEADDR);

;	0452	

;	0453	SYS$FAO	(FORMAT, DUMMY, BUF_DESCRIPT,

;	0454		.TIMBUF[DAY],

;	0455		3, MONTH_TABLE[.TIMBUF[MONTH]-1],

;	0456		.TIMBUF[YEAR] MOD 100,

;	0457		.TIMBUF[HOUR],

;	0458		.TIMBUF[MINUTE],

;	0459		.TIMBUF[SECOND]

;	0460		);

;	0461	

;	0462	END;					! end of routine GET_TIME





							    .TITLE  GETTIM

							    .IDENT  \A0002\



							    .PSECT  $CODE$,NOWRT,2



  52  41  4D  20  42  45  46  20  4E  41  4A  00000 P.AAA:  .ASCII  \JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC \	      ;

  55  4A  20  59  41  4D  20  52  50  41  20  0000B									      ;

  53  20  47  55  41  20  4C  55  4A  20  4E  00016									      ;

  20  56  4F  4E  20  54  43  4F  20  50  45  00021									      ;

			      20  43  45  44  0002C									      ;

  32  28  34  21  44  41  21  57  5A  32  21  00030 P.AAC:  .ASCII  \!2ZW!AD!4(2ZW)\					      ;

				  29  57  5A  0003B									      ;

					      0003E	    .BLKB   2

				    0000000E  00040 P.AAB:  .LONG   14							      ;

				    00000000' 00044 	    .ADDRESS P.AAC						      ;



						    MONTH_TABLE=	P.AAA

						    FORMAT=		P.AAB



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:58:34	DBB3:[F11A.SRC]GETTIM.B32;7					Page 2-2

;

							    .EXTRN  SYS$NUMTIM, SYS$FAO



					 0000 00048 	    .ENTRY  GET_TIME, Save nothing				      ; 0373

		         5E 	       1C  C2 0004A 	    SUBL2   #28, SP						      ;

		    04   AE	       0D  D0 0004D 	    MOVL    #13, BUF_DESCRIPT					      ; 0446

		    08   AE	  04   AC  D0 00051 	    MOVL    BUFFER, BUF_DESCRIPT+4				      ; 0447

				       50  D4 00056 	    CLRL    TIMEADDR						      ; 0449

		         02 	       6C  91 00058 	    CMPB    (AP), #2						      ; 0450

				       04  1F 0005B 	    BLSSU   1$							      ;

		         50 	  08   AC  D0 0005D 	    MOVL    TIME, TIMEADDR					      ;

				       50  DD 00061 1$:     PUSHL   TIMEADDR						      ; 0451

				  10   AE  9F 00063 	    PUSHAB  TIMBUF						      ;

	      00000000G  9F	       02  FB 00066 	    CALLS   #2, @#SYS$NUMTIM					      ;

		         7E 	  16   AE  3C 0006D 	    MOVZWL  TIMBUF+10, -(SP)					      ; 0453

		         7E 	  18   AE  3C 00071 	    MOVZWL  TIMBUF+8, -(SP)					      ;

		         7E 	  1A   AE  3C 00075 	    MOVZWL  TIMBUF+6, -(SP)					      ;

		         50 	  18   AE  3C 00079 	    MOVZWL  TIMBUF, R0						      ; 0456

	   00 	         50 	       01  7A 0007D 	    EMUL    #1, R0, #0, -(SP)					      ;

				       7E     00081									      ;

	   7E 	         8E 00000064   8F  7B 00082 	    EDIV    #100, (SP)+, -(SP), (SP)				      ;

				       6E     0008A									      ;

		         50 	  1E   AE  3C 0008B 	    MOVZWL  TIMBUF+2, R0					      ; 0455

				FF68 CF40  DF 0008F 	    PUSHAL  MONTH_TABLE-4[R0]					      ;

				       03  DD 00094 	    PUSHL   #3							      ; 0453

		         7E 	  28   AE  3C 00096 	    MOVZWL  TIMBUF+4, -(SP)					      ;

				  20   AE  9F 0009A 	    PUSHAB  BUF_DESCRIPT					      ;

				  20   AE  9F 0009D 	    PUSHAB  DUMMY						      ;

				  9D   AF  9F 000A0 	    PUSHAB  FORMAT						      ; 0373

	      00000000G  9F	       0A  FB 000A3 	    CALLS   #10, @#SYS$FAO					      ; 0453

					   04 000AA 	    RET     							      ; 0373



; Routine Size:  99 bytes





;	0463	

;	0464	END

;	0465	ELUDOM













;				       PSECT SUMMARY

;

;	Name		 Bytes			       Attributes

;

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









;				LIBRARY STATISTICS

;

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



; Bliss-32 10.1-416	Monday 21-AUG-1978 22:58:34	DBB3:[F11A.SRC]GETTIM.B32;7					Page 2-3

;

;	File				     Total    Loaded   Percent      Read

;

;  DBA4:[SYSLIB]LIB.L32;1		      5582         3         0       223











; Size:		99 code + 72 data bytes

; Run Time:	00:04.8

; Elapsed Time:	00:11.8

; Memory Used:	263 pages

; Compilation Complete

