Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/rsx11s/drqio.list
There are no other files named drqio.list in the archive.
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3
1 .TITLE DRQIO
2 .IDENT /10/
3
4 ;
5 ; COPYRIGHT (C) 1974, 1978
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 10
12 ;
13 ; D. N. CUTLER 8-OCT-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 ; T. J. MILLER 8-MAR-77
24 ;
25 ; TM075 -- ADDITION OF BLOCK LOCKING SUPPORT FOR SHARED
26 ; FILES.
27 ;
28 ; T. J. MILLER 27-APR-77
29 ;
30 ; TM080 -- CORRECT ERROR IN CONDITIONALIZATION.
31 ;
32 ; T. J. MILLER 26-JUL-77
33 ;
34 ; TM097 -- DISALLOW CONTROL FUNCTIONS FROM NONPRIVILEGED
35 ; TASKS TO MOUNTED MAGTAPES.
36 ;
37 ; TM098 -- DO NOT CHECK DIAGNOSTIC SUBFUNCTION BIT ON
38 ; DEVICES NOT SUPPORTING USER MODE DIAGNOSTICS.
39 ;
40 ; T. J. MILLER 12-SEP-77
41 ;
42 ; TM102 -- ALLOW MULTIPLE I/O'S FOR CHECKPOINTABLE TASKS.
43 ;
44 ; MACRO LIBRARY CALLS
45 ;
46
47 .MCALL F11DF$,HWDDF$,PKTDF$,TCBDF$,PCBDF$
48 000000 F11DF$ ;DEFINE FILES-11 CONTROL BLOCK OFFSETS
49 000000 HWDDF$ ;DEFINE HARDWARE REGISTERS
50 000000 PKTDF$ ;DEFINE I/O PACKET OFFSETS
51 000000 TCBDF$ ;DEFINE TASK CONTROL BLOCK OFFSETS
52 000000 PCBDF$ ;DEFINE PARTITION CONTROL BLOCK OFFSETS
53
54 ;
55 ; LOCAL DATA
56 ;
57 ; TEMPORARY LOCATION TO MARK STACK ADDRESS
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-1
58 ;
59
60 000000 MSTK: .BLKW 1 ;
61
62 ; POLISH INTERPRETER DATA BASE
63 ;
64 ; FUNCTION CODE DISPATCH VECTOR
65 ;
66
67
68 .IF DF A$$CPS
69
70 000002 000062' FCDSP: .WORD FCIFC ;10-ILLEGAL FUNCTION
71 000004 000116' .WORD FCPKT ;11-FIND FILE NAME IN DIRECTORY
72 ; TM075
73 ; TM075
74 .IF DF R$$LKL ; TM075
75 ; TM075
76 .WORD UNLCK ;12-UNLOCK BLOCK ; TM075
77 ; TM075
78 .IFF ; TM075
79 ; TM075
80 000006 000062' .WORD FCIFC ;12-ILLEGAL FUNCTION
81 ; TM075
82 .ENDC ; TM075
83 ; TM075
84 ; TM075
85 000010 000116' .WORD FCPKT ;13-REMOVE FILE NAME FROM DIRECTIRY
86 000012 000116' .WORD FCPKT ;14-ENTER FILE NAME IN DIRECTORY
87 000014 000064' .WORD FCACC ;15-ACCESS FILE FOR READ
88 000016 000064' .WORD FCACC ;16-ACCESS FILE FOR READ AND WRITE
89 000020 000064' .WORD FCACC ;17-ACCESS FILE FOR READ, WRITE, AND EXTEND
90 000022 000074' .WORD FCDAC ;20-DEACCESS FILE
91 000024 000102' .WORD FCRVB ;21-READ VIRTUAL BLOCK
92 000026 000106' .WORD FCWVB ;22-WRITE VIRTUAL BLOCK
93 000030 000116' .WORD FCPKT ;23-EXTEND FILE
94 000032 000112' .WORD FCCRE ;24-CREATE FILE
95 000034 000116' .WORD FCPKT ;25-MARK FILE FOR DELETE
96 000036 000116' .WORD FCPKT ;26-READ FILE ATTRIBUTES
97 000040 000116' .WORD FCPKT ;27-WRITE FILE ATTRIBUTES
98 000042 000116' .WORD FCPKT ;30-USER MAGTAPE CONTROLL FUNCTION
99 000044 000106' .WORD FCWVB ;31-TRANSMIT PROCESS MESSAGE
100 000046 000102' .WORD FCRVB ;32-RECEIVE PROCESS MESSAGE
101 000050 000122' .WORD FCCON ;33-CONNECT TO PROCESS
102 000052 000132' .WORD FCDIS ;34-DISCONNECT FROM PROCESS
103 000054 000140' .WORD FCNCT ;35-NETWORK CONTROL FUNCTION
104 000056 000062' .WORD FCIFC ;36-ILLEGAL FUNCTION
105 000060 000062' .WORD FCIFC ;37-ILLEGAL FUNCTION
106
107
108 .IF NDF M$$NET
109
110 FCCON: ;REF LABEL IF NO NETWORK SUPPORT
111 FCDIS: ;REF LABEL IF NO NETWORK SUPPORT
112 FCNCT: ;REF LABEL IF NO NETWORK SUPPORT
113
114 .IFTF
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-2
115
116 ;
117 ; ILLEGAL FUNCTION
118 ;
119
120 000062 000732' FCIFC: .WORD IEIFC ;SET ILLEGAL FUNCTION STATUS
121
122 ;
123 ; ACCESS FILE FOR READ, READ/WRITE, OR READ/WRITE/EXTEND
124 ;
125
126 000064 001522' FCACC: .WORD CKDMO ;CHECK IF VOLUME MARKED FOR DISMOUNT
127 000066 001572' FCCAW: .WORD CKALN ;CHECK IF FILE ALREADY ACCESSED ON LUN
128 000070 001230' .WORD BDPKT ;BUILD AN I/O PACKET
129 000072 001626' .WORD CKRLK ;SYNCHRONIZE ACCESS AND EXIT
130
131 ;
132 ; DEACCESS FILE
133 ;
134
135 000074 001602' FCDAC: .WORD CKNLN ;CHECK IF FILE ACCESSED ON LUN
136 000076 001230' .WORD BDPKT ;BUILD AN I/O PACKET
137 000100 001626' .WORD CKRLK ;EXIT
138
139 ;
140 ; READ VIRTUAL BLOCK
141 ;
142
143 000102 001602' FCRVB: .WORD CKNLN ;CHECK IF FILE ACCESSED ON LUN
144 000104 001534' .WORD CKRAC ;CHECK READ ACCESS AND EXIT
145
146 ;
147 ; WRITE VIRTUAL BLOCK
148 ;
149
150 000106 001602' FCWVB: .WORD CKNLN ;CHECK IF FILE ACCESSED ON LUN
151 000110 001542' .WORD CKWAC ;CHECK WRITE ACCESS AND EXIT
152
153 ;
154 ; CREATE FILE
155 ;
156
157 000112 001522' FCCRE: .WORD CKDMO ;CHECK IF VOLUME MARKED FOR DISMOUNT
158 000114 001612' .WORD CKACC ;CHECK IF ACCESS ALSO REQUESTED
159
160 ;
161 ; BUILD AN I/O PACKET FOR FIND, ENTER, REMOVE, EXTEND, DELETE, READ
162 ; ATTRIBUTES, AND WRITE ATTRIBUTES
163 ;
164
165 000116 001230' FCPKT: .WORD BDPKT ;BUILD AN I/O PACKET
166 000120 001632' .WORD CKXIT ;EXIT
167
168 ; ; TM075
169 ; EXPLICIT UNLOCK BLOCK FUNCTION ; TM075
170 ; ; TM075
171 ; TM075
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-3
172 ; TM075
173 .IF DF R$$LKL ; TM075
174 ; TM075
175 UNLCK: .WORD CKNLN ;CHECK IF FILE ACCESSED ON LUN ; TM075
176 .WORD UNLXT ;SET REGISTERS AND EXIT ; TM075
177 ; TM075
178 .ENDC ; TM075
179 ; TM075
180 ; TM075
181 .IFF
182
183 ;
184 ; CONNECT TO PROCESS
185 ;
186
187 000122 001522' FCCON: .WORD CKDMO ;CHECK IF VOLUME MARKED FOR DISMOUNT
188 000124 001572' .WORD CKALN ;CHECK IF PROCESS ALREADY CONNECTED ON LUN
189 000126 001474' .WORD CKCON ;ADDRESS CHECK CONNECT BUFFER AND EXIT
190 000130 001626' .WORD CKRLK ;INTERLOCK LUN USAGE AND EXIT
191
192 ;
193 ; DISCONNECT FROM PROCESS
194 ;
195
196 000132 001602' FCDIS: .WORD CKNLN ;CHECK IF PROCESS CONNECTED ON LUN
197 000134 001470' .WORD CKDIS ;CHECK BUFFER AND COPY PARAMETERS
198 000136 001626' .WORD CKRLK ;INTERLOCK LUN USAGE AND EXIT
199
200 ;
201 ; NETWORK CONTROL FUNCTION
202 ;
203
204 000140 001522' FCNCT: .WORD CKDMO ;CHECK IF VOLUME MARKED FOR DISMOUNT
205 000142 001474' .WORD CKCON ;ADDRESS CHECK BUFFER
206 000144 001632' .WORD CKXIT ;EXIT
207
208
209 .ENDC
210
211
212 .ENDC
213
214
215 ;+
216 ; **-$DRQIO-QUEUE I/O REQUEST
217 ; **-$DRQIW-QUEUE I/O REQUEST AND WAIT.
218 ;
219 ; THESE DIRECTIVES INSTRUCT THE SYSTEM TO PLACE AN I/O REQUEST IN A
220 ; QUEUE OF PRIORITY ORDERED REQUESTS FOR A DEVICE-UNIT SPECIFIED BY
221 ; A LOGICAL UNIT NUMBER. IN ADDITION, IF THE DIRECTIVE IS QIO AND
222 ; WAIT AND AN EVENT FLAG IS SPECIFIED, THE TASK IS PUT INTO A WAIT STATE
223 ; FOR THE SPECIFIED EVENT FLAG.
224 ;
225 ; DPB FORMAT:
226 ;
227 ; WD. 00 -- DIC(1./3.),DPB SIZE(12.).
228 ; WD. 01 -- I/O FUNCTION CODE.
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-4
229 ; WD. 02 -- LUN AND UNUSED BYTE.
230 ; WD. 03 -- EVENT FLAG NUMBER AND PRIORITY (PRIORITY IS IGNORED).
231 ; WD. 04 -- ADDRESS OF I/O STATUS BLOCK.
232 ; WD. 05 -- ADDRESS OF AST SERVICE ROUTINE.
233 ; WD. 06 -- PARAMETER 1.
234 ; WD. 07 -- PARAMETER 2.
235 ; WD. 10 -- PARAMETER 3.
236 ; WD. 11 -- PARAMETER 4.
237 ; WD. 12 -- PARAMETER 5.
238 ; WD. 13 -- PARAMETER 6.
239 ;
240 ; INPUTS:
241 ;
242 ; R2=ADDRESS OF THE TASK STATUS WORD OF THE CURRENT TASK.
243 ; R3=ADDRESS OF THE I/O FUNCTION CODE IN THE DPB.
244 ; R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
245 ; R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
246 ;
247 ; OUTPUTS: (DIRECTIVE STATUS AND PS RETURNED TO TASK)
248 ;
249 ; C=0 IF DIRECTIVE IS SUCCESSFULLY COMPLETED.
250 ; DIRECTIVE STATUS OF +1 IS RETURNED.
251 ; C=1 IF DIRECTIVE IS REJECTED.
252 ; DIRECTIVE STATUS OF 'D.RS5' IS RETURNED IF SPECIFIED
253 ; LUN IS NOT ASSIGNED.
254 ;-
255
256 .ENABL LSB
257 000146 012346 $DRQIO::MOV (R3)+,-(SP) ;SAVE I/O FUNCTION CODE
258 000150 CALL $MPLUN ;MAP LUN TO UCB ADDRESS ; TM102
259 000154 103001 BCC 10$ ;IF CC LUN ASSIGNED ;**-7
260 000156 DRSTS D.RS5 ;SET DIRECTIVE STATUS
261 000160 032711 000001 10$: BIT #1,(R1) ;OPERATION PENDING?
262 000164 001410 BEQ 15$ ;IF EQ NO
263 000166 062706 000006 ADD #6,SP ;REMOV FUNC, RETURN AND +1 FROM STACK ; TM102
264 000172 011400 MOV (R4),R0 ;GET SAVED TASK STACK POINTER ;**-1
265 000174 162760 000002 000004 SUB #2,4(R0) ;BACKUP TASK PC SO EMT WILL BE RE-EXECUTED
266 000202 CALLR $TKWSE ;WAITFOR SIGNIFICANT EVENT
267 000206 15$: ;
268
269
270 .IF DF L$$DRV
271
272 000206 011002 MOV (R0),R2 ;GET DCB ADDRESS
273 000210 005762 000000G TST D.DSP(R2) ;IS THE DRIVER RESIDENT?
274 000214 001001 BNE 16$ ;IF NE YES
275 000216 DRSTS D.RS6 ;SET DIRECTIVE STATUS
276 000220 16$: ;
277
278 .ENDC
279
280
281 000220 010046 MOV R0,-(SP) ;SAVE POINTER TO UCB
282 000222 010146 MOV R1,-(SP) ;SAVE POINTER TO SECOND LUN WORD
283 000224 111346 MOVB (R3),-(SP) ;SAVE EVENT FLAG NUMBER
284 000226 CALL $CEFN ;CONVERT EVENT FLAG NUMBER
285 000232 040011 BIC R0,(R1) ;CLEAR SPECIFIED EVENT FLAG
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-5
286 000234 010346 MOV R3,-(SP) ;SAVE ADDRESS OF I/O STATUS BLOCK ADDRESS
287 000236 011300 MOV (R3),R0 ;GET ADDRESS OF I/O STATUS BLOCK ADDRESS
288 000240 001404 BEQ 20$ ;IF EQ NO I/O STATUS BLOCK SPECIFIED
289
290
291 .IF DF M$$MGE
292
293 000242 005046 $DQLM1::CLR -(SP) ;ZERO I/O STATUS BLOCK
294 000244 006620 MTPI (R0)+ ;
295 000246 005046 CLR -(SP) ;
296 000250 006610 MTPI (R0) ;
297 000252 $DQLM2:: ;REF LABEL
298
299 .IFF
300
301
302 .IF DF A$$CHK
303
304 MOV #4,R1 ;SET LENGTH OF I/O STATUS BLOCK
305 CALL $ACHKW ;ADDRESS CHECK I/O STATUS BLOCK
306
307 .ENDC
308
309
310 CLR (R0)+ ;CLEAR I/O STATUS BLOCK
311 CLR (R0) ;
312
313 .ENDC
314
315
316 000252 20$: CALL $ALPKT ;ALLOCATE AN I/O PACKET
317 ; TM075
318 ; TM075
319 .IF DF R$$LKL ; TM075
320 ; TM075
321 CLR I.PRM+16(R0) ;INITIALLY CLEAR LOCK ENTRY POINTER ; TM075
322 ; TM075
323 .ENDC ; TM075
324 ; TM075
325 ; TM075
326 000256 105265 000003 INCB T.IOC(R5) ;INCREMENT I/O REQUEST COUNT
327 000262 012603 MOV (SP)+,R3 ;RETRIEVE ADDRESS OF I/O STATUS BLOCK ADDRESS
328 000264 126327 177770 000003 CMPB -10(R3),#3 ;IS FUNCTION QIO AND WAIT?
329 000272 001011 BNE 25$ ;IF NE NO
330 000274 010046 MOV R0,-(SP) ;SAVE PACKET ADDRESS
331 000276 116600 000002 MOVB 2(SP),R0 ;PICK UP EVENT FLAG NUMBER
332 000302 001404 BEQ 24$ ;IF EQ NONE SPECIFIED
333 000304 CALL $CEFI ;CONVERT FLAG TO MASK AND ADDRESS
334 000310 CALL $DRWFS ;PUT TASK IN WAIT STATE
335 000314 012600 24$: MOV (SP)+,R0 ;RESTORE PACKET ADDRESS
336 000316 010004 25$: MOV R0,R4 ;COPY PACKET ADDRESS
337 000320 005724 TST (R4)+ ;POINT TO SECOND WORD IN PACKET
338 000322 116524 000002 MOVB T.PRI(R5),(R4)+ ;PRIORITY IS THAT OF ISSUING TASK
339 000326 112624 MOVB (SP)+,(R4)+ ;INSERT EVENT FLAG NUMBER
340 000330 010524 MOV R5,(R4)+ ;INSERT TCB ADDRESS
341 000332 012624 MOV (SP)+,(R4)+ ;INSERT POINTER TO SECOND LUN WORD
342 000334 012605 MOV (SP)+,R5 ;RETRIEVE UCB ADDRESS
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-6
343 000336 010524 MOV R5,(R4)+ ;INSERT UCB ADDRESS
344 000340 012614 MOV (SP)+,(R4) ;INSERT I/O FUNCTION CODE
345 000342 010046 MOV R0,-(SP) ;SAVE ADDRESS OF I/O PACKET
346 000344 005046 CLR -(SP) ;CLEAR ADDRESS OF SECONDARY CONTROL BLOCK
347 000346 010667 177426 MOV SP,MSTK ;MARK STACK ADDRESS
348 000352 012446 MOV (R4)+,-(SP) ;SAVE I/O FUNCTION CODE
349 000354 005002 CLR R2 ;ASSUME NO I/O STATUS BLOCK SPECIFIED
350 000356 012300 MOV (R3)+,R0 ;GET ADDRESS OF I/O STATUS BLOCK
351 000360 001402 BEQ 30$ ;IF EQ NONE SPECIFIED
352 000362 CALL $RELOC ;RELOCATE I/O STATUS BLOCK ADDRESS
353 000366 010024 30$: MOV R0,(R4)+ ;INSERT VIRTUAL ADDRESS OF I/O STATUS BLOCK
354 000370 010124 MOV R1,(R4)+ ;INSERT RELOCATION BIAS
355 000372 010224 MOV R2,(R4)+ ;INSERT DISPLACEMENT ADDRESS
356 000374 012324 MOV (R3)+,(R4)+ ;INSERT AST SERVICE ROUTINE ADDRESS
357 000376 011602 MOV (SP),R2 ;RETRIEVE I/O FUNCTION CODE
358 000400 105002 CLRB R2 ;CLEAR MODIFIER FLAGS
359 000402 000302 SWAB R2 ;SWAP FUNCTION CODE INTO RIGHT BYTE
360 000404 001545 BEQ FCKIL ;IF EQ KILL I/O FUNCTION
361
362
363 .IF DF M$$MUP
364
365 MOV U.OWN(R5),R0 ;IS THE DEVICE OWNED?
366 BEQ 35$ ;IF EQ NO
367 BITB #US.PUB,U.ST2(R5) ;PUBLIC ACCESS ALLOWED?
368 BNE 35$ ;IF NE YES
369 MOV $TKTCB,R1 ;POINT TO CURRENT TASK'S TCB
370 CMP T.UCB(R1),R0 ;DEVICE OWNED BY CURRENT TASK?
371 BEQ 35$ ;IF EQ YES
372 BIT #T3.PRV,T.ST3(R1) ;CURRENT TASK PRIVILEGED?
373 BNE 35$ ;IF NE YES
374 JMP IEPRI ;ELSE PRIVILEGE VIOLATION
375 35$: ;ACCESS ALLOWED
376
377 .ENDC
378
379
380 000406 020227 000037 CMP R2,#31. ;FUNCTION CODE IN RANGE?
381 000412 101147 BHI IEIFC ;IF HI NO
382 000414 011501 MOV (R5),R1 ;GET ADDRESS OF DEVICE DCB
383 000416 062701 000000G ADD #D.MSK,R1 ;ASSUME FUNCTION CODE IN 0-15. RANGE
384 000422 020227 000017 CMP R2,#15. ;0-15. FUNCTION CODE?
385 000426 101404 BLOS 40$ ;IF LOS YES
386 000430 062701 000010 ADD #10,R1 ;POINT TO SECOND MASK SET
387 000434 162702 000020 SUB #16.,R2 ;REDUCE FUNCTION CODE
388 000440 006302 40$: ASL R2 ;CONVERT TO WORD INDEX
389 000442 016202 000000G MOV $BTMSK(R2),R2 ;GET FUNCTION MASK WORD
390 000446 030221 BIT R2,(R1)+ ;IS THIS A LEGAL FUNCTION?
391 000450 001530 BEQ IEIFC ;IF EQ NO
392 000452 132765 000000G 000000G BITB #US.OFL,U.ST2(R5) ;DEVICE OFFLINE?
393 000460 001127 BNE IEOFL ;IF NE YES
394 000462 030221 BIT R2,(R1)+ ;IS THIS A CONTROL FUNCTION?
395 000464 001130 BNE FCCTL ;IF NE YES
396 000466 030221 BIT R2,(R1)+ ;IS FUNCTION NOP'ED?
397 000470 001115 BNE ISSUC ;IF NE YES
398
399
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-7
400 .IF DF A$$CPS
401
402 000472 005765 000000G TST U.CW1(R5) ;MOUNTABLE DEVICE?
403 000476 100043 BPL 80$ ;IF PL NO
404 000500 132765 000000C 000000G BITB #US.MNT!US.FOR,U.STS(R5) ;DEVICE MOUNTED AND NOT FOREIGN?
405 000506 001021 BNE 60$ ;IF NE NO
406 000510 030211 BIT R2,(R1) ;ACP FUNCTION?
407 000512 001422 BEQ 70$ ;IF EQ NO
408 000514 116602 000001 MOVB 1(SP),R2 ;RETRIEVE I/O FUNCTION CODE
409 000520 162702 000010 SUB #10,R2 ;NORMALIZE FOR POLISH DISPATCH
410 000524 002411 BLT 50$ ;IF LT TABLE INCONSISTANCY
411 000526 006302 ASL R2 ;CONVERT TO WORD INDEX
412 000530 010546 MOV R5,-(SP) ;SAVE UCB ADDRESS FOR POLISH ROUTINES
413 000532 010500 MOV R5,R0 ;
414 000534 016401 177762 MOV I.LN2-I.PRM(R4),R1 ;SAVE ADDRESS OF SECOND LUN WORD
415 000540 010146 MOV R1,-(SP) ;FOR POLISH ROUTINES
416 000542 016205 000002' MOV FCDSP(R2),R5 ;GET ADDRESS OF POLISH VECTOR
417 000546 000135 JMP @(R5)+ ;EXECUTE POLISH ROUTINE
418
419 ;
420 ; DEVICE TABLE MASK WORD INCONSISTANCY
421 ;
422
423 000550 50$: CRASH ;
424
425 ;
426 ; DEVICE NOT MOUNTED OR MOUNTED AS FOREIGN
427 ;
428
429 000552 030211 60$: BIT R2,(R1) ;ACP FUNCTION?
430 000554 001012 BNE 75$ ;IF NE YES
431 000556 000426 BR FCTRN ;
432
433 ;
434 ; DEVICE MOUNTED AND NOT FOREIGN BUT NOT ACP FUNCTION
435 ;
436
437 000560 022716 000000G 70$: CMP #IO.LOV,(SP) ;LOAD OVERLAY FUNCTION?
438 000564 001423 BEQ FCTRN ;IF EQ YES
439 000566 016700 000000G MOV $TKTCB,R0 ;GET ADDRESS OF TCB OF CURRENT TASK
440 000572 032760 010000 000036 BIT #T3.PRV,T.ST3(R0) ;TASK PRIVILEGED?
441 000600 001015 BNE FCTRN ;IF NE YES
442 000602 000167 000350 75$: JMP IEPRI ;PRIVILEGE VIOLATION
443
444 .ENDC
445
446
447 ;
448 ; DEVICE IS NOT MOUNTABLE
449 ;
450
451 000606 030211 80$: BIT R2,(R1) ;ACP FUNCTION?
452 000610 001411 BEQ FCTRN ;IF EQ NO
453
454 ;
455 ; FUNCTION IS A FILE STRUCTURE FUNCTION FOR A NONFILE STRUCTURED DEVICE. BY DEF-
456 ; INITION THIS MUST BE A READ OR WRITE VIRUTAL SINCE ALL OTHER FUNCTIONS WOULD
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-8
457 ; HAVE BEEN EITHER ILLEGAL OR NOP'ED. MAP FUNCTION TO IT LOGICAL COUNTERPART.
458 ;
459
460 000612 012764 000000G 177766 MOV #IO.RLB,I.FCN-I.PRM(R4) ;ASSUME FUNCTION IS READ VIRTUAL
461 000620 022716 000000G CMP #IO.RVB,(SP) ;READ VIRTUAL FUNCTION?
462 000624 001403 BEQ FCTRN ;IF EQ YES
463 000626 012764 000000G 177766 MOV #IO.WLB,I.FCN-I.PRM(R4) ;SET FUNCTION TO WRITE LOGICAL BLOCK
464 .DSABL LSB
465
466 ;
467 ; FUNCTION IS A TRANSFER FUNCTION-ADDRESS CHECK AND MAP TRANSFER
468 ;
469
470 000634 012300 FCTRN: MOV (R3)+,R0 ;GET ADDRESS OF USER BUFFER
471
472
473 .IF DF A$$CHK!M$$MGE
474
475 000636 116501 000000G MOVB U.CTL(R5),R1 ;GET CONTROL BYTE
476 000642 100003 BPL 10$ ;IF PL BYTE ALIGNMENT ALLOWED
477 000644 032700 000001 BIT #1,R0 ;IS BUFFER BYTE ALIGNED?
478 000650 001022 BNE 30$ ;IF NE YES-ALIGNMENT ERROR ; TM097
479 000652 042701 000000C 10$: BIC #^C<UC.LGH>,R1 ;CLEAR ALL BUT LENGTH MODULO BITS ;**-1
480 000656 030113 BIT R1,(R3) ;DOES LENGTH HAVE CORRECT MODULUS?
481 000660 001016 BNE 30$ ;IF NE NO-ALIGNMENT ERROR ; TM097
482 000662 011301 MOV (R3),R1 ;GET LENGTH OF BUFFER IN BYTES ;**-1
483 000664 001515 BEQ IESPC ;IF EQ ILLEGAL BUFFER
484 000666 CALL $ACHKB ;ADDRESS CHECK BUFFER
485 000672 103512 BCS IESPC ;IF CS ADDRESS CHECK ERROR
486
487 .ENDC
488
489
490 000674 CALL $RELOC ;RELOCATE USER BUFFER ADDRESS
491
492
493 .IF DF M$$MGE
494
495 000700 005716 TST (SP) ;VIRTUAL I/O FUNCTION?
496 000702 001402 BEQ 20$ ;IF EQ YES
497 000704 CALL $MPPHY ;MAP TO 18 BIT PHYSICAL ADDRESS
498
499 .ENDC
500
501
502 000710 010124 20$: MOV R1,(R4)+ ;INSERT RELOCATION BIAS
503 000712 010224 MOV R2,(R4)+ ;INSERT DISPLACEMENT ADDRESS
504 000714 000415 BR FCXFR ;
505 000716 000506 30$: BR IEBYT ; ; TM097
506
507 ;
508 ; FUNCTION IS A KILL I/O FUNCTION-FLUSH I/O QUEUE OF TASK REQUESTS
509 ;
510
511 000720 FCKIL: CALL $IOKIL ;FLUSH I/O QUEUE
512
513 ;
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-9
514 ; FUNCTION IS A NOP'ED FUNCTION-DECLARE SUCCESSFUL COMPLETION STATUS
515 ;
516
517 .ENABL LSB ; TM097
518 000724 012704 000000C ISSUC: MOV #IS.SUC&377,R4 ;SET SUCCESSFUL COMPLETION CODE
519 000730 000405 BR 10$ ; ; TM097
520 ;**-1
521 ;
522 ; FUNCTION IS AN ILLEGAL FUNCTION-DECLARE ILLEGAL FUNCTION CODE STATUS
523 ;
524
525 000732 012704 000000C IEIFC: MOV #IE.IFC&377,R4 ;SET ILLEGAL FUNCTION CODE
526 000736 000517 BR IECMN ;
527
528 ;
529 ; SPECIFIED DEVICE IS OFFLINE
530 ;
531
532 000740 012704 000000C IEOFL: MOV #IE.OFL&377,R4 ;SET DEVICE OFFLINE STATUS
533 000744 000514 10$: BR IECMN ; ; TM097
534 .DSABL LSB ; TM097
535 ;**-1
536 ;
537 ; FUNCTION IS A CONTROL FUNCTION-COPY REMAINDER OF DPB
538 ;
539
540 000746 FCCTL: ;REF LABEL ; TM097
541 ; TM097
542 ; TM097
543 .IF DF A$$NSI ; TM097
544 ; TM097
545 TST U.CW1(R5) ;MOUNTABLE DEVICE? ; TM097
546 BPL 10$ ;IF PL NO ; TM097
547 BITB #US.MNT!US.FOR,U.STS(R5) ;MOUNTED AND NOT FOREIGN? ; TM097
548 BNE 10$ ;IF NE NO ; TM097
549 BITB #US.LAB,U.STS(R5) ;IS IT AN ANSI TAPE? ; TM097
550 BEQ 10$ ;IF EQ NO ; TM097
551 MOV $TKTCB,R0 ;POINT TO CURRENT TASK TCB ; TM097
552 BIT #T3.PRV,T.ST3(R0) ;TASK PRIVILEGED? ; TM097
553 BEQ IEPRI ;IF EQ NO ; TM097
554 ; TM097
555 .ENDC ; TM097
556 ; TM097
557 ; TM097
558 000746 012324 10$: MOV (R3)+,(R4)+ ;INSERT PARAMETER 1 ; TM097
559 000750 012324 FCXFR: MOV (R3)+,(R4)+ ;INSERT PARAMETER 2 ;**-1
560 000752 012324 MOV (R3)+,(R4)+ ;INSERT PARAMETER 3
561 000754 012324 MOV (R3)+,(R4)+ ;INSERT PARAMETER 4
562 000756 012324 MOV (R3)+,(R4)+ ;INSERT PARAMETER 5
563 000760 011314 MOV (R3),(R4) ;INSERT PARAMETER 6
564
565
566 .IF DF D$$IAG
567
568 BITB #IQ.UMD,(SP) ;IS THIS A DIAGNOSTIC FUNCTION?
569 BEQ 10$ ;IF EQ NO
570 BIT #DV.UMD,U.CW1(R5) ;DOES DEVICE SUPPORT DIAGNOSTICS? ; TM098
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-10
571 BEQ 10$ ;IF EQ NO ; TM098
572 CMPB 1(SP),#IO.ATT/256. ;IS THIS AN ATTACH FUNCTION?
573 BEQ 10$ ;IF EQ YES, SKIP RELOCATION
574 CMPB 1(SP),#IO.DET/256. ;IS THIS A DETACH FUNCTION?
575 BEQ 10$ ;IF EQ YES
576 BITB #US.UMD,U.ST2(R5) ;IS DEVICE ATTACHED FOR DIAGNOSTICS?
577 BEQ IEPRI ;IF EQ NO, PRIVILEGE VIOLATION
578 MOV (R4),R0 ;PICK UP REGISTER BUFFER ADDRESS
579
580
581 .IF DF A$$CHK!M$$MGE
582
583 MOV #40.*2,R1 ;PICK UP MAX LENGTH
584 CALL $ACHCK ;ADDRESS CHECK REGISTER BUFFER
585 BCS IESPC ;IF CS ADDRESS CHECK FAILED
586
587 .ENDC
588
589
590 CALL $RELOC ;RELOCATE REGISTER BUFFER
591 MOV R1,(R4)+ ;STORE KISAR6 BIAS
592 MOV R2,(R4) ;STORE DISPLACEMENT
593 10$: ;REF LABEL
594
595 .ENDC
596
597
598 000762 022726 000000G CMP #IO.LOV,(SP)+ ;IS THIS A LOAD OVERLAY FUNCTION?
599 000766 001021 BNE FCXIT ;IN NE NO
600 000770 005765 000000G TST U.CW1(R5) ;MOUNTABLE DEVICE?
601 000774 100016 BPL FCXIT ;IF PL NO
602 000776 016703 000000G MOV $TKTCB,R3 ;GET ADDRESS OF TCB OF CURRENT TASK
603 001002 016300 000044 MOV T.LDV(R3),R0 ;GET UCB ADDRESS OF LOAD DEVICE
604 001006 CALL $MPLND ;MAP TO ACTUAL UCB ADDRESS
605 001012 020005 CMP R0,R5 ;LOAD DEVICE UCB MATCH SPECIFIED UCB?
606 001014 001044 BNE IEOVR ;IF NE NO
607 001016 066344 000042 ADD T.LBN+1(R3),-(R4) ;ADD IN LOW PART OF TASK LOGICAL
608 001022 005544 ADC -(R4) ;BLOCK NUMBER
609 001024 116300 000041 MOVB T.LBN(R3),R0 ;GET HIGH BYTE OF TASK LOGICAL BLOCK NUMBER
610 001030 060014 ADD R0,(R4) ;ADD IN HIGH PART
611 001032 005726 FCXIT: TST (SP)+ ;CLEAN STACK
612 001034 012601 MOV (SP)+,R1 ;RETRIEVE ADDRESS OF I/O PACKET
613
614 ;+
615 ; **-$DRQRQ-QUEUE I/O REQUEST
616 ;
617 ; THIS ROUTINE IS CALLED TO INSERT AN I/O PACKET IN A CONTROLLER QUEUE AND
618 ; CALL THE DRIVER TO INITIATE ACTIVITY ON THE DEVICE.
619 ;
620 ; INPUTS:
621 ;
622 ; R1=ADDRESS OF THE I/O PACKET.
623 ; R5=ADDRESS OF THE UNIT CONTROL BLOCK.
624 ;
625 ; OUTPUTS:
626 ;
627 ; THE I/O PACKET IS PLACED IN THE CONTROLLER QUEUE AND ACTIVITY
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-11
628 ; IS INITIATED ON THE DEVICE.
629 ;
630 ; NOTE: R4 IS DESTROYED BY THIS ROUTINE.
631 ;-
632
633 001036 016504 000000G $DRQRQ::MOV U.SCB(R5),R4 ;GET ADDRESS OF STATUS CONTROL BLOCK
634 001042 132765 000000G 000000G BITB #UC.QUE,U.CTL(R5) ;QUEUE PACKET BEFORE CALL?
635 001050 001003 BNE 10$ ;IF NE NO
636 001052 010400 MOV R4,R0 ;SET ADDRESS OF I/O QUEUE LISTHEAD
637 001054 CALL $QINSP ;QUEUE I/O PACKET IN DEVICE QUEUE
638 001060 011502 10$: MOV (R5),R2 ;RETRIEVE ADDRESS OF DEVICE CONTROL BLOCK
639
640
641 .IF DF L$$DRV&M$$MGE
642
643 001062 016746 172352 MOV KISAR5,-(SP) ;SAVE APR5
644 001066 016203 000000G MOV D.PCB(R2),R3 ;GET DRIVER PCB ADDRESS
645 001072 001403 BEQ 20$ ;IF EQ DRIVER IS PART OF EXEC
646 001074 016367 000014 172352 MOV P.REL(R3),KISAR5 ;MAP THE DRIVER
647 001102 20$: ;
648
649 .IFTF
650
651 001102 016202 000000G MOV D.DSP(R2),R2 ;GET ADDRESS OF DRIVER DISPATCH TABLE
652
653 .IFF
654
655 CALLR @D.VINI(R2) ;CALL DEVICE INITIATOR
656
657 .IFT
658
659 001106 CALL @D.VINI(R2) ;CALL DRIVER INITIATOR
660 001112 012667 172352 MOV (SP)+,KISAR5 ;RESTORE APR5
661 001116 RETURN ;
662
663 .ENDC
664
665
666
667 ;
668 ; ILLEGAL BUFFER ADDRESS SPECIFIED-DECLARE ILLEGAL BUFFER STATUS
669 ;
670
671 001120 012704 000000C IESPC: MOV #IE.SPC&377,R4 ;SET ILLEGAL BUFFER CODE
672 001124 000424 BR IECMN ;
673
674 ;
675 ; ILLEGAL LOAD OVERLAY UCB-DECLARE ILLEGAL LOAD OVERLAY FUNCTION STATUS
676 ;
677
678 001126 012704 000000C IEOVR: MOV #IE.OVR&377,R4 ;SET ILLEGAL LOAD OVERLAY CODE
679 001132 000421 BR IECMN ;
680
681 ;
682 ; ILLEGAL BYTE COUNT OR ALIGNMENT-DECLARE ODD BYTE STATUS
683 ;
684
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-12
685 001134 012704 000000C IEBYT: MOV #IE.BYT&377,R4 ;SET ODD BYTE STATUS
686
687
688 .IF DF A$$CPS
689
690 001140 000416 BR IECMN ;
691
692 ;
693 ; NO BUFFER SPACE AVAILABLE-SET NO BUFFER AVAILABLE STATUS
694 ;
695
696 001142 012704 000000C IENOD: MOV #IE.NOD&377,R4 ;SET NO BUFFER AVAILABLE CODE
697 001146 000413 BR IECMN ;
698
699 ;
700 ; BAD PARAMETER-SET BAD PARAMETER STATUS
701 ;
702
703 001150 012704 000000C IEBAD: MOV #IE.BAD&377,R4 ;SET BAD PARAMETER CODE
704 001154 000410 BR IECMN ;
705
706 ;
707 ; PRIVILEGE VIOLATION-SET PRIVILEGE VIOLATION STATUS
708 ;
709
710 .IFTF ; TM080
711 ; TM080
712 ; TM080
713 .IF DF A$$CPS!D$$IAG ; TM080
714 ; TM080
715 001156 012704 000000C IEPRI: MOV #IE.PRI&377,R4 ;SET PRIVILEGE VIOLATION CODE
716 001162 000405 BR IECMN ;
717
718 .ENDC ; TM080
719 ; TM080
720 ; TM080
721 .IFT ; TM080
722 ; TM080
723 ;
724 ; FILE ALREADY ACCESSED ON LUN-SET FILE ALREADY ACCESSED STATSU
725 ;
726
727 001164 012704 000000C IEALN: MOV #IE.ALN&377,R4 ;SET FILE ALREADY ACCESSED CODE
728 001170 000402 BR IECMN ;
729
730 ;
731 ; NO FILE ACCESSED ON LUN-SET NO FILE ACCESSED STATUS
732 ;
733
734 001172 012704 000000C IENLN: MOV #IE.NLN&377,R4 ;SET NO FILE ACCESSED STATUS
735
736 ;
737 ; COMMON ERROR EXIT
738 ;
739
740
741 .IFTF
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-13
742
743 001176 016706 176576 IECMN: MOV MSTK,SP ;RESET STACK POINTER
744 001202 012600 MOV (SP)+,R0 ;RETRIEVE ADDRESS OF SECONDARY CONTROL BLOCK
745 001204 001402 BEQ 10$ ;IF EQ NONE
746 001206 CALL $DEPKT ;DEALLOCATE SECONDARY CONTROL BLOCK
747 001212 010400 10$: MOV R4,R0 ;SET FINAL I/O STATUS
748 001214 005001 CLR R1 ;CLEAR SECOND I/O STATUS WORD
749 001216 012603 MOV (SP)+,R3 ;RETRIEVE ADDRESS OF I/O PACKET
750 001220 016305 000010 MOV I.UCB(R3),R5 ;RETRIEVE UCB ADDRESS
751 001224 CALLR $IOFIN ;FINISH OFF I/O OPERATION
752
753 ;
754 ; BUILD AN I/O PACKET
755 ;
756
757 .IFT
758
759 001230 012701 000004 BDPKT: MOV #2*2,R1 ;SET LENGTH OF FILE ID BLOCK
760 001234 CALL OPPRM ;INSERT OPTIONAL FILE ID BLOCK
761
762 ;
763 ; BUILD ATTRIBUTE POINTER BLOCK
764 ;
765
766 001240 012324 ATRBK: MOV (R3)+,(R4)+ ;ATTRIBUTE DESCRIPTOR BLOCK SPECIFIED?
767 001242 001461 BEQ MOVE3 ;IF EQ NO
768 001244 010346 MOV R3,-(SP) ;SAVE ADDRESS OF NEXT DPB WORD
769 001246 012701 000044 MOV #I.LGTH,R1 ;SET LENGTH OF SECONDARY CONTROL BLOCK
770 001252 CALL $ALOCB ;ALLOCATE SECONDARY CONTROL BLOCK
771 001256 103731 BCS IENOD ;IF CS NO STORAGE AVAILABLE
772 001260 010077 176514 MOV R0,@MSTK ;SAVE ADDRESS OF SECONDARY CONTROL BLOCK
773
774
775 .IF DF M$$MGE
776
777 001264 016746 172354 MOV KISAR6,-(SP) ;SAVE CURRENT MAPPING
778
779 .ENDC
780
781
782 001270 014403 MOV -(R4),R3 ;RETRIEVE ADDRESS OF ATTRIBUTE DESCRIPTOR BLOCK
783 001272 010024 MOV R0,(R4)+ ;SET POINTER TO SECONDARY CONTROL BLOCK
784 001274 010446 MOV R4,-(SP) ;SAVE ADDRESS OF NEXT WORD IN I/O PACKET
785 001276 010004 MOV R0,R4 ;SET ADDRESS OF FIRST ATTRIBUTE POINTER
786 001300 012746 000006 MOV #6,-(SP) ;SET MAXIMUM NUMBER OF ATTRIBUTE POINTERS
787 001304 010300 10$: MOV R3,R0 ;SET ADDRESS OF NEXT ATTRIBUTE DESCRIPTOR
788
789
790 .IF DF A$$CHK!M$$MGE
791
792 001306 012701 000004 MOV #4,R1 ;SET SIZE OF ATTRIBUTE DESCRIPTOR
793 001312 CALL $ACHCK ;ADDRESS CHECK ATTRIBUTE DESCRIPTOR
794 001316 103700 BCS IESPC ;IF CS ADDRESS CHECK FAILURE
795
796 .ENDC
797
798
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-14
799 .IF DF M$$MGE
800
801 001320 CALL $RELOM ;RELOCATE AND MAP ATTRIBUTE DESCRIPTOR
802 001324 062703 000004 ADD #4,R3 ;POINT TO NEXT ATTRIBUTE DESCRIPTOR
803
804 .IFF
805
806 CMP (R3)+,(R3)+ ;POINT TO NEXT ATTRIBUTE DESCRIPTOR
807
808 .ENDC
809
810
811 001330 112024 MOVB (R0)+,(R4)+ ;INSERT ATTRIBUTE NUMBER
812 001332 001420 BEQ 20$ ;IF EQ END OF ATTRIBUTE DESCRIPTOR BLOCK
813 001334 005001 CLR R1 ;PICKUP SIZE OF ATTRIBUTE BLOCK
814 001336 152001 BISB (R0)+,R1 ;
815 001340 110124 MOVB R1,(R4)+ ;INSERT LENGTH OF ATTRIBUTE BLOCK
816 001342 001002 BNE 15$ ;IF NE LENGTH OKAY
817 001344 012701 001000 MOV #256.*2,R1 ;SET LENGTH FOR ZERO CASE
818 001350 011000 15$: MOV (R0),R0 ;GET ADDRESS OF ATTRIBUTE BLOCK
819
820
821 .IF DF A$$CHK!M$$MGE
822
823 001352 CALL $ACHCK ;ADDRESS CHECK ATTRIBUTE BLOCK
824 001356 103660 BCS IESPC ;IF CS ADDRESS FAILURE
825
826 .ENDC
827
828
829 001360 CALL $RELOC ;RELOCATE ATTRIBUTE BLOCK ADDRESS
830 001364 010124 MOV R1,(R4)+ ;INSERT RELOCATION BIAS
831 001366 010224 MOV R2,(R4)+ ;INSERT ATTRIBUTE BLOCK ADDRESS
832 001370 005316 DEC (SP) ;ANY MORE SPACE IN POINTER BLOCK?
833 001372 003344 BGT 10$ ;IF GT YES
834 001374 005726 20$: TST (SP)+ ;CLEAN STACK
835 001376 012604 MOV (SP)+,R4 ;RETRIEVE ADDRESS OF NEXT WORD IN I/O PACKET
836
837
838 .IF DF M$$MGE
839
840 001400 012667 172354 MOV (SP)+,KISAR6 ;RESTORE CURRENT MAPPING
841
842 .ENDC
843
844
845 001404 012603 MOV (SP)+,R3 ;RETRIEVE ADDRESS OF NEXT WORD IN DPB
846
847 ;
848 ; MOVE EXTEND AND ACCESS CONTROL WORDS INTO I/O PACKET
849 ;
850
851 001406 012324 MOVE3: MOV (R3)+,(R4)+ ;INSERT EXTEND CONTROL WORDS
852 001410 012324 MOV (R3)+,(R4)+ ;
853 001412 012324 MOV (R3)+,(R4)+ ;INSERT ACCESS CONTROL WORD
854
855 ;
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-15
856 ; INSERT OPTIONAL FILENAME BLOCK
857 ;
858
859 001414 012701 000032 FILNM: MOV #13.*2,R1 ;SET LENGTH OF FILENAME BLOCK
860 001420 CALL OPPRM ;INSERT OPTIONAL FILENAME BLOCK
861 001424 000135 JMP @(R5)+ ;
862
863 ;
864 ; INTERPRET REQUIRED BLOCK ADDRESS
865 ;
866
867 .ENABL LSB
868 001426 010602 RQPRM: MOV SP,R2 ;SET REQUIRED PARAMETER FLAG
869 001430 000401 BR 10$ ;
870
871 ;
872 ; INTERPRET OPTIONAL BLOCK ADDRESS
873 ;
874
875 001432 005002 OPPRM: CLR R2 ;CLEAR REQUIRED PARAMETER FLAG
876 001434 012300 10$: MOV (R3)+,R0 ;GET ADDRESS OF CONTROL BLOCK
877 001436 001410 BEQ 20$ ;IF EQ NONE SPECIFIED
878
879
880 .IF DF A$$CHK!M$$MGE
881
882 001440 CALL $ACHCK ;ADDRESS CHECK BLOCK
883 001444 103625 BCS IESPC ;IF CS ADDRESS CHECK FAILURE
884
885 .ENDC
886
887
888 001446 CALL $RELOC ;RELOCATE BUFFER ADDRESS
889 001452 010124 MOV R1,(R4)+ ;INSERT RELOCATION BIAS
890 001454 010224 MOV R2,(R4)+ ;INSERT BLOCK ADDRESS
891 001456 000403 BR 30$ ;
892 001460 010224 20$: MOV R2,(R4)+ ;PARAMETER REQUIRED?
893 001462 001232 BNE IEBAD ;IF NE YES
894 001464 005024 CLR (R4)+ ;CLEAR SECOND WORD
895 001466 30$: RETURN ;
896 .DSABL LSB
897
898 ;
899 ; FILL DISCONNECT PARAMETER BUFFER AND INTERLOCK LUN USAGE
900 ;
901
902
903 .IF DF M$$NET
904
905 .ENABL LSB
906 001470 012324 CKDIS: MOV (R3)+,(R4)+ ;COPY FIRST PARAMETER TO I/O PACKET
907 001472 000405 BR 10$ ;FINISH IN COMMON CODE
908
909 ;
910 ; CHECK CONNECT PARAMETER BUFFER
911 ;
912
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-16
913 001474 016301 000002 CKCON: MOV 2(R3),R1 ;GET LENGTH OF BUFFER IN BYTES
914 001500 001607 BEQ IESPC ;IF EQ ZERO LENGTH
915 001502 CALL RQPRM ;INSERT REQUIRED PARAMETER
916 001506 012324 10$: MOV (R3)+,(R4)+ ;INSERT LENGTH OF PARAMETER BUFFER
917 001510 012324 MOV (R3)+,(R4)+ ;COPY REMAINDER OF PARAMETERS
918 001512 012324 MOV (R3)+,(R4)+ ;
919 001514 012324 MOV (R3)+,(R4)+ ;
920 001516 011314 MOV (R3),(R4) ;
921 001520 000135 JMP @(R5)+ ;
922 .DSABL LSB
923
924 .ENDC
925
926
927 ;
928 ; CHECK FOR VOLUME MARKED FOR DISMOUNT
929 ;
930
931 001522 132760 000000G 000000G CKDMO: BITB #US.MDM,U.STS(R0) ;VOLUME MARKED FOR DISMOUNT?
932 001530 001212 BNE IEPRI ;IF NE YES
933 001532 000135 JMP @(R5)+ ;
934
935 ;
936 ; CHECK FOR READ ACCESS PRIVILEGES AND EXIT TO TRANSFER FUNCTION
937 ;
938
939 .ENABL LSB
940 001534 012702 000400 CKRAC: MOV #WI.RDV,R2 ;SET READ ACCESS MASK WORD
941 001540 000402 BR 10$ ;
942
943 ;
944 ; CHECK FOR WRITE ACCESS PRIVILEGES AND EXIT TO TRANSFER FUNCTION
945 ;
946
947 001542 012702 001000 CKWAC: MOV #WI.WRV,R2 ;SET WRITE ACCESS MASK WORD
948 001546 012601 10$: MOV (SP)+,R1 ;RETRIEVE ADDRESS OF SECOND LUN WORD
949
950
951 .IF DF M$$MGE
952
953 001550 005066 000002 CLR 2(SP) ;SET ACP VIRTUAL FUNCTION FLAG
954
955 .ENDC
956
957
958 001554 030231 BIT R2,@(R1)+ ;DESIRED ACCESS PERMITTED?
959 001556 001002 BNE 20$ ;IF NE YES
960 001560 000167 177372 JMP IEPRI ;PRIVILEGE VIOLATION
961 001564 012605 20$: MOV (SP)+,R5 ;RETRIEVE UCB ADDRESS
962 001566 000167 177042 JMP FCTRN ;TREAT AS A TRANSFER FUNCTION
963 .DSABL LSB
964
965 ;
966 ; CHECK FOR FILE ALREADY ACCESSED ON LUN
967 ;
968
969 .ENABL LSB
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-17
970 001572 005711 CKALN: TST (R1) ;FILE ACCESSED ON LUN?
971 001574 001413 BEQ 10$ ;IF EQ NO
972 001576 000167 177362 JMP IEALN ;ERROR
973
974 ;
975 ; CHECK FOR FILE ACCESSED ON LUN
976 ;
977
978 001602 005711 CKNLN: TST (R1) ;FILE ACCESSED ON LUN?
979 001604 001007 BNE 10$ ;IF NE YES
980 001606 000167 177360 JMP IENLN ;ERROR
981
982 ;
983 ; CHECK IF ACCESS ALSO REQUESTED ON CREATE
984 ;
985
986 001612 005763 000010 CKACC: TST 10(R3) ;ACCESS REQUESTED?
987 001616 100002 BPL 10$ ;IF PL NO
988 001620 012705 000066' MOV #FCCAW,R5 ;POINT TO ACCESS POLISH
989 001624 000135 10$: JMP @(R5)+ ;
990 .DSABL LSB
991
992 ; ; TM075
993 ; SET UP REGISTERS FOR UNLOCK AND EXIT TO CONTROL FUNCTION ; TM075
994 ; ; TM075
995 ; TM075
996 ; TM075
997 .IF DF R$$LKL ; TM075
998 ; TM075
999 UNLXT: CMP (R4)+,(SP)+ ;ADVANCE PACKET POINTER AND CLEAN STACK ; TM075
1000 MOV (SP)+,R5 ;RESTORE R5 ; TM075
1001 JMP FCCTL ;SET UP REST OF PACKET ; TM075
1002 ; TM075
1003 .ENDC ; TM075
1004 ; TM075
1005 ; TM075
1006 ;
1007 ; SET ACCESS/DEACCESS INTERLOCK
1008 ;
1009
1010 001626 005276 000000 CKRLK: INC @(SP) ;SET ACCESS/DEACCESS PENDING INTERLOCK
1011
1012 ;
1013 ; EXIT POLISH TO FUNCTION EXIT
1014 ;
1015
1016 001632 005726 CKXIT: TST (SP)+ ;REMOVE ADDRESS OF SECOND LUN WORD
1017 001634 012616 MOV (SP)+,(SP) ;REMOVE FUNCTION CODE FROM STACK
1018 001636 012605 MOV (SP)+,R5 ;RETRIEVE UCB ADDRESS
1019 001640 005275 000000G INC @U.VCB(R5) ;INCREMENT VOLUME TRANSACTION COUNT
1020 001644 000167 177162 JMP FCXIT ;EXIT POLISH
1021
1022 .ENDC
1023
1024
1025 000001 .END
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-18
SYMBOL TABLE
AS.DEL= 000010 FCWVB 000106R IE.BYT= ****** GX OPPRM 001432R TS.EXE= 100000
AS.EXT= 000004 FCXFR 000750R IE.IFC= ****** GX PIRQ = 177772 TS.MSG= 020000
AS.RED= 000001 FCXIT 001032R IE.NLN= ****** GX PMODE = 030000 TS.NRP= 010000
AS.WRT= 000002 FC.CEF= 020000 IE.NOD= ****** GX PR0 = 000000 TS.OUT= 000400
ATRBK 001240R FC.DIR= 040000 IE.OFL= ****** GX PR1 = 000040 TS.RDN= 040000
A$$CHK= 000000 FC.FCO= 010000 IE.OVR= ****** GX PR4 = 000200 TS.RUN= 004000
A$$CPS= 000000 FC.WAC= 100000 IE.PRI= ****** GX PR5 = 000240 T.ACTL 000052
A$$TRP= 000000 FE.CAL= 000040 IE.SPC= ****** GX PR6 = 000300 T.ASTL 000016
A.AST 000006 FE.CEX= 020000 IO.LOV= ****** GX PR7 = 000340 T.ATT 000054
A.BYT 000004 FE.DRV= 000010 IO.RLB= ****** GX PS = 177776 T.CPCB 000004
A.CBL 000002 FE.EXP= 000200 IO.RVB= ****** GX PS.APR= 000007 T.DPRI 000040
A.DQSR 177776 FE.EXT= 000001 IO.WLB= ****** GX PS.CHK= 010000 T.EFLG 000022
A.IOC 000003 FE.EXV= 000004 ISSUC 000724R PS.CKP= 040000 T.IOC 000003
A.KSR5 177774 FE.LSI= 000400 IS.SUC= ****** GX PS.CKR= 020000 T.LBN 000041
A.LGTH= 000014 FE.MUP= 000002 I$$RDN= 000000 PS.COM= 000200 T.LDV 000044
A.MPCT 000011 FE.MXT= 040000 I.AST 000022 PS.DEL= 000010 T.LNK 000000
A.NPR 000010 FE.NLG= 100000 I.ATTL= 000044 PS.DRV= 000020 T.MXSZ 000050
A.PCB 000012 FE.PKT= 000100 I.EFN 000003 PS.FXD= 004000 T.NAM 000006
A.PCBL 000000 FE.PLA= 000020 I.FCN 000012 PS.LIO= 001000 T.OFF 000060
A.PRI 000002 FILNM 001414R I.IOSB 000014 PS.NSF= 000400 T.PCB 000046
A.PRM 000012 F.DREF 000036 I.LGTH= 000044 PS.OUT= 100000 T.PRI 000002
A.STAT 000010 F.DRNM 000040 I.LNK 000000 PS.PER= 002000 T.RCVL 000012
A.TCB 000004 F.FEXT 000042 I.LN2 000006 PS.PIC= 000100 T.RRFL 000064
A.TCBL 000006 F.FNUM 000002 I.PRI 000002 PS.SYS= 000040 T.SRCT 000063
BDPKT 001230R F.FOWN 000010 I.PRM 000024 P$$RTY= 000000 T.STAT 000032
CKACC 001612R F.FPRO 000012 I.TCB 000004 P$$TPT= 000000 T.ST2 000034
CKALN 001572R F.FSEQ 000004 I.UCB 000010 P.BLKS 000016 T.ST3 000036
CKCON 001474R F.FSQN 000007 KDSAR0= 172360 P.BUSY 000024 T.TCBL 000030
CKDIS 001470R F.FVBN 000044 KDSDR0= 172320 P.IOC 000003 T.UCB 000026
CKDMO 001522R F.HDLB 000016 KISAR0= 172340 P.LNK 000000 T2.ABO= 000100
CKNLN 001602R F.LBN 000022 KISAR5= 172352 P.MAIN 000012 T2.AST= 100000
CKRAC 001534R F.LGTH 000052 KISAR6= 172354 P.NAM 000004 T2.BFX= 004000
CKRLK 001626R F.LINK 000000 KISAR7= 172356 P.OWN 000026 T2.CAF= 000400
CKWAC 001542R F.LKL 000050 KISDR0= 172300 P.PRI 000002 T2.CHK= 020000
CKXIT 001632R F.NACS 000032 KISDR6= 172314 P.REL 000014 T2.CKD= 010000
CMODE = 140000 F.NLCK 000033 KISDR7= 172316 P.SIZE 000016 T2.DST= 040000
C$$ORE= 002000 F.NWAC 000034 K$$CNT= 177546 P.STAT 000030 T2.FXD= 002000
D.DSP = ****** GX F.SCHA 000015 K$$CSR= 177546 P.SUB 000010 T2.HLT= 000200
D.MSK = ****** GX F.SIZE 000026 K$$IEN= 000115 P.SWSZ 000022 T2.SPN= 000004
D.PCB = ****** GX F.STAT 000034 K$$LDC= 000001 P.TCB 000026 T2.STP= 000020
D.RS5 = ****** GX F.UCHA 000014 K$$TPS= 000074 P.WAIT 000020 T2.TIO= 001000
D.RS6 = ****** GX G$$TPP= 000000 L$$ASG= 000000 RQPRM 001426R T2.WFR= 000001
D.VINI= ****** GX G$$TTK= 000000 L$$DRV= 000000 R$$DER= 000000 T3.ACP= 100000
FCACC 000064R H$$RTZ= 000074 L.CNT 000005 R$$EXV= 000000 T3.CAL= 000100
FCCAW 000066R IEALN 001164R L.LGTH 000010 R$$SND= 000000 T3.CLI= 001000
FCCON 000122R IEBAD 001150R L.LNK 000000 R$$11M= 000000 T3.MCR= 004000
FCCRE 000112R IEBYT 001134R L.VB1 000004 R$$11S= 000000 T3.NET= 000020
FCCTL 000746R IECMN 001176R L.WI1 000002 SISDR0= 172200 T3.NSD= 000200
FCDAC 000074R IEIFC 000732R MOVE3 001406R SR0 = 177572 T3.PMD= 040000
FCDIS 000132R IENLN 001172R MPAR = 172100 SR3 = 172516 T3.PRV= 010000
FCDSP 000002R IENOD 001142R MPCSR = 177746 SWR = 177570 T3.REM= 020000
FCIFC 000062R IEOFL 000740R MSTK 000000R S$$YSZ= 001740 T3.ROV= 000040
FCKIL 000720R IEOVR 001126R M$$CRB= 000124 S.STBK= 000012 T3.RST= 000400
FCNCT 000140R IEPRI 001156R M$$MGE= 000000 TPS = 177564 T3.SLV= 002000
FCPKT 000116R IESPC 001120R M$$NET= 000000 TS.BLK= 170700 UBMPR = 170200
FCRVB 000102R IE.ALN= ****** GX M$$NT2= 000000 TS.CKP= 000200 UC.LGH= ****** GX
FCTRN 000634R IE.BAD= ****** GX N$$LDV= 000001 TS.CKR= 000100 UC.QUE= ****** GX
DRQIO MACRO M1110 22-AUG-79 07:01 PAGE 3-19
SYMBOL TABLE
UDSAR0= 177660 U.CW1 = ****** GX V.IFWI 000002 WI.LCK= 004000 $DEPKT= ****** GX
UDSDR0= 177620 U.SCB = ****** GX V.LGTH 000046 WI.RDV= 000400 $DQLM1 000242RG
UISAR0= 177640 U.STS = ****** GX V.LRUC 000041 WI.WRV= 001000 $DQLM2 000252RG
UISAR4= 177650 U.ST2 = ****** GX V.SBCL 000017 W.CTL 000000 $DRQIO 000146RG
UISAR5= 177652 U.VCB = ****** GX V.SBLB 000022 W.FCB 000006 $DRQRQ 001036RG
UISAR6= 177654 VC.BMW= 000002 V.SBSZ 000020 W.LKL 000010 $DRWFS= ****** GX
UISAR7= 177656 VC.IFW= 000001 V.STAT 000044 W.RTRV 000012 $IOFIN= ****** GX
UISDR0= 177600 V$$CTR= 001200 V.TRCT 000000 W.VBN 000002 $IOKIL= ****** GX
UISDR4= 177610 V$$RSN= 000031 V.VCHA 000032 W.WISZ 000003 $MPLND= ****** GX
UISDR5= 177612 V.FCB 000004 V.VFSQ 000036 X$$DBT= 000000 $MPLUN= ****** GX
UISDR6= 177614 V.FFNU 000045 V.VOWN 000026 $ACHCK= ****** GX $MPPHY= ****** GX
UISDR7= 177616 V.FIEX 000023 V.VPRO 000030 $ACHKB= ****** GX $QINSP= ****** GX
US.FOR= ****** GX V.FMAX 000014 V.WISZ 000016 $ALOCB= ****** GX $RELOC= ****** GX
US.MDM= ****** GX V.FPRO 000034 WI.BPS= 100000 $ALPKT= ****** GX $RELOM= ****** GX
US.MNT= ****** GX V.FRBK 000040 WI.DLK= 010000 $BTMSK= ****** GX $TKTCB= ****** GX
US.OFL= ****** GX V.IBLB 000010 WI.EXL= 040000 $CEFI = ****** GX $TKWSE= ****** GX
U.CTL = ****** GX V.IBSZ 000011 WI.EXT= 002000 $CEFN = ****** GX
. ABS. 177776 000
001650 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 5767 WORDS ( 23 PAGES)
DYNAMIC MEMORY: 7204 WORDS ( 27 PAGES)
ELAPSED TIME: 00:00:46
[11,24]DRQIO,SY0:[11,34]DRQIO/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,DRQIO