Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/rsx11s/queue.list
There are no other files named queue.list in the archive.
QUEUE MACRO M1110 22-AUG-79 07:10 PAGE 3
1 .TITLE QUEUE
2 .IDENT /05/
3
4 ;
5 ; COPYRIGHT (C) 1974, 1976
6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
7 ;
8 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
9 ; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
10 ;
11 ; VERSION 05
12 ;
13 ; D. N. CUTLER 3-AUG-73
14 ;
15 ; PREVIOUSLY MODIFIED BY:
16 ;
17 ; D. N. CUTLER
18 ; C. A. D'ELIA
19 ; T. J. MILLER
20 ;
21 ; MODIFIED BY:
22 ;
23 ; GENERAL QUEUE MANIPULATION ROUTINES
24 ;
25 ; MACRO LIBRARY CALLS
26 ;
27
28 .MCALL CLKDF$,TCBDF$
29 000000 CLKDF$ ;DEFINE CLOCK QUEUE CONTROL BLOCK OFFSETS
30 000000 TCBDF$ ;DEFINE TASK CONTROL BLOCK OFFSETS
31
32 ;+
33 ; **-$CLINS-CLOCK QUEUE INSERTION
34 ;
35 ; THIS ROUTINE IS CALLED TO MAKE AN ENTRY IN THE CLOCK QUEUE. THE ENTRY
36 ; IS INSERTED SUCH THAT THE CLOCK QUEUE IS ORDERED IN ASCENDING TIME.
37 ; THUS THE FRONT ENTRIES ARE MOST IMMINENT AND THE BACK LEAST.
38 ;
39 ; INPUTS:
40 ;
41 ; R0=ADDRESS OF THE CLOCK QUEUE ENTRY CORE BLOCK.
42 ; R1=HIGH ORDER HALF OF DELTA TIME.
43 ; R2=LOW ORDER HALF OF DELTA TIME.
44 ; R4=REQUEST TYPE.
45 ; R5=ADDRESS OF REQUESTING TCB OR REQUEST IDENTIFIER.
46 ;
47 ; OUTPUTS:
48 ;
49 ; THE CLOCK QUEUE ENTRY IS INSERTED IN THE CLOCK QUEUE ACCORDING
50 ; TO THE TIME THAT IT WILL COME DUE.
51 ;-
52
53 .ENABL LSB
54 000000 005020 $CLINS::CLR (R0)+ ;POINT TO TYPE FIELD AND CLEAR LINK
55 000002 110420 MOVB R4,(R0)+ ;SET REQUEST TYPE
56 000004 005200 INC R0 ;ADVANCE TO TCB ADDRESS
57 000006 010520 MOV R5,(R0)+ ;SET TCB OR REQUEST IDENTIFIER
QUEUE MACRO M1110 22-AUG-79 07:10 PAGE 3-1
58 000010 066702 000000G ADD $ABTIM,R2 ;CALCULATE ABSOLUTE TIME WHEN
59 000014 005501 ADC R1 ;REQUEST WILL COME DUE
60 000016 010220 MOV R2,(R0)+ ;SET LOW ORDER PART OF TIME
61 000020 010110 MOV R1,(R0) ;SET HIGH ORDER PART OF TIME
62 000022 012702 000000G MOV #$CLKHD,R2 ;POINT TO CLOCK QUEUE LIST HEAD
63 000026 010201 10$: MOV R2,R1 ;SAVE ADDRESS OF PREVIOUS ENTRY
64 000030 011102 MOV (R1),R2 ;GET ADDRESS OF NEXT ENTRY
65 000032 001410 BEQ 20$ ;IF EQ END OF LIST
66 000034 021062 000010 CMP (R0),C.TIM+2(R2) ;COMPARE HIGH ORDER TIMES
67 000040 101372 BHI 10$ ;IF HI NOT THIS ENTRY
68 000042 103404 BLO 20$ ;IF LO ENTRY GOES HERE
69 000044 026062 177776 000006 CMP -2(R0),C.TIM(R2) ;COMPARE LOW ORDER TIMES
70 000052 103365 BHIS 10$ ;IF HIS NOT THIS ENTRY
71 000054 162700 000010 20$: SUB #8.,R0 ;BACK UP TO FRONT OF BLOCK
72 000060 010011 MOV R0,(R1) ;SET NEW NEXT IN PREVIOUS ENTRY
73 000062 010210 MOV R2,(R0) ;SET NEXT IN NEW ENTRY
74
75
76 .IF DF L$$DRV & M$$MGE
77
78 000064 122704 000006 CMPB #C.SYST,R4 ;A SYSTEM ROUTINE REQUEST (DRIVER)?
79 000070 001003 BNE 30$ ;IF NE NO
80 000072 016760 000000G 000014 MOV KISAR5,C.AR5(R0) ;SAVE APR5 MAPPING
81
82 .ENDC
83
84
85 000100 30$: RETURN ;
86
87 ;+
88 ; **-$CLRMV-CLOCK QUEUE REMOVAL
89 ;
90 ; THIS ROUTINE IS CALLED TO REMOVE ALL ENTRIES FOR A SPECIFIED TCB ADDRESS
91 ; AND REQUEST TYPE FROM THE CLOCK QUEUE.
92 ;
93 ; INPUTS:
94 ;
95 ; R4=REQUEST TYPE.
96 ; R5=ADDRESS OF REQUESTING TCB OR SYSTEM SUBROUTINE.
97 ;
98 ; OUTPUTS:
99 ;
100 ; ALL ENTRIES FOR THE SPECIFIED TCB ADDRESS AND REQUEST TYPE ARE
101 ; REMOVED FROM THE CLOCK QUEUE. IF THE REQUEST TYPE IS NOT 'C.SYST',
102 ; THEN THE CLOCK QUEUE ENTRY CORE BLOCK IS RELEASED.
103 ;-
104
105 000102 012700 000000G $CLRMV::MOV #$CLKHD,R0 ;POINT TO CLOCK QUEUE LIST HEAD
106 000106 010003 40$: MOV R0,R3 ;SAVE ADDRESS OF PREVIOUS ENTRY
107 000110 011300 MOV (R3),R0 ;GET ADDRESS OF NEXT ENTRY
108 000112 001772 BEQ 30$ ;IF EQ END OF LIST
109 000114 120460 000002 CMPB R4,C.RQT(R0) ;REQUEST TYPE MATCH?
110 000120 001372 BNE 40$ ;IF NE NO
111 000122 020560 000004 CMP R5,C.TCB(R0) ;TCB OR SYSTEM SUBROUTINE ADDRESS MATCH?
112 000126 001367 BNE 40$ ;IF NE NO
113 000130 011013 MOV (R0),(R3) ;REMOVE ENTRY FROM LIST
114 000132 122760 000006 000002 CMPB #C.SYST,C.RQT(R0) ;SYSTEM SUBROUTINE REQUEST?
QUEUE MACRO M1110 22-AUG-79 07:10 PAGE 3-2
115 000140 001762 BEQ 40$ ;IF EQ YES CONTINUE
116 000142 CALL $DECLK ;DEALLOCATE ENTRY CORE BLOCK
117 000146 000755 BR $CLRMV ;GO AGAIN
118 .DSABL LSB
119
120 ;+
121 ; **-$QINSF-QUEUE INSERTION AT END OF LIST (FIFO)
122 ;
123 ; THIS ROUTINE IS CALLED TO MAKE AN ENTRY IN A FIRST IN FIRST OUT
124 ; LIST. THE ENTRY IS LINKED TO THE END OF THE LIST.
125 ;
126 ; INPUTS:
127 ;
128 ; R0=ADDRESS OF THE TWO WORD LISTHEAD.
129 ; R1=ADDRESS OF THE ENTRY TO BE INSERTED.
130 ;
131 ; OUTPUTS:
132 ;
133 ; THE ENTRY IS LINKED TO THE END OF THE QUEUE.
134 ;
135 ; R0 AND R1 ARE PRESERVED ACROSS CALL.
136 ;-
137
138 .ENABL LSB
139 000150 016002 000002 $QINSF::MOV 2(R0),R2 ;GET ADDRESS OF LAST ENTRY IN LIST
140 000154 000412 BR 20$ ;FINISH IN COMMON CODE
141
142 ;+
143 ; **-$QINSP-QUEUE INSERTION BY PRIORITY
144 ;
145 ; THIS ROUTINE IS CALLED TO INSERT AN ENTRY IN A PRIORITY ORDERED
146 ; LIST. THE LIST IS SEARCHED UNTIL AN ENTRY IS FOUND THAT HAS A
147 ; LOWER PRIORITY OR THE END OF THE LIST IS REACHED. THE NEW
148 ; ENTRY IS THEN LINKED INTO THE LIST AT THE APPROPRIATE POINT.
149 ;
150 ; INPUTS:
151 ;
152 ; R0=ADDRESS OF THE TWO WORD LISTHEAD.
153 ; R1=ADDRESS OF THE ENTRY TO BE INSERTED.
154 ;
155 ;
156 ; OUTPUTS:
157 ;
158 ; THE ENTRY IS LINKED INTO THE LIST BY PRIORITY.
159 ;
160 ; R0 AND R1 ARE PRESERVED ACROSS CALL.
161 ;-
162
163 000156 010003 $QINSP::MOV R0,R3 ;COPY ADDRESS OF LISTHEAD
164 000160 010302 10$: MOV R3,R2 ;SAVE ADDRESS OF CURRENT ENTRY
165 000162 011203 MOV (R2),R3 ;GET ADDRESS OF NEXT ENTRY
166 000164 001406 BEQ 20$ ;IF EQ END OF LIST
167 000166 126163 000002 000002 CMPB T.PRI(R1),T.PRI(R3) ;NEW ENTRY LOWER OR SAME PRIORITY?
168 000174 101771 BLOS 10$ ;IF LOS YES
169 000176 010311 MOV R3,(R1) ;LINK CURRENT TO NEW ENTRY
170 000200 000403 BR 30$ ;
171 000202 010160 000002 20$: MOV R1,2(R0) ;SET ADDRESS OF NEW LAST
QUEUE MACRO M1110 22-AUG-79 07:10 PAGE 3-3
172 000206 005011 CLR (R1) ;CLEAR LINK TO NEXT ENTRY
173 000210 010112 30$: MOV R1,(R2) ;LINK NEW TO PREVIOUS ENTRY
174 000212 RETURN ;
175 .DSABL LSB
176
177 ;+
178 ; **-$QMCRL-QUEUE MCR COMMAND LINE
179 ;
180 ; THIS ROUTINE IS CALLED TO QUEUE A COMMAND LINE FOR MCR.
181 ;
182 ; INPUTS:
183 ;
184 ; R1=ADDRESS OF THE COMMAND LINE CONTROL BLOCK.
185 ;
186 ; OUTPUTS:
187 ;
188 ; THE COMMAND LINE CONTROL BLOCK IS INSERTED INTO THE MCR COMMAND
189 ; LINE LIST AND MCR IS REQUESTED TO RUN.
190 ;-
191
192 000214 016700 000000G $QMCRL::MOV $MCRPT,R0 ;PICK UP MCR'S TCB ADDRESS
193 000220 CALLR $EXRQF ;PASS LINE TO MCR
194
195 ;+
196 ; **-$QRMVF-QUEUE REMOVAL FROM FRONT OF LIST
197 ;
198 ; THIS ROUTINE IS CALLED TO REMOVE THE NEXT (FRONT) ENTRY FROM A
199 ; LIST. THE LIST ORGANIZATION MAY BE EITHER FIFO OR BY PRIORITY.
200 ;
201 ; INPUTS:
202 ;
203 ; R0=ADDRESS OF THE TWO WORD LISTHEAD.
204 ;
205 ; OUTPUTS:
206 ;
207 ; C=1 IF THERE ARE NO ENTRIES IN THE LIST.
208 ; C=0 IF THE NEXT ENTRY IS REMOVED FROM THE LIST.
209 ; R1=ADDRESS OF THE ENTRY REMOVED.
210 ;
211 ; R0 IS PRESERVED ACROSS CALL.
212 ;-
213
214 .ENABL LSB
215 000224 010002 $QRMVF::MOV R0,R2 ;COPY ADDRESS OF LISTHEAD
216 000226 011203 MOV (R2),R3 ;GET ADDRESS OF NEXT ENTRY
217 000230 001013 BNE 30$ ;IF NE LIST HAS AN ENTRY
218 000232 000261 10$: SEC ;NO ENTRIES IN LIST
219 000234 RETURN ;
220
221 ;+
222 ; **-$QRMVT-QUEUE REMOVAL BY TCB ADDRESS
223 ;
224 ; THIS ROUTINE IS CALLED TO REMOVE THE NEXT ENTRY FROM A LIST THAT
225 ; MATCHES A SPECIFIED TCB ADDRESS. THE LIST ORGANIZATION MAY BE
226 ; EITHER FIFO OR BY PRIORITY.
227 ;
228 ; INPUTS:
QUEUE MACRO M1110 22-AUG-79 07:10 PAGE 3-4
229 ;
230 ; R0=ADDRESS OF THE TWO WORD LISTEAD.
231 ; R1=ADDRESS OF THE TCB TO SEARCH FOR.
232 ;
233 ; OUTPUTS:
234 ;
235 ; C=1 IF THERE IS NO ENTRY IN THE LIST THAT MATCHES THE TCB ADDRESS.
236 ; C=0 IF A MATCHING ENTRY IS REMOVED FROM THE LIST.
237 ; R1=ADDRESS OF THE ENTRY REMOVED.
238 ;
239 ; R0 IS PRESERVED ACROSS CALL.
240 ;-
241
242 000236 010003 $QRMVT::MOV R0,R3 ;COPY ADDRESS OF LISTHEAD
243 000240 010302 20$: MOV R3,R2 ;SAVE ADDRESS OF CURRENT ENTRY
244 000242 011203 MOV (R2),R3 ;GET ADDRESS OF NEXT ENTRY
245 000244 001772 BEQ 10$ ;IF EQ END OF LIST
246 000246 020103 CMP R1,R3 ;MATCH ON TCB ADDRESS?
247 000250 001403 BEQ 30$ ;IF EQ YES
248 000252 020163 000004 CMP R1,C.TCB(R3) ;MATCHING TCB ADDRESS?
249 000256 001370 BNE 20$ ;IF NE NO
250 000260 011312 30$: MOV (R3),(R2) ;CLOSE UP LIST
251 000262 001002 BNE 40$ ;IF NE NO NEW LAST
252 000264 010260 000002 MOV R2,2(R0) ;SET ADDRESS OF NEW LAST
253 000270 010301 40$: MOV R3,R1 ;SET ADDRESS OF ENTRY REMOVED
254 000272 000241 CLC ;SUCCESS
255 000274 RETURN ;
256 .DSABL LSB
257
258 000001 .END
QUEUE MACRO M1110 22-AUG-79 07:10 PAGE 3-5
SYMBOL TABLE
A$$CHK= 000000 G$$TTK= 000000 TS.BLK= 170700 T.RCVL 000012 T3.MCR= 004000
A$$CPS= 000000 H$$RTZ= 000074 TS.CKP= 000200 T.RRFL 000064 T3.NET= 000020
A$$TRP= 000000 I$$RDN= 000000 TS.CKR= 000100 T.SRCT 000063 T3.NSD= 000200
C$$ORE= 002000 KISAR5= ****** GX TS.EXE= 100000 T.STAT 000032 T3.PMD= 040000
C.AR5 000014 K$$CNT= 177546 TS.MSG= 020000 T.ST2 000034 T3.PRV= 010000
C.AST 000012 K$$CSR= 177546 TS.NRP= 010000 T.ST3 000036 T3.REM= 020000
C.CSTP= 000012 K$$IEN= 000115 TS.OUT= 000400 T.TCBL 000030 T3.ROV= 000040
C.DST 000016 K$$LDC= 000001 TS.RDN= 040000 T.UCB 000026 T3.RST= 000400
C.EFN 000003 K$$TPS= 000074 TS.RUN= 004000 T2.ABO= 000100 T3.SLV= 002000
C.LGTH= 000020 L$$ASG= 000000 T.ACTL 000052 T2.AST= 100000 V$$CTR= 001200
C.LNK 000000 L$$DRV= 000000 T.ASTL 000016 T2.BFX= 004000 V$$RSN= 000031
C.MRKT= 000000 M$$CRB= 000124 T.ATT 000054 T2.CAF= 000400 X$$DBT= 000000
C.RQT 000002 M$$MGE= 000000 T.CPCB 000004 T2.CHK= 020000 $ABTIM= ****** GX
C.RSI 000012 M$$NET= 000000 T.DPRI 000040 T2.CKD= 010000 $CLINS 000000RG
C.SCHD= 000002 M$$NT2= 000000 T.EFLG 000022 T2.DST= 040000 $CLKHD= ****** GX
C.SRC 000014 N$$LDV= 000001 T.IOC 000003 T2.FXD= 002000 $CLRMV 000102RG
C.SSHT= 000004 P$$RTY= 000000 T.LBN 000041 T2.HLT= 000200 $DECLK= ****** GX
C.SUB 000012 P$$TPT= 000000 T.LDV 000044 T2.SPN= 000004 $EXRQF= ****** GX
C.SYST= 000006 R$$DER= 000000 T.LNK 000000 T2.STP= 000020 $MCRPT= ****** GX
C.SYTK= 000010 R$$EXV= 000000 T.MXSZ 000050 T2.TIO= 001000 $QINSF 000150RG
C.TCB 000004 R$$SND= 000000 T.NAM 000006 T2.WFR= 000001 $QINSP 000156RG
C.TIM 000006 R$$11M= 000000 T.OFF 000060 T3.ACP= 100000 $QMCRL 000214RG
C.UIC 000016 R$$11S= 000000 T.PCB 000046 T3.CAL= 000100 $QRMVF 000224RG
G$$TPP= 000000 S$$YSZ= 001740 T.PRI 000002 T3.CLI= 001000 $QRMVT 000236RG
. ABS. 000070 000
000276 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2570 WORDS ( 11 PAGES)
DYNAMIC MEMORY: 4036 WORDS ( 15 PAGES)
ELAPSED TIME: 00:00:16
[11,24]QUEUE,SY0:[11,34]QUEUE/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,QUEUE