Google
 

Trailing-Edge - PDP-10 Archives - bb-m403a-bk - midnit.lst
There are 2 other files named midnit.lst in the archive. Click here to see a list.
RSX20F/TOPS-10/TOPS-20 TIME OF 	MACRO M1113  14-APR-81 11:24
TABLE OF CONTENTS

     1-    2	MIDNIT -- TIME OF DAY UPDATE TASK
RSX20F/TOPS-10/TOPS-20 TIME OF 	MACRO M1113  14-APR-81 11:24  PAGE 1


      1						.TITLE	RSX20F/TOPS-10/TOPS-20 TIME OF DAY UPDATE TASK
      2						.SBTTL	MIDNIT -- TIME OF DAY UPDATE TASK
      3
      4					.IDENT	"V01423"
      5
      6					;                             COPYRIGHT (C) 1975, 1978 BY
      7					;                     DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
      8					;
      9					;       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE  USED  AND  COPIED
     10					;       ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
     11					;       OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY OTHER COPIES THERE-
     12					;       OF  MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
     13					;       NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
     14					;
     15					;       THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT
     16					;       NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
     17					;       CORPORATION.
     18					;
     19					;       DIGITAL ASSUMES NO RESPONSIBILITY FOR THE  USE  OR  RELIABILITY  OF  ITS
     20					;       SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
     21
     22
     23					;
     24					;		MODULE: TIME OF DAY UPDATE TASK
     25					;
     26					;		VERSION: V01423
     27					;
     28					;		AUTHOR: R. BELANGER
     29					;
     30					;		DATE: 03-MAR-77
     31					;
     32					;	THIS MODULE CONTAINS:
     33					;
     34					;	1) TIME OF DAY UPDATE TASK CODE
     35					;
     36					; TCO 4.1.1105	11-MAR-80	R. BELANGER	CHANGE "EF.PR1" RECOGNITION
     37
     38						.MCALL	.ENB6,.INH6,EXIT$S,CALL
     39						.LIST	MEB
RSX20F/TOPS-10/TOPS-20 TIME OF 	MACRO M1113  14-APR-81 11:24  PAGE 2
MIDNIT -- TIME OF DAY UPDATE TASK

     41					;+
     42					; MIDNIT -- TIME OF DAY UPDATE TASK
     43					;
     44					; THIS TASK IS REPONSIBLE TO UPDATE THE TIME OF DAY ACROSS MIDNIGHT FOR
     45					; THE RSX20F EXECUTIVE.  THIS TASK IS A NON-RESIDENT EXECUTIVE ROUTINE.
     46					;
     47					; THE TIME OF DAY IS UPDATED TO "TOMORROW" AND THEN THE -10 IS REQUESTED
     48					; TO RETURN ITS TIME OF DAY TO THE -11 FOR PURPPOSES OF SYNCHRONIZATION
     49					; ONLY. THE TIME OF DAY RETURNED BY THE -10 WILL ALWAYS BE TREATED AS
     50					; THE VALID TIME OF DAY, REGARDLESS.
     51					;-
     52
     53	000000				MIDNIT::
     54	000000	022767 	124277 	000000G		CMP	#^D<30*60*24-1>,.SSM
     55	000006	101116 				BHI	70$		; NOT REALLY MIDNITE -- GO AWAY
     56	000010					.INH6			; DISALLOW INTERRUPTS
	000010	013746 	000000G			MOV	@#PS,-(SP)
	000014	112737 	000300 	000000G		MOVB	#300,@#PS
     57	000022	016746 	000000G			MOV	.YEAR,-(SP)	;;; CURRENT YEAR TO STACK
     58	000026	116746 	000000G			MOVB	.MON,-(SP)	;;; AND MONTH
     59	000032	116746 	000000G			MOVB	.DAY,-(SP)	;;; AND DAY
     60	000036	005216 				INC	(SP)		;;; INCREMENT DAY
     61	000040	122766 	000002 	000002 		CMPB	#^D2,2(SP)	;;; IS THIS FEBRUARY??
     62	000046	001013 				BNE	20$		;;; NO -- GO ON
     63	000050	122716 	000034 			CMPB	#^D28,(SP)	;;; YES -- TOO MANY DAYS??
     64	000054	003010 				BGT	20$		;;; NO -- GO ON
     65	000056	001404 				BEQ	10$		;;; YES -- RESET TO MARCH 1
     66	000060	032766 	000003 	000004 		BIT	#3,4(SP)	;;; MAYBE -- IS THIS LEAP YEAR??
     67	000066	001403 				BEQ	20$		;;; YES -- GO ON
     68	000070				10$:
     69	000070	005016 				CLR	(SP)		;;; SET DAY TO 1
     70	000072	005266 	000002 			INC	2(SP)		;;; AND MONTH TO MONTH + 1
     71	000076				20$:
     72	000076	122766 	000013 	000002 		CMPB	#^D11,2(SP)	;;; IS THIS DECEMBER??
     73	000104	002005 				BGE	30$		;;; ALL OK IF .GE.
     74	000106	005016 				CLR	(SP)		;;; NO -- RESET TO 1
     75	000110	005066 	000002 			CLR	2(SP)		;;; RESET TO JANUARY
     76	000114	005266 	000004 			INC	4(SP)		;;; SET TO YEAR + 1
     77	000120				30$:
     78	000120	122716 	000035 			CMPB	#^D29,(SP)	;;; 30 DAYS??
     79	000124	002010 				BGE	50$		;;; OK IF .GE.
     80	000126	012700 	172452 			MOV	#^C5325,R0	;;; MAGIC NUMBER TO R0
     81	000132	016601 	000002 			MOV	2(SP),R1	;;; MONTH TO R1
     82	000136	005201 				INC	R1		;;; FUDGE FACTOR
     83	000140				40$:
     84	000140	006200 				ASR	R0		;;; SHIFT MAGIC NUMBER
     85	000142	077102 				SOB	R1,40$		;;; TILL DONE
     86	000144	103751 				BCS	10$		;;; RESET IF CC-C IS SET
     87	000146				50$:
     88	000146	116746 	000000G			MOVB	.DOW,-(SP)	;;; DAY OF WEEK TO STACK
     89	000152	005216 				INC	(SP)		;;; INCREMENT IT
     90	000154	122716 	000006 			CMPB	#^D6,(SP)	;;; IS IT OK??
     91	000160	002001 				BGE	60$		;;; YES -- GO ON
     92	000162	005016 				CLR	(SP)		;;; NO -- RESET IT
     93	000164				60$:
     94	000164	162767 	124277 	000000G		SUB	#^D<30*60*24-1>,.SSM ;;; FIX UP TIME OVERFLOW
     95	000172	112667 	000000G			MOVB	(SP)+,.DOW	;;; SET NEW DAY OF WEEK
