Trailing-Edge
-
PDP-10 Archives
-
BB-H311B-RM
-
rsx20f-swskit/listings/midnit.lis
There is 1 other file named midnit.lis in the archive. Click here to see a list.
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1108 09-JAN-78 10:04
TABLE OF CONTENTS
1- 2 MIDNIT -- TIME OF DAY UPDATE TASK
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1108 09-JAN-78 10:04 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 "V01001"
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: V01001
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 .MCALL .ENB6,.INH6,EXIT$S,CALL
37 .LIST MEB
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1108 09-JAN-78 10:04 PAGE 2
MIDNIT -- TIME OF DAY UPDATE TASK
39 ;+
40 ; MIDNIT -- TIME OF DAY UPDATE TASK
41 ;
42 ; THIS TASK IS REPONSIBLE TO UPDATE THE TIME OF DAY ACROSS MIDNIGHT FOR
43 ; THE RSX20F EXECUTIVE. THIS TASK IS A NON-RESIDENT EXECUTIVE ROUTINE.
44 ;
45 ; THE TIME OF DAY IS UPDATED TO "TOMORROW" AND THEN THE -10 IS REQUESTED
46 ; TO RETURN ITS TIME OF DAY TO THE -11 FOR PURPPOSES OF SYNCHRONIZATION
47 ; ONLY. THE TIME OF DAY RETURNED BY THE -10 WILL ALWAYS BE TREATED AS
48 ; THE VALID TIME OF DAY, REGARDLESS.
49 ;-
50
51 000000 MIDNIT::
52 000000 022767 124277 000000G CMP #^D<30*60*24-1>,.SSM
53 000006 101117 BHI 70$ ; NOT REALLY MIDNITE -- GO AWAY
54 000010 .INH6 ; DISALLOW INTERRUPTS
000010 013746 000000G MOV @#PS,-(SP)
000014 112737 000300 000000G MOVB #300,@#PS
55 000022 016746 000000G MOV .YEAR,-(SP) ;;; CURRENT YEAR TO STACK
56 000026 116746 000000G MOVB .MON,-(SP) ;;; AND MONTH
57 000032 116746 000000G MOVB .DAY,-(SP) ;;; AND DAY
58 000036 005216 INC (SP) ;;; INCREMENT DAY
59 000040 122766 000002 000002 CMPB #^D2,2(SP) ;;; IS THIS FEBRUARY??
60 000046 001013 BNE 20$ ;;; NO -- GO ON
61 000050 122716 000034 CMPB #^D28,(SP) ;;; YES -- TOO MANY DAYS??
62 000054 003010 BGT 20$ ;;; NO -- GO ON
63 000056 001404 BEQ 10$ ;;; YES -- RESET TO MARCH 1
64 000060 032766 000003 000004 BIT #3,4(SP) ;;; MAYBE -- IS THIS LEAP YEAR??
65 000066 001403 BEQ 20$ ;;; YES -- GO ON
66 000070 10$:
67 000070 005016 CLR (SP) ;;; SET DAY TO 1
68 000072 005266 000002 INC 2(SP) ;;; AND MONTH TO MONTH + 1
69 000076 20$:
70 000076 122766 000013 000002 CMPB #^D11,2(SP) ;;; IS THIS DECEMBER??
71 000104 002005 BGE 30$ ;;; ALL OK IF .GE.
72 000106 005016 CLR (SP) ;;; NO -- RESET TO 1
73 000110 005066 000002 CLR 2(SP) ;;; RESET TO JANUARY
74 000114 005266 000004 INC 4(SP) ;;; SET TO YEAR + 1
75 000120 30$:
76 000120 122716 000035 CMPB #^D29,(SP) ;;; 30 DAYS??
77 000124 002010 BGE 50$ ;;; OK IF .GE.
78 000126 012700 172452 MOV #^C5325,R0 ;;; MAGIC NUMBER TO R0
79 000132 016601 000002 MOV 2(SP),R1 ;;; MONTH TO R1
80 000136 005201 INC R1 ;;; FUDGE FACTOR
81 000140 40$:
82 000140 006200 ASR R0 ;;; SHIFT MAGIC NUMBER
83 000142 077102 SOB R1,40$ ;;; TILL DONE
84 000144 103751 BCS 10$ ;;; RESET IF CC-C IS SET
85 000146 50$:
86 000146 116746 000000G MOVB .DOW,-(SP) ;;; DAY OF WEEK TO STACK
87 000152 005216 INC (SP) ;;; INCREMENT IT
88 000154 122716 000006 CMPB #^D6,(SP) ;;; IS IT OK??
89 000160 002001 BGE 60$ ;;; YES -- GO ON
90 000162 005016 CLR (SP) ;;; NO -- RESET IT
91 000164 60$:
92 000164 162767 124277 000000G SUB #^D<30*60*24-1>,.SSM ;;; FIX UP TIME OVERFLOW
93 000172 112667 000000G MOVB (SP)+,.DOW ;;; SET NEW DAY OF WEEK
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1108 09-JAN-78 10:04 PAGE 2-1
MIDNIT -- TIME OF DAY UPDATE TASK
94 000176 112667 000000G MOVB (SP)+,.DAY ;;; AND DAY
95 000202 112667 000000G MOVB (SP)+,.MON ;;; AND MONTH
96 000206 012667 000000G MOV (SP)+,.YEAR ;;; AND YEAR
97 000212 .ENB6 ;;; ALLOW INTERRUPTS
000212 012637 000000G MOV (SP)+,@#PS
98 000216 032767 000000G 000002G BIT #EF.PR1,.COMEF+2 ; CAN WE DO THIS ??
99 000224 001410 BEQ 70$ ; NO -- JUST GO AWAY
100 000226 012701 000000G MOV #BC.RTD,R1 ; YES -- FUNCTION CODE TO R1
101 000232 012703 000000G MOV #D.CCLK,R3 ; DEVICE CODE TO R3
102 000236 012704 000000G MOV #.CLKSW,R4 ; POINTER TO R4
103 000242 CALL ..STFC ; START THE FUNCTION TO SYNCH -10 AND -11
000242 004767 000000G JSR PC,..STFC
104 000246 70$:
105 000246 EXIT$S ; GO AWAY
000246 012746 MOV (PC)+,-(SP)
000250 063 001 .BYTE 51.,1
000252 104375 EMT 375
106 000254 000004 IOT ; HELP!
107 ;
108 .EVEN
109 000000' .END MIDNIT
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1108 09-JAN-78 10:04 PAGE 2-2
SYMBOL TABLE
BC.RTD= ****** GX MIDNIT 000000RG .CLKSW= ****** GX .DOW = ****** GX .YEAR = ****** GX
D.CCLK= ****** GX PS = ****** GX .COMEF= ****** GX .MON = ****** GX ..STFC= ****** GX
EF.PR1= ****** GX $$ = 000067 .DAY = ****** GX .SSM = ****** GX
. ABS. 000000 000
000256 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 557 WORDS ( 3 PAGES)
DYNAMIC MEMORY: 3104 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:37
,[54,20]MIDNIT/CR/-SP=[54,30]MIDNIT
MIDNIT CREATED BY MACRO ON 9-JAN-78 AT 10:05 PAGE 1
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
BC.RTD = ****** GX 2-100
D.CCLK = ****** GX 2-101
EF.PR1 = ****** GX 2-98
MIDNIT 000000 RG #2-51 2-109
PS = ****** GX 2-54 2-54 2-97
$$ = 000067 #2-103 2-103
.CLKSW = ****** GX 2-102
.COMEF = ****** GX 2-98
.DAY = ****** GX 2-57 *2-94
.DOW = ****** GX 2-86 *2-93
.MON = ****** GX 2-56 *2-95
.SSM = ****** GX 2-52 *2-92
.YEAR = ****** GX 2-55 *2-96
..STFC = ****** GX 2-103 2-103
MIDNIT CREATED BY MACRO ON 9-JAN-78 AT 10:05 PAGE 2
MACRO CROSS REFERENCE CREF
MACRO NAME REFERENCES
CALL #1-36 2-103
DIR$ #2-105 2-105
ERR$ #2-105
EXIT$S #1-36 2-105
.ENB6 #1-36 #2-97
.INH6 #1-36 #2-54