Google
 

Trailing-Edge - PDP-10 Archives - bb-y390o-bm_tops20_v41_atpch_20 - autopatch/glxtxt.c12
There are no other files named glxtxt.c12 in the archive.
 REP 29/1	;12C1
		TXTEDT==53			;MODULE EDIT LEVEL
 WIT
		TXTEDT==70			;MODULE EDIT LEVEL
 REP 84/3	;12C2

 WIT
	0054			Routine CLCFCT is too complicated and PROH.1 is not
				need to output the date and time.  Use ODTIM JSYS.
				Related to QAR 838243. GCO 5.1218, 5.1221. Edit 62,63
				of version 5. This edit supersedes version 4.2 edit 53.

	70	Increase version 4.2 maintenance edit number to correspond with version
	5 maintenance edit number.
 REP 19/6	;12C3
	TOPS10<	$RETT>				;RETURN FOR TOPS10

	TOPS20<
	;This routine is called to recompute the local time
	;	conversion factor.  The factor takes into account
	;	the local time zone as well as the daylight savings
	;	time adjustment.  Note that the routine calculates
	;	the next local time occurrence of 0200 hours and
	;	saves it for later comparison.

	CLCFCT:	MOVEI	S1,.SFTMZ		;TIME ZONE FUNCTION
		TMON				;GET THE ZONE
		SETOM	TMFCTR			;REVERSE NUMBER LINE VALUE
		IMULM	S2,TMFCTR		;CALCULATE BASE HOURS
		GTAD				;GET DATE/TIME
		MOVE	S2,S1			;RELOCATE
		HRRI	S2,25253*2		;LOAD RIGHT WITH 0200
		MOVEM	S2,DSTCHG		;SAVE IT
		HRRZ	S2,S1
		CAIG	S2,25253*2		;AFTER 0200?
		JRST	TINI.1			;NO,WE'RE DONE
		HRLZI	S2,1			;YUP, MAKE IT TOMORROW
		ADDM	S2,DSTCHG		;..
	TINI.1:	MOVE	S2,S1			;RELOCATE TIME
		SETZ	T2,0			;..
		ODCNV
		SETZ	S2,0			;SET FOR NO DST ADJUSTMENT
		TXNE	T2,IC%ADS		;FACTOR FOR DST?
		AOS	TMFCTR			;YES, DO SO
		HRLZI	S1,1			;SETUP FULL DAY FACTOR [1,,0]
		IMUL	S1,TMFCTR		;COMPUTE FACTOR HOURS
		IDIVI	S1,^D24			;..AND THE BASE OFFSET
		MOVEM	S1,TMFCTR		;STORE IT AWAY
		$RETT
	>;END OF TOPS20 CONDITIONAL ASSEMBLY
 WIT
	;**[54]At T%INIT:+9L replace 24 lines with 1 line. Delete CLCFCT. JYCW 6/27/85
		$RETT				;[54]Return
 REP 8/24	;12C4
	TOPS20	<
		PUSH	P,S1			;SAVE S1
		CAML	S1,DSTCHG		;HAVE WE PASSED NEXT 0200?
		PUSHJ	P,CLCFCT		;YUP, RECOMPUTE LOCAL ADJUSTMENT FACTOR
		POP	P,S1			;RESTORE S1
		ADD	S1,TMFCTR		;MAKE LOCAL TIME ADJUSTMENT
		SKIPGE	S1			;GUARD AGAINST GARBAGE DATES
		SETZ	S1,0			;AND SET TO EARLIEST POSSIBLE
	>;;END OF TOPS20 CONDITIONAL ASSEMBLY

	PROH.1:	PUSHJ	P,CNTDT			;TAKE IT APART
	;**;[53]Insert 1 line at PROH.1:+1L   JCR   10-JUL-84
		ADDI	S1,^D500		;[53]Round to the nearest second
		DMOVE	T1,S1			;GET THE RETURNED VALUES
		PUSH	P,S1			;SAVE TIME
		JUMPL	P1,PROH.2		;IF FLAG IS UP, GIVE TIME ONLY
		MOVE	T1,T2			;POSITION DATE
		IDIVI	T1,^D31			;GET DAYS
		MOVE	T4,T1			;SAVE REST
		MOVEI	S1,1(T2)		;GET DAYS AS 1-31
		CAIGE	S1,^D10			;IF ONE DIGIT,
		$PUT7(< >)			; FILL WITH A SPACE
		PUSHJ	P,PUTD			;PRINT DECIMAL NUMBER
		IDIVI	T4,^D12			;GET MONTHS
		MOVEI	S1,[ASCIZ /-Jan/
			    ASCIZ /-Feb/
			    ASCIZ /-Mar/
			    ASCIZ /-Apr/
			    ASCIZ /-May/
			    ASCIZ /-Jun/
			    ASCIZ /-Jul/
			    ASCIZ /-Aug/
			    ASCIZ /-Sep/
			    ASCIZ /-Oct/
			    ASCIZ /-Nov/
			    ASCIZ /-Dec/](P1)	;GET ASCII
		PUSHJ	P,PUTT			;TYPE THE ASCIZ STRING
		MOVEI	S1,^D64(T4)		;GET YEAR SINCE 1900
		IDIVI	S1,^D100		;GET JUST YEARS IN CENTURY	
		MOVN	S1,S2			;NEGATE TO GET - SIGN		
		PUSHJ	P,PUTD			;TYPE IT OUT
		$PUT7(< >)			;NOW SPACE OVER ONE
	PROH.2:	POP	P,S1			;GET TIME BACK
		IDIV	S1,[DEC 3600000]	;GET HOURS
		MOVE	T4,S2			;SAVE REST
		CAIGE	S1,^D10			;IF ONLY ONE DIGIT,
		$PUT7(< >)			;SPACE OVER
		PUSHJ	P,PUTD			;PUT DECIMAL NUMBER OUT
		$PUT7(<:>)			;NOW A COLON TO DIVIDE HOURS FROM MINUTES
		MOVE	S1,T4			;RESTORE REST
		IDIV	S1,[DEC 60000]		;GET MINUTES
		MOVE	T4,S2			;SAVE REST
		CAIGE	S1,^D10			;IF NOT TWO DIGITS,
		$PUT7(<0>)			;GIVE A ZERO FILL
		PUSHJ	P,PUTD			;PRINT DECIMAL MINUTES
		$PUT7(<:>)			;AND SEPARATING COLON
		MOVE	S1,T4			;RESTORE THE REST
		IDIV	S1,[DEC 1000]		;EXTRACT THE SECONDS
		CAIGE	S1,^D10			;IF ITS NOT TWO DIGITS,
		$PUT7(<0>)			; ZERO FILL IT
		PJRST	PUTD			;THEN PRINT IT, RETURN
 WIT
	;**[54]At PROC:+5L replace 46 lines with 11 lines. JYCW 6/27/85
	;  Convert date and time to ASCII string

		MOVE	S2,S1			;[54]Put the date and time AC 2
		HRROI	S1,TTXBUF		;[54]String goes into TTXBUF
		PUSH	P,T1			;[54]Save AC 3 
		SETZ	T1,			;[54]For now no flags
		SKIPE	P1			;[54]Do we want date and time
		TXO	T1,OT%NDA		;[54]Only want time
		ODTIM				;[54]Convert
		 ERJMP .STOP			;[54]Can't covert time
		POP	P,T1			;[54]Restore AC 3
		MOVEI	S1,TTXBUF		;[54]String goes into AC 1
		PJRST	PUTT			;[54]Print it

 SUM 198595