RSX20F/TOPS-10/TOPS-20 TIME OF 	MACRO M1113  14-APR-81 11:24  PAGE 2-1
MIDNIT -- TIME OF DAY UPDATE TASK

     96	000176	112667 	000000G			MOVB	(SP)+,.DAY	;;; AND DAY
     97	000202	112667 	000000G			MOVB	(SP)+,.MON	;;; AND MONTH
     98	000206	012667 	000000G			MOV	(SP)+,.YEAR	;;; AND YEAR
     99	000212					.ENB6			;;; ALLOW INTERRUPTS
	000212	012637 	000000G			MOV	(SP)+,@#PS
    100	000216	005767 	000002G			TST	.COMEF+2	; [4.1.1105] CAN WE DO THIS ??
    101	000222	100010 				BPL	70$		; [4.1.1105] NO -- JUST GO AWAY
    102	000224	012701 	000000G			MOV	#BC.RTD,R1	; YES -- FUNCTION CODE TO R1
    103	000230	012703 	000000G			MOV	#D.CCLK,R3	; DEVICE CODE TO R3
    104	000234	012704 	000000G			MOV	#.CLKSW,R4	; POINTER TO R4
    105	000240					CALL	..STFC		; START THE FUNCTION TO SYNCH -10 AND -11
	000240	004767 	000000G			JSR	PC,..STFC
    106	000244				70$:
    107	000244					EXIT$S			; GO AWAY
	000244	012746 				MOV	(PC)+,-(SP)
	000246	   063 	   001 			.BYTE	51.,1
	000250	104375 				EMT	375
    108	000252	000004 				IOT			; HELP!
    109						;
    110						.EVEN
    111		000000'				.END	MIDNIT
RSX20F/TOPS-10/TOPS-20 TIME OF 	MACRO M1113  14-APR-81 11:24  PAGE 2-2
SYMBOL TABLE

BC.RTD= ****** GX	PS    = ****** GX	.COMEF= ****** GX	.MON  = ****** GX	.YEAR = ****** GX
D.CCLK= ****** GX	$$    = 000067   	.DAY  = ****** GX	.SSM  = ****** GX	..STFC= ****** GX
MIDNIT  000000RG 	.CLKSW= ****** GX	.DOW  = ****** GX

. ABS.	000000	   000
      	000254	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  549 WORDS  ( 3 PAGES)
DYNAMIC MEMORY:  2518 WORDS  ( 9 PAGES)
ELAPSED TIME:  00:00:04
[54,10]MIDNIT,[54,20]MIDNIT/-SP/CR=[54,30]MIDNIT
MIDNIT     CREATED BY  MACRO  ON 14-APR-81 AT 11:24	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

BC.RTD	= ******  GX	 2-102     
D.CCLK	= ******  GX	 2-103     
MIDNIT	  000000 RG	#2-53       2-111     
PS    	= ******  GX	 2-56      *2-56      *2-99      
$$    	= 000067	#2-105      2-105     
.CLKSW	= ******  GX	 2-104     
.COMEF	= ******  GX	 2-100     
.DAY  	= ******  GX	 2-59      *2-96      
.DOW  	= ******  GX	 2-88      *2-95      
.MON  	= ******  GX	 2-58      *2-97      
.SSM  	= ******  GX	 2-54      *2-94      
.YEAR 	= ******  GX	 2-57      *2-98      
..STFC	= ******  GX	 2-105      2-105     
MIDNIT     CREATED BY  MACRO  ON 14-APR-81 AT 11:24	PAGE 2

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		#1-38       2-105     
DIR$  		#2-107      2-107     
ERR$  		#2-107     
EXIT$S		#1-38       2-107     
.ENB6 		#1-38      #2-99      
.INH6 		#1-38      #2-56