Trailing-Edge
-
PDP-10 Archives
-
bb-x141b-bb
-
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 11-JUL-85 13:47
TABLE OF CONTENTS
1- 2 MIDNIT -- TIME OF DAY UPDATE TASK
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1113 11-JUL-85 13:47 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, 1985 BY
7 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
8 ; ALL RIGHTS RESERVED.
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 11-JUL-85 13:47 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 101120 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 000001 000002 CMPB #^D1,2(SP) ;;; IS THIS FEBRUARY??
62 000046 001012 BNE 20$ ;;; NO -- GO ON
63 000050 122716 000034 CMPB #^D28,(SP) ;;; YES -- TOO MANY DAYS??
64 000054 003007 BGT 20$ ;;; NO -- GO ON
65 000056 032766 000003 000004 BIT #3,4(SP) ;;; MAYBE -- IS THIS LEAP YEAR??
66 000064 001403 BEQ 20$ ;;; YES -- GO ON
67 000066 10$:
68 000066 005016 CLR (SP) ;;; [**]
69 000070 005266 000002 INC 2(SP) ;;; AND MONTH TO MONTH + 1
70 000074 20$:
71 000074 122766 000013 000002 CMPB #^D11,2(SP) ;;; DECEMBER ?
72 000102 003010 BGT 30$ ;;; [**] NO -- GO ON
73 000104 122716 000036 CMPB #^D30,(SP) ;;; [**] END OF YEAR?
74 000110 002020 BGE 50$ ;;; [**] NO
75 000112 005016 CLR (SP) ;;; NO -- RESET TO 1
76 000114 005066 000002 CLR 2(SP) ;;; RESET TO JANUARY
77 000120 005266 000004 INC 4(SP) ;;; SET TO YEAR + 1
78 000124 30$:
79 000124 122716 000035 CMPB #^D29,(SP) ;;; 30 DAYS??
80 000130 002010 BGE 50$ ;;; OK IF .GE.
81 000132 012700 172452 MOV #^C5325,R0 ;;; MAGIC NUMBER TO R0
82 000136 016601 000002 MOV 2(SP),R1 ;;; MONTH TO R1
83 000142 005201 INC R1 ;;; FUDGE FACTOR
84 000144 40$:
85 000144 006200 ASR R0 ;;; SHIFT MAGIC NUMBER
86 000146 077102 SOB R1,40$ ;;; TILL DONE
87 000150 103746 BCS 10$ ;;; RESET IF CC-C IS SET
88 000152 50$:
89 000152 116746 000000G MOVB .DOW,-(SP) ;;; DAY OF WEEK TO STACK
90 000156 005216 INC (SP) ;;; INCREMENT IT
91 000160 122716 000006 CMPB #^D6,(SP) ;;; IS IT OK??
92 000164 002001 BGE 60$ ;;; YES -- GO ON
93 000166 005016 CLR (SP) ;;; NO -- RESET IT
94 000170 60$:
95 000170 162767 124277 000000G SUB #^D<30*60*24-1>,.SSM ;;; FIX UP TIME OVERFLOW
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1113 11-JUL-85 13:47 PAGE 2-1
MIDNIT -- TIME OF DAY UPDATE TASK
96 000176 112667 000000G MOVB (SP)+,.DOW ;;; SET NEW DAY OF WEEK
97 000202 112667 000000G MOVB (SP)+,.DAY ;;; AND DAY
98 000206 112667 000000G MOVB (SP)+,.MON ;;; AND MONTH
99 000212 012667 000000G MOV (SP)+,.YEAR ;;; AND YEAR
100 000216 .ENB6 ;;; ALLOW INTERRUPTS
000216 012637 000000G MOV (SP)+,@#PS
101 000222 005767 000002G TST .COMEF+2 ; [4.1.1105] CAN WE DO THIS ??
102 000226 100010 BPL 70$ ; [4.1.1105] NO -- JUST GO AWAY
103 000230 012701 000000G MOV #BC.RTD,R1 ; YES -- FUNCTION CODE TO R1
104 000234 012703 000000G MOV #D.CCLK,R3 ; DEVICE CODE TO R3
105 000240 012704 000000G MOV #.CLKSW,R4 ; POINTER TO R4
106 000244 CALL ..STFC ; START THE FUNCTION TO SYNCH -10 AND -11
000244 004767 000000G JSR PC,..STFC
107 000250 70$:
108 000250 EXIT$S ; GO AWAY
000250 012746 MOV (PC)+,-(SP)
000252 063 001 .BYTE 51.,1
000254 104375 EMT 375
109 000256 000004 IOT ; HELP!
110 ;
111 .EVEN
112 000000' .END MIDNIT
RSX20F/TOPS-10/TOPS-20 TIME OF MACRO M1113 11-JUL-85 13:47 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
000260 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 549 WORDS ( 3 PAGES)
DYNAMIC MEMORY: 2822 WORDS ( 10 PAGES)
ELAPSED TIME: 00:00:04
[54,10]MIDNIT,[54,20]MIDNIT/-SP=[54,30]MIDNIT