Google
 

Trailing-Edge - PDP-10 Archives - BB-L014E-BM - autopatch/formsc.c05
There are no other files named formsc.c05 in the archive.
 REP 2/1	;05C1
		TV	FORMSC	Miscellaneous routines ,6(2031)
		SUBTTL	Sue Godsell/EDS/EGM			16-Mar-81
 WIT
		TV	FORMSC	Miscellaneous routines ,6(2103)
		SUBTTL	Sue Godsell/EDS/EGM			1-Jun-82
 REP 9/1	;05C2
	;COPYRIGHT (C) 1977,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1977,1982 BY DIGITAL EQUIPMENT CORPORATION
 INS 99/1	;05C3
	***** End V6 Development *****

	2061	EDS	1-Jun-82
		Restore registers in the correct order when returning from TIME.

	2077	RJD	31-Aug-82
		In OVERFL, index OLDCT for a correct comparison between the tables
		containing the current APR counts and the old counts.

	2103	MRB	13-Sep-82	20-18016
		Time function will return incorrect results for european time 
		zones. Use the TOPS-20 JSYS ODTIM to get correct time.

 REP 8/2	;05C4
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 8/3	;05C5
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 9/4	;05C6
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 9/5	;05C7
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 9/6	;05C8
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 9/12	;05C9
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 9/16	;05C10
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/17	;05C11
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 7/18	;05C12
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 45/18	;05C13
	>				;END IF10
	IF20,<
		GTAD%			;GET INTERNAL TIME
		HRLZ	T1,T1		;Put into left half
		LSH	T1,-1		;
		MUL	T1,[^D86400000]	;COMPUTE NO OF MS SINCE MIDNIGHT
					;INTO AC1 -
	>				;END IF20
		IDIVI	T1,^D60000	;TOTAL MINS. IN 1, LEFTOVER MSECS. IN 2.
		MOVEM	T2,TEMP1	;SAVE THE LEFTOVER MS
		IDIVI	T1,^D60		;HOURS IN 1, MINUTES IN 2.

	IF20,<				;CORRECT FOR TIME ZONE ON -20
		SKIPE	T3,TZCOR	;PICK UP TIME ZONE CORRECTION IF IT'S SET
		  JRST	TIME01		;YES - IT'S SET - KEEP ON TRUCKIN
		PUSH	P,T4		;NEED ANOTHER AC FOR THIS JSYS
		PUSH	P,T2		;SAVE T2 WHICH IS USED FOR JSYS
		SETO	T2,		;T2 gets -1
		SETZ	T4,		;ZERO T4 FOR JSYS TO SAY LOCAL TIME
		ODCNV%			;USE THIS JSYS TO FIND TIME ZONE
		HLRZ	T3,T4		;PICK UP LEFT HALF WHICH HAS INTERESTING INFO
		TRZ	T3,<^-<(IC%TMZ)>> ;ZERO EVERYTHING EXCEPT TIME ZONE (B12-B17)
		TRZE	T3,40		;IS TIME ZONE NEGATIVE? (RANGE IS -12 to +12)
		  MOVN	T3,T3		;YES - NEGATE IT
		TXNE	T4,IC%ADS	;IS DAYLIGHT SAVINGS IN EFFECT?
		  SUBI	T3,1		;YES - SUBTRACT ONE HOUR
		MOVEM	T3,TZCOR	;STORE TIME ZONE CORRECTION FACTOR FOR NEXT TIME
		POP	P,T2		;RESTORE T2 WHICH HOLDS MINUTES
		POP	P,T4		;RESTORE T4
	TIME01:	SUB	T1,T3		;CORRECT FOR TIMEZONE AND DAYLIGHT SAVINGS
		SKIPGE	T1		;DID TIME GO NEGATIVE?
		  ADDI	T1,^D24		;YES, GET IT MOD 24 HOURS
	>				;END IF20
		MOVEM	T2,TEMP2	;SAVE THE MINUTES.

 WIT
		IDIVI	T1,^D60000	;[2103]TOTAL MINS. IN 1, LEFTOVER MSECS. IN 2.
		MOVEM	T2,TEMP1	;SAVE THE LEFTOVER MS
		IDIVI	T1,^D60		;HOURS IN 1, MINUTES IN 2.
		MOVEM	T2,TEMP2	;[2103]SAVE THE MINUTES.
 INS 91/18	;05C14
	>				;[2103]end if10
	IF20,<
		XMOVEI	T1,@0(L)	;[2103]get address of 1st argument
		$BLDBP	T1		;[2103]Build a byte pointer
		HRREI	T2,-1		;[2103]get the current time
		HRLZI	T3,400200	;[2103]no date, no seconds, just hh:mm
		ODTIM%			;[2103]get the time in ascii
		GTAD%			;[2103]get internal time (need seconds)
		HRLZ	T1,T1		;[2103]put into left half
		LSH	T1,-1		;[2103]shift
		MUL	T1,[^D86400000]	;[2103]compute miliseconds since midnight
		IDIVI	T1,^D60000	;[2103]total mins. in 1, leftover msecs. in 2.
		MOVEM	T2,TEMP1	;[2103]save the leftover ms
		IDIVI	T1,^D60		;[2103]hours in 1, minutes in 2.
	>				;[2103]end if20

 REP 107/18	;05C15
	OUT1:	POP	P,T2		;RESTORE AC 2.
		POP	P,T3		;RESTORE AC 3.
 WIT
	OUT1:	POP	P,T3		;[2061] RESTORE AC 3.
		POP	P,T2		;[2061] RESTORE AC 2.
 REP 9/19	;05C16
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 9/20	;05C17
	;COPYRIGHT (C) 1972,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1972,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 INS 23/25	;05C18
		PUSH	P,T4		;[2077]
 REP 30/25	;05C19
	OVLP:	MOVE	T3,@APRCT	;GET CURRENT COUNT
		CAMLE	T3,OLDCT	;GREATER THAN OLD COUNT?
		  MOVEI	T2,1		;YES, SET ANSWER TO 1 (OVERFLOW OCCURRED)
 WIT
		SETZ	T4,		;[2077] INITIALIZE OLD COUNT TABLE INDEX
	OVLP:	MOVE	T3,@APRCT	;GET CURRENT COUNT
		CAMLE	T3,OLDCT(T4)	;[2077] GREATER THAN OLD COUNT?
		  MOVEI	T2,1		;YES, SET ANSWER TO 1 (OVERFLOW OCCURRED)
		ADDI	T4,1		;[2077] INCREMENT OLD COUNT TABLE INDEX
 INS 42/25	;05C20
		POP	P,T4		;[2077]
 REP 9/26	;05C21
	;COPYRIGHT (C) 1973,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1973,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/27	;05C22
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/28	;05C23
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/29	;05C24
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/30	;05C25
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/31	;05C26
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/32	;05C27
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/33	;05C28
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 REP 10/34	;05C29
	;COPYRIGHT (C) 1974,1981 BY DIGITAL EQUIPMENT CORPORATION
 WIT
	;COPYRIGHT (C) 1974,1981,1982 BY DIGITAL EQUIPMENT CORPORATION
 SUM 33780