Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/tkb-vnp/pcor1b.bpt
There are no other files named pcor1b.bpt in the archive.
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
1 !<TKB-VNP>PCOR1B.BLI.10, 21-Jun-79 08:18:37, Edit by SROBINSON
2 !<TKB-VNP>PCOR1B.BLI.3, 20-Jun-79 10:31:43, Edit by SROBINSON
3 !<SAUTER.TKB20>PCOR1B.BLI.26, 5-Feb-79 15:08:22, Edit by SROBINSON
4 !<SAUTER.TKB20>PCOR1B.BLI.25, 16-Jan-79 14:32:46, Edit by SROBINSON
5 !<SAUTER.TKB20>PCOR1B.BLI.24, 2-Jan-79 06:45:41, Edit by SROBINSON
6 !<SAUTER.TKB20>PCOR1B.BLI.19, 24-Nov-78 11:04:09, Edit by SROBINSON
7 !<SAUTER.TKB20>PCOR1B.BLI.16, 16-Nov-78 14:24:58, Edit by SROBINSON
8 !<SAUTER.TKB20>PCOR1B.BLI.13, 16-Nov-78 07:16:49, Edit by SROBINSON
9 !<SAUTER.TKB20>PCOR1B.BLI.11, 15-Nov-78 15:48:35, Edit by SROBINSON
10 !<SAUTER.TKB20>PCOR1B.BLI.5, 2-Nov-78 14:48:33, Edit by SROBINSON
11 !<SAUTER.TKB20>PCOR1B.BLI.2, 16-Oct-78 09:50:58, Edit by SROBINSON
12 MODULE PCOR1B ( !PROCESS CORE IMAGE
13 IDENT = 'X0.3'
14 ) =
15 BEGIN
16 !
17 !
18 !
19 ! COPYRIGHT (C) 1978, 1979 BY
20 ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
21 !
22 !
23 ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
24 ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
25 ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
26 ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
27 ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
28 ! TRANSFERRED.
29 !
30 !
31 ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
32 ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
33 ! CORPORATION.
34 !
35 ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
36 ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
37 !
38
39 !++
40 ! FACILITY: VNP-20
41 !
42 ! ABSTRACT:
43 !
44 !
45 ! THIS MODULE PROCESSES CORE IMAGES (KERNEL AND TASK) FOR VNP20
46 !
47 !
48 ! ENVIRONMENT: TOPS-20 USER MODE
49 !
50 ! AUTHOR: J. SAUTER, CREATION DATE: 30-MAY-78
51 !
52 ! MODIFIED BY:
53 !
54 ! Scott G. Robinson, 16-SEP-78 : VERSION X0.1-2A
55 ! - Finish Development of D_DCP
56 ! - Finish Development of D_DUP
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
57 ! - Develop support for NSP, DLX, AUX LLCs
58 ! - Correct minor bugs in various routines
59 !
60 ! Scott G. Robinson, 23-SEP-78 : VERSION X0.1-3A
61 ! - Split PCOR into 3 modules (PCOR0,PCOR1,PCOR2)
62 ! - Add support for passwords
63 !
64 ! Scott G. Robinson, 16-OCT-78 : VERSION X0.2
65 ! - Split PCOR1 into PCOR1A, PCOR1B, and PCOR1C so that LLC and
66 ! DDM processing can reside in seperate modules
67 !
68 ! Scott G. Robinson, 2-NOV-78 : VERSION X0.2-1, X0.2-2
69 ! - Add support routines for TOPS-20 Release 4 LLCs (NRD, NRM, ATS, VT6)
70 ! - Change POOL.. Allocation Method
71 ! - Support new NRM data base format for pipeline control blocks
72 !
73 ! Scott G. Robinson, 20-JUN-79 : VERSION X0.3
74 ! - Add routine to setup the DTR LLC data base
75 !
76 ! , : VERSION
77 ! 01 -
78 !--
79
80 !<BLF/PAGE>
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
81 !
82 ! TABLE OF CONTENTS:
83 !
84
85 FORWARD ROUTINE
86 SEL_LLC, !SELECT AN LLC BLOCK
87 LD_LLC : NOVALUE, !BUILD LLC DATA STRUCTURES
88 LL_NSP : NOVALUE, !BUILD LLC DATA FOR NSP
89 LL_AUX : NOVALUE, !BUILD LLC DATA FOR AUX
90 LL_DLX : NOVALUE, !BUILD LLC DATA FOR DLX
91 LL_ATS : NOVALUE, !BUILD LLC DATA FOR ATS
92 LL_NRD : NOVALUE, !BUILD LLC DATA FOR NRD
93 LL_NRM : NOVALUE, !BUILD LLC DATA FOR NRM
94 LL_VT6 : NOVALUE, !BUILD LLC DATA FOR VT6
95 LL_DTR : NOVALUE, !BUILD LLC DATA FOR DTR
96 LD_DCB : NOVALUE; !BUILD DCB STUFF FOR LLC
97
98 !
99 ! INCLUDE FILES:
100 !
101
102 LIBRARY 'VNP-LIB.L36';
103
104 !REQUIRE 'BLOCKH.REQ'; !PREPARE TO DEFINE STORAGE BLOCKS
105 !REQUIRE 'FILE.REQ'; !DEFINE FILE BLOCK
106 !REQUIRE 'VNPVAL.REQ'; !VALUE BLOCK FOR VNP20
107 !REQUIRE 'LLC.REQ'; !DEFINE LLC BLOCK
108 !REQUIRE 'DLC.REQ'; !DEFINE DLC BLOCK
109 !REQUIRE 'DDM.REQ'; !DEFINE DDM BLOCK
110 !REQUIRE 'LIBR.REQ'; !DEFINE LIBRARY BLOCK
111 !REQUIRE 'BLOCKT.REQ'; !END OF DEFINING STORAGE BLOCKS
112 !REQUIRE 'TSKDEF.REQ'; !DEFINE TASK OFFSETS
113 !
114 ! MACROS:
115 !
116 ! NONE
117 !
118 ! EQUATED SYMBOLS:
119 !
120
121 LITERAL
122 DEBUG = 0;
123
124 !
125 ! OWN STORAGE:
126 !
127 ! NONE
128 !
129 ! EXTERNAL REFERENCES:
130 !
131
132 EXTERNAL ROUTINE
133 R50TOA : NOVALUE, !CONVERT RADIX50_11 TO ASCII
134 OUTPUT : NOVALUE, !WRITE ON A FILE
135 RSTB : NOVALUE, !READ SYMBOL TABLE
136 RCOR : NOVALUE, !READ CORE IMAGE
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
137 FCOR : NOVALUE, !FREE CORE IMAGE
138 PCRLF : NOVALUE, !PRINT CR THEN LF
139 OUTSTR : NOVALUE, !PRINT A STRING
140 OUTNUM : NOVALUE, !PRINT A NUMBER
141 ERROR : NOVALUE, !SIGNAL PROGRAMMING ERROR
142 ERRMSG : NOVALUE, !ERROR MESSAGE
143 SYM_VAL, !OBTAIN VALUE OF A SYMBOL
144 GETBLK, !GET A BLOCK OF STORAGE
145 FND_CHAIN, !"FIND" AN ITEM IN A CHAIN
146 GETBYT, !GET A PDP-11 BYTE
147 GETWRD, !GET A PDP-11 WORD
148 PUTBYT : NOVALUE, !PUT A PDP-11 BYTE
149 PUTWRD : NOVALUE, !PUT A PDP-11 WORD
150 ALOCB, !ALLOCATE PDP-11 CORE
151 ALOC_POOL, !ALLOCATE FROM POOL.. PARTITION
152 M_PCB, !MAKE A PCB
153 LNKDCB, !LINK A DCB INTO THE DCB CHAIN
154 VRBL_SYM; !OBTAIN VALUE OF A DEVICE DRIVER'S SYMBOL
155
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
156 ROUTINE SEL_LLC (LLC_PTR, FILE_PTR) = !SELECT AN LLC BLOCK
157
158 !++
159 ! FUNCTIONAL DESCRIPTION:
160 !
161 ! SELECT THE LLC BLOCK WHICH CORRESPONDS TO THE
162 ! FILE NAME
163 !
164 ! FORMAL PARAMETERS:
165 !
166 ! LLC_PTR - POINTER TO THE LLC BLOCK TO BE TESTED
167 ! FILE_PTR - POINTER TO THE FILE BLOCK WHOSE NAME IS TO BE TESTED
168 !
169 ! IMPLICIT INPUTS:
170 !
171 ! NONE
172 !
173 ! IMPLICIT OUTPUTS:
174 !
175 ! NONE
176 !
177 ! ROUTINE VALUE:
178 !
179 ! 0 = NOT SUITABLE, OTHERWISE A POINTER TO THE LLC BLOCK
180 !
181 ! SIDE EFFECTS
182 !
183 ! NONE
184 !
185 !--
186
187 BEGIN
188
189 BIND
190 ROUTINE_NAME = UPLIT (%ASCIZ'SEL_LLC');
191
192 MAP
193 LLC_PTR : REF LLC_BLOCK,
194 FILE_PTR : REF FILE_BLOCK;
195
196 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (LLC_PTR [LLC_NAME]))) THEN .LLC_PTR ELSE 0
197
198 END; !OF SEL_LLC
199
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
200 GLOBAL ROUTINE LD_LLC (KERNEL_FILE, FILE_CHAN, GEN_PCB, PDV_ADDR, VALUES) : NOVALUE = !BUILD LLC DATA BASE
201
202 !++
203 ! FUNCTIONAL DESCRIPTION:
204 !
205 ! BUILD THE DATA BASE FOR AN LLC.
206 !
207 ! FORMAL PARAMETERS:
208 !
209 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
210 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ THE PROCESS
211 ! GEN_PCB - PDP-11 ADDRESS OF THE SYSTEM-CONTROLLED PARTITION
212 ! PDV_ADDR - PDP-11 ADDRESS OF THE PDV FOR THE PROCESS
213 ! VALUES - A VECTOR OF LOTS OF THINGS FOR VNP20
214 !
215 ! IMPLICIT INPUTS:
216 !
217 ! NONE
218 !
219 ! IMPLICIT OUTPUTS:
220 !
221 ! NONE
222 !
223 ! ROUTINE VALUE:
224 !
225 ! NONE
226 !
227 ! SIDE EFFECTS
228 !
229 ! MODIFIES THE KERNEL
230 !
231 !--
232
233 BEGIN
234
235 BIND
236 ROUTINE_NAME = UPLIT (%ASCIZ'LD_LLC');
237
238 MAP
239 KERNEL_FILE : REF FILE_BLOCK,
240 VALUES : REF VNPVAL_BLOCK;
241
242 LOCAL
243 PROCESS_LABEL : REF VECTOR [1024],
244 PROCESS_BASE,
245 PROCESS_TOP,
246 PROCESS_SIZE,
247 PROCESS_FLAGS,
248 PARTITION_NAME : VECTOR [CH$ALLOCATION (7)],
249 PARTITION_BASE,
250 PCB_ADDR,
251 LLC_PTR : REF LLC_BLOCK,
252 FILE_PTR : REF FILE_BLOCK;
253
254 !
255 ! GET A FILE BLOCK FOR LOADING THE FILE
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
256 !
257 FILE_PTR = GETBLK (FILE_TYP, FILE_LEN);
258 !
259 ! BUILD THE NAME OF THE PROCESS, IN ASCII.
260 ! THIS IS USED AS THE FILE NAME.
261 !
262 R50TOA ((GETWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_NAM])^16), FILE_PTR [FILE_NAME]);
263 !
264 ! WE ONLY WHAT THE FIRST THREE CHARACTERS OF THE NAME.
265 !
266 CH$FILL (0, 3, CH$PTR (FILE_PTR [FILE_NAME], 3));
267 !
268 ! READ IN THE SYMBOL TABLE AND CORE IMAGE
269 !
270 RSTB (.FILE_CHAN, .FILE_PTR);
271 RCOR (.FILE_PTR, .FILE_CHAN, 4*2048);
272 !
273 ! GET THE CETAB.MAC INFORMATION ABOUT THIS PROCESS
274 !
275
276 IF ((LLC_PTR = FND_CHAIN (.VALUES [LLC_CHAIN], SEL_LLC, .FILE_PTR)) EQL 0)
277 THEN
278 ERROR (UPLIT (%ASCIZ'LLC NOT FOUND - LD_LLC'))
279 ELSE
280 BEGIN
281 !
282 ! ALLOCATE A PCB, UNLESS WE ALREADY HAVE ONE.
283 !
284 PCB_ADDR = GETWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_PCB]);
285
286 IF (.PCB_ADDR EQL 0)
287 THEN
288 BEGIN
289 PROCESS_LABEL = .FILE_PTR [FILE_LABEL];
290 PROCESS_BASE = .PROCESS_LABEL [L$BSA] + (.PROCESS_LABEL [L$BSA + 1]*256);
291 PROCESS_TOP = .PROCESS_LABEL [L$BHGV] + (.PROCESS_LABEL [L$BHGV + 1]*256);
292 PROCESS_SIZE = .PROCESS_TOP - .PROCESS_BASE + 1;
293 !
294 ! THE PARTITION NAME IS OF THE FORM "NT.XXX".
295 !
296 CH$COPY (3, CH$PTR (UPLIT (%ASCII'NT.')), 3, CH$PTR (FILE_PTR [FILE_NAME]), 0, 7,
297 CH$PTR (PARTITION_NAME));
298 PARTITION_BASE = .KERNEL_FILE [FILE_HWM] + 1;
299 PCB_ADDR = M_PCB (.KERNEL_FILE, PARTITION_NAME, .GEN_PCB, .PARTITION_BASE,
300 .PARTITION_BASE + .PROCESS_SIZE - 1, %O'000000',
301 .VALUES [PS_SYS] OR .VALUES [PS_COM] OR .VALUES [PS_NSF], 0, .VALUES);
302 !
303 ! COPY THE PROCESS TEXT INTO THE PARTITION
304 !
305
306 INCR COUNTER FROM 0 TO .PROCESS_SIZE - 1 DO
307 PUTBYT (.KERNEL_FILE, .PARTITION_BASE + .COUNTER,
308 GETBYT (.FILE_PTR, .PROCESS_BASE + .COUNTER));
309
310 !
311 ! FILL IN SOME FIELDS IN THE PDV
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
312 !
313 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_PCB], .PCB_ADDR);
314 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DSP], .PARTITION_BASE/64);
315 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DSP] + 2,
316 VRBL_SYM (.FILE_PTR, 3,
317 UPLIT (%ASCIZ'$\\\TB'), 0));
318 END;
319
320 !
321 ! DISPATCH TO APPROPRIATE LLC DATA LOADING ROUTINE
322 !
323
324 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'NSP'))))
325 THEN
326 LL_NSP (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
327 ELSE
328
329 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'AUX'))))
330 THEN
331 LL_AUX (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
332 ELSE
333
334 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'DLX'))))
335 THEN
336 LL_DLX (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
337 ELSE
338
339 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'ATS'))))
340 THEN
341 LL_ATS (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
342 ELSE
343
344 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'NRD'))))
345 THEN
346 LL_NRD (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
347 ELSE
348
349 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'NRM'))))
350 THEN
351 LL_NRM (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
352 ELSE
353
354 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'VT6')))
355 )
356 THEN
357 LL_VT6 (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR, .VALUES)
358 ELSE
359
360 IF (CH$EQL (3, CH$PTR (FILE_PTR [FILE_NAME]), 3,
361 CH$PTR (UPLIT (%ASCIZ'DTR'))))
362 THEN
363 LL_DTR (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PDV_ADDR, .LLC_PTR,
364 .VALUES)
365 ELSE
366 ERRMSG (0, 38, ROUTINE_NAME, FILE_PTR [FILE_NAME], 0, 0, 0);
367
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
368 !
369 END;
370
371 !
372 ! FREE THE FILE BLOCK, ETC
373 !
374 FCOR (.FILE_PTR);
375 !
376 END; !OF LD_LLC
377
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
378 ROUTINE LL_NSP (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
379 !BUILD DATA BASE FOR NSP
380
381 !++
382 ! FUNCTIONAL DESCRIPTION:
383 !
384 ! BUILD THE DATA BASE FOR AN NSP LLC.
385 !
386 ! FORMAL PARAMETERS:
387 !
388 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
389 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
390 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
391 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
392 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
393 ! VALUES - BLOCK OF THINGS FOR VNP20
394 !
395 ! IMPLICIT INPUTS:
396 !
397 ! NONE
398 !
399 ! IMPLICIT OUTPUTS:
400 !
401 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
402 !
403 ! ROUTINE VALUE:
404 !
405 ! NONE
406 !
407 ! SIDE EFFECTS:
408 !
409 ! MODIFIES THE KERNEL
410 !
411 !--
412
413 BEGIN
414
415 BIND
416 ROUTINE_NAME = UPLIT (%ASCIZ'LL_NSP');
417
418 MAP
419 KERNEL_FILE : REF FILE_BLOCK,
420 FILE_PTR : REF FILE_BLOCK,
421 LLC_PTR : REF LLC_BLOCK,
422 VALUES : REF VNPVAL_BLOCK;
423
424 LOCAL
425 LOC,
426 S_PLD,
427 S_NOD,
428 S_STS,
429 S_VER,
430 PLD_ADDR,
431 NOD_ADDR,
432 VER_ADDR,
433 STS_ADDR,
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
434 NSP_DATA_ADDR,
435 PCB_ADDR;
436
437 !
438 ! FIND OUT HOW MUCH SPACE TO ALLOCATE
439 !
440 S_PLD = SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$SPLD'), 0);
441 S_NOD = SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$SNOD'), 0);
442 S_VER = SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$SVER'), 0) + 2; !DON'T ASK ME ABOUT THE 2(?)
443 S_STS = SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$SSTS'), 0);
444 !
445 ! ALLOCATE THE NSP LLC DATA BASE
446 !
447 NSP_DATA_ADDR = ALOCB (.KERNEL_FILE, 40 + .S_PLD + .S_NOD + .S_VER + .S_STS, 1, .VALUES);
448 !
449 ! SETUP ADDRESS POINTERS TO PORTIONS OF THE DATA BASE
450 !
451 STS_ADDR = .NSP_DATA_ADDR + 40;
452 VER_ADDR = .STS_ADDR + .S_STS;
453 NOD_ADDR = .VER_ADDR + .S_VER;
454 PLD_ADDR = .NOD_ADDR + .S_NOD;
455 !
456 ! NOW FILL IN THE DATA BASE
457 !
458 LOC = .NSP_DATA_ADDR;
459 !
460 ! ACP QUEUE LISTHEAD
461 !
462 PUTWRD (.KERNEL_FILE, .LOC + 2, .LOC);
463 LOC = .LOC + 4;
464 !
465 ! ACP TCB
466 ! INTERCEPT SWITCH
467 ! LOOP BACK ENABLE
468 ! 4 WORD SCRATCH STORAGE
469 !
470 LOC = .LOC + 14;
471 !
472 ! NUMBER OF LOGICAL LINKS
473 !
474 PUTWRD (.KERNEL_FILE, .LOC, .LLC_PTR [LLC_LLKNUM]);
475 LOC = .LOC + 2;
476 !
477 ! ADDRESS OF LOGICAL LINK VECTOR
478 !
479 LOC = .LOC + 2;
480 !
481 ! NUMBER OF PHYSICAL LINKS
482 !
483 PUTWRD (.KERNEL_FILE, .LOC, SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$NPLD'), 0));
484 LOC = .LOC + 2;
485 !
486 ! ADDRESS OF PHYSICAL LINK DATA BASE
487 !
488 PUTWRD (.KERNEL_FILE, .LOC, .PLD_ADDR);
489 LOC = .LOC + 2;
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
490 !
491 ! NUMBER OF NODE NAME TABLE ENTRIES
492 !
493 PUTWRD (.KERNEL_FILE, .LOC, SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$NNOD'), 0));
494 LOC = .LOC + 2;
495 !
496 ! POINTER TO NODE NAME DATA BASE
497 !
498 PUTWRD (.KERNEL_FILE, .LOC, .NOD_ADDR);
499 LOC = .LOC + 2;
500 !
501 ! NUMBER OF PASSWORD ENTRIES
502 !
503 PUTWRD (.KERNEL_FILE, .LOC, 1);
504 LOC = .LOC + 2;
505 !
506 ! POINTER TO PASSWORD DATA BASE
507 !
508 PUTWRD (.KERNEL_FILE, .LOC, .VER_ADDR);
509 LOC = .LOC + 2;
510 !
511 ! NUMBER OF STATISTICS BLOCKS
512 !
513 PUTWRD (.KERNEL_FILE, .LOC, 1);
514 LOC = .LOC + 2;
515 !
516 ! POINTER TO STATISTICS DATA BASE
517 !
518 PUTWRD (.KERNEL_FILE, .LOC, .STS_ADDR);
519 LOC = .LOC + 2;
520 !
521 ! NOW ALLOCATE A DCB IF NECESSARY
522 !
523
524 IF (.LLC_PTR [LLC_DEV] NEQ 0)
525 THEN
526 BEGIN
527 PCB_ADDR = GETWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_PCB]);
528 LD_DCB (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR, .PCB_ADDR, .LLC_PTR [LLC_DEV], .VALUES);
529 END;
530
531 !
532 ! UPDATE THE PDV TO POINT AT THE DATA
533 !
534 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DAT], .NSP_DATA_ADDR);
535 END; !OF LL_NSP
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
536 ROUTINE LL_AUX (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
537 !BUILD DATA BASE FOR AUX
538
539 !++
540 ! FUNCTIONAL DESCRIPTION:
541 !
542 ! BUILD THE DATA BASE FOR AN AUX LLC.
543 !
544 ! FORMAL PARAMETERS:
545 !
546 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
547 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
548 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
549 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
550 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
551 ! VALUES - BLOCK OF THINGS FOR VNP20
552 !
553 ! IMPLICIT INPUTS:
554 !
555 ! NONE
556 !
557 ! IMPLICIT OUTPUTS:
558 !
559 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
560 !
561 ! ROUTINE VALUE:
562 !
563 ! NONE
564 !
565 ! SIDE EFFECTS:
566 !
567 ! MODIFIES THE KERNEL
568 !
569 !--
570
571 BEGIN
572
573 BIND
574 ROUTINE_NAME = UPLIT (%ASCIZ'LL_AUX');
575
576 MAP
577 KERNEL_FILE : REF FILE_BLOCK,
578 FILE_PTR : REF FILE_BLOCK,
579 LLC_PTR : REF LLC_BLOCK,
580 VALUES : REF VNPVAL_BLOCK;
581
582 LOCAL
583 LOC,
584 AUX_DATA_ADDR;
585
586 !
587 ! ALLOCATE SPACE FOR AUX STUFF
588 !
589 AUX_DATA_ADDR = ALOCB (.KERNEL_FILE, 4, 1, .VALUES);
590 !
591 ! FILL IN VALUES FROM AUX.DAT
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
592 !
593 LOC = .AUX_DATA_ADDR;
594 PUTWRD (.KERNEL_FILE, .LOC, %O'177777');
595 LOC = .LOC + 2;
596 !
597 ! UPDATE THE PDV TO POINT AT THE DATA
598 !
599 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DAT], .AUX_DATA_ADDR);
600 END; !OF LL_AUX
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
601 ROUTINE LL_DLX (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
602 !BUILD DATA BASE FOR DLX
603
604 !++
605 ! FUNCTIONAL DESCRIPTION:
606 !
607 ! BUILD THE DATA BASE FOR AN DLX LLC.
608 !
609 ! FORMAL PARAMETERS:
610 !
611 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
612 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
613 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
614 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
615 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
616 ! VALUES - BLOCK OF THINGS FOR VNP20
617 !
618 ! IMPLICIT INPUTS:
619 !
620 ! NONE
621 !
622 ! IMPLICIT OUTPUTS:
623 !
624 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
625 !
626 ! ROUTINE VALUE:
627 !
628 ! NONE
629 !
630 ! SIDE EFFECTS:
631 !
632 ! MODIFIES THE KERNEL
633 !
634 !--
635
636 BEGIN
637
638 BIND
639 ROUTINE_NAME = UPLIT (%ASCIZ'LL_DLX');
640
641 MAP
642 KERNEL_FILE : REF FILE_BLOCK,
643 FILE_PTR : REF FILE_BLOCK,
644 LLC_PTR : REF LLC_BLOCK,
645 VALUES : REF VNPVAL_BLOCK;
646
647 LOCAL
648 LOC,
649 DLX_DATA_ADDR,
650 ALOC_LENGTH,
651 ALOC_ADDR;
652
653 !
654 ! ALLOCATE CORE BLOCK POINTER WORDS
655 !
656 DLX_DATA_ADDR = ALOCB (.KERNEL_FILE, 4, 1, .VALUES);
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
657 !
658 ! ALLOCATE REQUESTED CORE BLOCK
659 !
660 ALOC_ADDR = 0;
661 ALOC_LENGTH = SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'$$BUF '), 0);
662
663 IF (.ALOC_LENGTH GTR 0) THEN ALOC_ADDR = ALOC_POOL (FILE_PTR [FILE_NAME], .ALOC_LENGTH, 1, .VALUES);
664
665 !
666 ! PUT CORE BLOCK LOCATION AND OFFSET IN POINTER WORDS
667 !
668 LOC = .DLX_DATA_ADDR;
669 PUTWRD (.KERNEL_FILE, .LOC, .ALOC_ADDR/64);
670 LOC = .LOC + 2;
671 PUTWRD (.KERNEL_FILE, .LOC, %O'140000' + (.ALOC_ADDR MOD 64));
672 !
673 ! BUILD AN APPROPRIATE DCB
674 !
675
676 IF (.LLC_PTR [LLC_DEV] NEQ 0)
677 THEN
678 LD_DCB (.KERNEL_FILE, .FILE_CHAN, .FILE_PTR,
679 GETWRD (.KERNEL_FILE,
680 .PDV_ADDR + .VALUES [Z_PCB]), .LLC_PTR [LLC_DEV], .VALUES);
681
682 !
683 ! UPDATE THE PDV TO POINT AT THE DATA
684 !
685 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DAT], .DLX_DATA_ADDR);
686 END; !OF LL_DLX
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
687 ROUTINE LL_ATS (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
688 !BUILD DATA BASE FOR ATS
689
690 !++
691 ! FUNCTIONAL DESCRIPTION:
692 !
693 ! BUILD THE DATA BASE FOR AN ATS LLC.
694 !
695 ! FORMAL PARAMETERS:
696 !
697 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
698 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
699 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
700 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
701 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
702 ! VALUES - BLOCK OF THINGS FOR VNP20
703 !
704 ! IMPLICIT INPUTS:
705 !
706 ! NONE
707 !
708 ! IMPLICIT OUTPUTS:
709 !
710 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
711 !
712 ! ROUTINE VALUE:
713 !
714 ! NONE
715 !
716 ! SIDE EFFECTS:
717 !
718 ! MODIFIES THE KERNEL
719 !
720 !--
721
722 BEGIN
723
724 BIND
725 ROUTINE_NAME = UPLIT (%ASCIZ'LL_ATS');
726
727 MAP
728 KERNEL_FILE : REF FILE_BLOCK,
729 FILE_PTR : REF FILE_BLOCK,
730 LLC_PTR : REF LLC_BLOCK,
731 VALUES : REF VNPVAL_BLOCK;
732
733 LOCAL
734 LOC;
735
736 END; !OF LL_ATS
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
737 ROUTINE LL_NRD (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
738 !BUILD DATA BASE FOR NRD
739
740 !++
741 ! FUNCTIONAL DESCRIPTION:
742 !
743 ! BUILD THE DATA BASE FOR AN NRD LLC.
744 !
745 ! FORMAL PARAMETERS:
746 !
747 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
748 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
749 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
750 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
751 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
752 ! VALUES - BLOCK OF THINGS FOR VNP20
753 !
754 ! IMPLICIT INPUTS:
755 !
756 ! NONE
757 !
758 ! IMPLICIT OUTPUTS:
759 !
760 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
761 !
762 ! ROUTINE VALUE:
763 !
764 ! NONE
765 !
766 ! SIDE EFFECTS:
767 !
768 ! MODIFIES THE KERNEL
769 !
770 !--
771
772 BEGIN
773
774 BIND
775 ROUTINE_NAME = UPLIT (%ASCIZ'LL_NRD');
776
777 MAP
778 KERNEL_FILE : REF FILE_BLOCK,
779 FILE_PTR : REF FILE_BLOCK,
780 LLC_PTR : REF LLC_BLOCK,
781 VALUES : REF VNPVAL_BLOCK;
782
783 LOCAL
784 LOC;
785
786 END; !OF LL_NRD
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
787 ROUTINE LL_NRM (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
788 !BUILD DATA BASE FOR NRM
789
790 !++
791 ! FUNCTIONAL DESCRIPTION:
792 !
793 ! BUILD THE DATA BASE FOR AN NRM LLC.
794 !
795 ! FORMAL PARAMETERS:
796 !
797 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
798 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
799 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
800 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
801 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
802 ! VALUES - BLOCK OF THINGS FOR VNP20
803 !
804 ! IMPLICIT INPUTS:
805 !
806 ! NONE
807 !
808 ! IMPLICIT OUTPUTS:
809 !
810 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
811 !
812 ! ROUTINE VALUE:
813 !
814 ! NONE
815 !
816 ! SIDE EFFECTS:
817 !
818 ! MODIFIES THE KERNEL
819 !
820 !--
821
822 BEGIN
823
824 BIND
825 ROUTINE_NAME = UPLIT (%ASCIZ'LL_NRM');
826
827 MAP
828 KERNEL_FILE : REF FILE_BLOCK,
829 FILE_PTR : REF FILE_BLOCK,
830 LLC_PTR : REF LLC_BLOCK,
831 VALUES : REF VNPVAL_BLOCK;
832
833 LOCAL
834 NRM_DATA_ADDR,
835 XXBEG,
836 XXEND,
837 PCB_ALOC_LEN,
838 DAT_FILE : REF FILE_BLOCK,
839 LOC;
840
841 !
842 ! READ IN THE NRM DATA BASE FILE
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
843 !
844 DAT_FILE = GETBLK (FILE_TYP, FILE_LEN);
845 CH$MOVE (6, CH$PTR (UPLIT (%ASCIZ'NRMDAT')), CH$PTR (DAT_FILE [FILE_NAME]));
846 RSTB (.FILE_CHAN, .DAT_FILE);
847 RCOR (.DAT_FILE, .FILE_CHAN, 4*2048);
848 !
849 ! CALCULATE SIZE OF DATA BASE AND ALLOCATE IT
850 !
851 XXBEG = SYM_VAL (.DAT_FILE, UPLIT (%ASCIZ'NRMDAT'), 0);
852 XXEND = SYM_VAL (.DAT_FILE, UPLIT (%ASCIZ'NRMEND'), 0);
853 PCB_ALOC_LEN = SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'PCBLEN'), 0)*GETWRD (.DAT_FILE,
854 .XXBEG + SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'R$PCB '), 0));
855 NRM_DATA_ADDR = ALOCB (.KERNEL_FILE, .XXEND - .XXBEG + .PCB_ALOC_LEN, 1, .VALUES);
856 !
857 ! COPY IN THE DATA BASE
858 !
859
860 INCR COUNTER FROM .XXBEG TO .XXEND - 1 DO
861 PUTBYT (.KERNEL_FILE, .NRM_DATA_ADDR + .COUNTER - .XXBEG, GETBYT (.DAT_FILE, .COUNTER));
862
863 !
864 ! INSTALL THE LSTHD
865 !
866 PUTWRD (.KERNEL_FILE, .NRM_DATA_ADDR + SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'R$RWT '), 0) + 2,
867 .NRM_DATA_ADDR + SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'R$RWT '), 0));
868 !
869 ! INSTALL THE .POOL POINTER
870 !
871 PUTWRD (.KERNEL_FILE, .NRM_DATA_ADDR + SYM_VAL (.FILE_PTR, UPLIT (%ASCIZ'R$PCB '), 0) + 2,
872 .NRM_DATA_ADDR + .XXEND - .XXBEG);
873 !
874 ! FREE THE FILE BLOCK
875 !
876 FCOR (.DAT_FILE);
877 !
878 ! STORE THE POINTER TO THE DATA BASE IN THE PDV
879 !
880 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DAT], .NRM_DATA_ADDR);
881 END; !OF LL_NRM
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
882 ROUTINE LL_VT6 (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
883 !BUILD DATA BASE FOR VT6
884
885 !++
886 ! FUNCTIONAL DESCRIPTION:
887 !
888 ! BUILD THE DATA BASE FOR A VT6 LLC.
889 !
890 ! FORMAL PARAMETERS:
891 !
892 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
893 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
894 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
895 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
896 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
897 ! VALUES - BLOCK OF THINGS FOR VNP20
898 !
899 ! IMPLICIT INPUTS:
900 !
901 ! NONE
902 !
903 ! IMPLICIT OUTPUTS:
904 !
905 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
906 !
907 ! ROUTINE VALUE:
908 !
909 ! NONE
910 !
911 ! SIDE EFFECTS:
912 !
913 ! MODIFIES THE KERNEL
914 !
915 !--
916
917 BEGIN
918
919 BIND
920 ROUTINE_NAME = UPLIT (%ASCIZ'LL_VT6');
921
922 MAP
923 KERNEL_FILE : REF FILE_BLOCK,
924 FILE_PTR : REF FILE_BLOCK,
925 LLC_PTR : REF LLC_BLOCK,
926 VALUES : REF VNPVAL_BLOCK;
927
928 LOCAL
929 LOC;
930
931 END; !OF LL_VT6
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
932 ROUTINE LL_DTR (KERNEL_FILE, FILE_CHAN, FILE_PTR, PDV_ADDR, LLC_PTR, VALUES) : NOVALUE =
933 !BUILD DATA BASE FOR DTR
934
935 !++
936 ! FUNCTIONAL DESCRIPTION:
937 !
938 ! BUILD THE DATA BASE FOR A DTR LLC.
939 !
940 ! FORMAL PARAMETERS:
941 !
942 ! KERNEL_FILE - FILE BLOCK FOR THE KERNEL TO BE MODIFIED
943 ! FILE_CHAN - CHANNEL NUMBER ON WHICH TO READ VARIOUS STUFF FROM
944 ! FILE_PTR - POINTER TO FILE THAT HAS THE LLC SYMBOLS
945 ! PDV_ADDR - PDP-11 ADDRESS OF PROCESS DESCRIPTOR VECTOR
946 ! LLC_PTR - POINTER TO LLC DATA STRUCTURE
947 ! VALUES - BLOCK OF THINGS FOR VNP20
948 !
949 ! IMPLICIT INPUTS:
950 !
951 ! NONE
952 !
953 ! IMPLICIT OUTPUTS:
954 !
955 ! STORES A POINTER TO THE DATA CREATED IN THE PDV.
956 !
957 ! ROUTINE VALUE:
958 !
959 ! NONE
960 !
961 ! SIDE EFFECTS:
962 !
963 ! MODIFIES THE KERNEL
964 !
965 !--
966
967 BEGIN
968
969 BIND
970 ROUTINE_NAME = UPLIT (%ASCIZ'LL_DTR');
971
972 MAP
973 KERNEL_FILE : REF FILE_BLOCK,
974 FILE_PTR : REF FILE_BLOCK,
975 LLC_PTR : REF LLC_BLOCK,
976 VALUES : REF VNPVAL_BLOCK;
977
978 LOCAL
979 LOC,
980 DTR_DATA_ADDR,
981 PREV_CHAN_BLK;
982
983 !
984 ! ALLOCATE SPACE FOR DTR STUFF
985 !
986 DTR_DATA_ADDR = ALOCB (.KERNEL_FILE, 6 + (10*32), 1, .VALUES);
987 !
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
988 ! NOW PLACE LIST ELEMENTS INTO DATA BASE
989 !
990 LOC = .DTR_DATA_ADDR + 6;
991 PREV_CHAN_BLK = .DTR_DATA_ADDR;
992 !
993 ! LOOP THROUGH PLACING POINTERS
994 !
995
996 INCR CHAN_NUM FROM 1 TO 9 BY 1 DO
997 BEGIN
998 PUTWRD (.KERNEL_FILE, .DTR_DATA_ADDR + 2, .LOC);
999 PUTWRD (.KERNEL_FILE, .PREV_CHAN_BLK, .LOC);
1000 PREV_CHAN_BLK = .LOC;
1001 LOC = .LOC + 32;
1002 END;
1003
1004 !
1005 ! UPDATE THE PDV TO POINT AT THE DATA BASE
1006 !
1007 PUTWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_DAT], .DTR_DATA_ADDR);
1008 END; !OF LL_DTR
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
1009 ROUTINE LD_DCB (KERNEL_FILE, FILE_CHAN, FILE_PTR, PCB_ADDR, DEV_NAME, VALUES) : NOVALUE =
1010 !BUILD A DCB FOR AN LLC
1011
1012 !++
1013 ! FUNCTIONAL DESCRIPTION
1014 !
1015 ! ALLOCATE AND INSERT A DCB FOR A PARTICULAR LLC.
1016 !
1017 ! FORMAL PARAMETERS:
1018 !
1019 ! KERNEL_FILE - POINTER TO FILE THAT HOLDS THE KERNAL IMAGE
1020 ! FILE_CHAN - CHANNEL FOR PERFORMING I/O AT THIS LEVEL
1021 ! FILE_PTR - POINTER TO FILE THAT HAS LLC SYMBOLS
1022 ! PCB_ADDR - PDP-11 ADDRESS OF PCB FOR THIS LLC
1023 ! DEV_NAME - LOCATION CONTAINING 2 CHARACTER DEVICE NAME
1024 ! VALUES - BLOCK OF LOTS OF GOOD THAINGS FOR VNP20
1025 !
1026 ! IMPLICIT INPUTS:
1027 !
1028 ! NONE
1029 !
1030 ! IMPLICIT OUTPUTS:
1031 !
1032 ! NONE
1033 !
1034 ! ROUTINE VALUE:
1035 !
1036 ! NONE
1037 !
1038 ! SIDE EFFECTS
1039 !
1040 ! THE KERNEL IS MODIFIED
1041 !
1042 !--
1043
1044 BEGIN
1045
1046 BIND
1047 ROUTINE_NAME = UPLIT (%ASCIZ'LD_DCB');
1048
1049 MAP
1050 KERNEL_FILE : REF FILE_BLOCK,
1051 FILE_PTR : REF FILE_BLOCK,
1052 VALUES : REF VNPVAL_BLOCK;
1053
1054 LOCAL
1055 LOC,
1056 DCB_FILE : REF FILE_BLOCK,
1057 DCB_NAME : VECTOR [CH$ALLOCATION (7)],
1058 XXBEG,
1059 XXEND,
1060 XXTBL,
1061 DCB_DATA_ADDR,
1062 DCB_ADDR,
1063 LAST_DCB_ADDR,
1064 UCB_ADDR,
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
1065 FIRST_UCB_ADDR,
1066 UCB_LENGTH,
1067 SCB_ADDR,
1068 LAST_SCB_ADDR,
1069 NUNITS;
1070
1071 !
1072 ! GET FILE BLOCK TO READ IN FILE
1073 !
1074 DCB_FILE = GETBLK (FILE_TYP, FILE_LEN);
1075 !
1076 ! SETUP FILENAME AS ???TAB
1077 !
1078 CH$COPY (3, CH$PTR (FILE_PTR [FILE_NAME]), 3, CH$PTR (UPLIT (%ASCIZ'TAB')), 0, 6,
1079 CH$PTR (DCB_FILE [FILE_NAME]));
1080 !
1081 ! READ IN THE CORE FILE AND SYMBOL TABLE
1082 !
1083 RSTB (.FILE_CHAN, .DCB_FILE);
1084 RCOR (.DCB_FILE, .FILE_CHAN, 2*1024);
1085 !
1086 ! NOW LOOK UP THE STARTING AND ENDING SYMBOLS FOR COPYING
1087 !
1088 CH$COPY (1, CH$PTR (UPLIT (%ASCIZ'$')), 2, CH$PTR (DEV_NAME), 0, 7, CH$PTR (DCB_NAME));
1089 CH$MOVE (3, CH$PTR (UPLIT (%ASCIZ'DCB')), CH$PTR (DCB_NAME, 3));
1090 XXBEG = SYM_VAL (.DCB_FILE, DCB_NAME, 0);
1091 CH$MOVE (3, CH$PTR (UPLIT (%ASCIZ'END')), CH$PTR (DCB_NAME, 3));
1092 XXEND = SYM_VAL (.DCB_FILE, DCB_NAME, 0);
1093 CH$MOVE (3, CH$PTR (UPLIT (%ASCIZ'TBL')), CH$PTR (DCB_NAME, 3));
1094 XXTBL = SYM_VAL (.DCB_FILE, DCB_NAME, 0);
1095 !
1096 ! ALLOCATE THE DCB STRUCTURES
1097 !
1098 DCB_DATA_ADDR = ALOCB (.KERNEL_FILE, .XXEND - .XXBEG, 1, .VALUES);
1099 !
1100 ! COPY IN THE DATA STRUCTURE
1101 !
1102
1103 INCR COUNTER FROM .XXBEG TO .XXEND - 1 DO
1104 PUTBYT (.KERNEL_FILE, .DCB_DATA_ADDR + .COUNTER - .XXBEG, GETBYT (.DCB_FILE, .COUNTER));
1105
1106 !
1107 ! NOW RELOCATE SOME OF THE DATA STRUCTURE LOCATIONS
1108 !
1109 !
1110 ! PROCESS EACH DCB, WITH ITS UCBS AND SCBS.
1111 !
1112 SCB_ADDR = 0;
1113 DCB_ADDR = .DCB_DATA_ADDR;
1114
1115 WHILE (.DCB_ADDR NEQ 0) DO
1116 BEGIN
1117 LAST_DCB_ADDR = .DCB_ADDR;
1118 !
1119 ! COMPUTE THE NUMBER OF UNITS AND THE LENGTH OF EACH UCB
1120 !
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
1121 NUNITS = GETBYT (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_UNIT] + 1) - GETBYT (.KERNEL_FILE,
1122 .DCB_ADDR + .VALUES [D_UNIT]) + 1;
1123 UCB_LENGTH = GETWRD (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_UCBL]);
1124 !
1125 ! RELOCATE THE DCB, UCB AND SCB.
1126 !
1127 FIRST_UCB_ADDR = GETWRD (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_UCB]) - .XXBEG + .DCB_ADDR;
1128 PUTWRD (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_UCB], .FIRST_UCB_ADDR);
1129 PUTWRD (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_DSP], .XXTBL);
1130 PUTWRD (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_PCB], .PCB_ADDR);
1131
1132 INCR COUNTER FROM 0 TO .NUNITS - 1 DO
1133 BEGIN !EACH UCB
1134 UCB_ADDR = .FIRST_UCB_ADDR + (.UCB_LENGTH*.COUNTER);
1135 PUTWRD (.KERNEL_FILE, .UCB_ADDR + .VALUES [U_DCB],
1136 GETWRD (.KERNEL_FILE,
1137 .UCB_ADDR + .VALUES [U_DCB]) - .XXBEG + .DCB_ADDR);
1138 PUTWRD (.KERNEL_FILE, .UCB_ADDR + .VALUES [U_RED],
1139 GETWRD (.KERNEL_FILE,
1140 .UCB_ADDR + .VALUES [U_RED]) - .XXBEG + .DCB_ADDR);
1141 LAST_SCB_ADDR = .SCB_ADDR;
1142 SCB_ADDR = GETWRD (.KERNEL_FILE, .UCB_ADDR + .VALUES [U_SCB]) - .XXBEG + .DCB_ADDR;
1143 PUTWRD (.KERNEL_FILE, .UCB_ADDR + .VALUES [U_SCB], .SCB_ADDR);
1144
1145 IF (.SCB_ADDR NEQ .LAST_SCB_ADDR)
1146 THEN
1147 BEGIN
1148 PUTWRD (.KERNEL_FILE, .SCB_ADDR + .VALUES [S_LHD] + 2,
1149 GETWRD (.KERNEL_FILE,
1150 .SCB_ADDR + .VALUES [S_LHD] + 2) - .XXBEG + .DCB_ADDR);
1151 END;
1152
1153 END;
1154
1155 DCB_ADDR = GETWRD (.KERNEL_FILE, .DCB_ADDR + .VALUES [D_LNK]);
1156 END;
1157
1158 !
1159 ! LINK THE DCB INTO THE SYSTEM'S LIST OF DCBS
1160 !
1161 LNKDCB (.KERNEL_FILE, .DCB_DATA_ADDR, .VALUES);
1162 !
1163 ! FREE SOME DATA STRUCTURES
1164 !
1165 FCOR (.DCB_FILE);
1166 END; !OF LD_DCB
1167 END
1168
1169 ELUDOM
1170 ! Local Modes:
1171 ! Comment Column:36
1172 ! Comment Start:!
1173 ! Mode:Fundamental
1174 ! Auto Save Mode:2
1175 ! End:
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
ALOCB 150 447 589 656 855 986 1098
ALOC_ADDR 651 660# 663# 669 671
ALOC_LENGTH 650 661# 663
ALOC_POOL 151 663
AUX_DATA_ADDR 584 589# 593 599
CHAN_NUM 996
COUNTER 306 307 308 860 861 1103 1104
1132 1134
DAT_FILE 838 844# 845 846 847 851 852
853 861 876
DCB_ADDR 1062 1113# 1115 1117 1121 1122 1123
1127 1128 1129 1130 1137 1140 1142
1150 1155#
DCB_DATA_ADDR 1061 1098# 1104 1113 1161
DCB_FILE 1056 1074# 1079 1083 1084 1090 1092
1094 1104 1165
DCB_NAME 1057 1088 1089 1090 1091 1092 1093
1094
DEV_NAME 1009 1088
DLX_DATA_ADDR 649 656# 668 685
DTR_DATA_ADDR 980 986# 990 991 998 1007
D_DSP 1129
D_LNK 1155
D_PCB 1130
D_UCBL 1123
D_UCB 1127 1128
D_UNIT 1121 1122
ERRMSG 142 366
ERROR 141 278
FCOR 137 374 876 1165
FILE_BLOCK 194 239 252 419 420 577 578
642 643 728 729 778 779 828
829 838 923 924 973 974 1050
1051 1056
FILE_CHAN 200 270 271 326 331 336 341
346 351 357 363 378 528 536
601 678 687 737 787 846 847
882 932 1009 1083 1084
FILE_HWM 298
FILE_LABEL 289
FILE_LEN 257 844 1074
FILE_NAME 196 262 266 296 324 329 334
339 344 349 354 360 366 663
845 1078 1079
FILE_PTR 156 194 196 252 257# 262 266
270 271 276 289 296 308 316
324 326 329 331 334 336 339
341 344 346 349 351 354 357
360 363 366 374 378 420 440
441 442 443 483 493 528 536
578 601 643 661 663 678 687
729 737 779 787 829 853 854
866 867 871 882 924 932 974
1009 1051 1078
FILE_TYP 257 844 1074
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
FIRST_UCB_ADDR 1065 1127# 1128 1134
FND_CHAIN 145 276
GEN_PCB 200 299
GETBLK 144 257 844 1074
GETBYT 146 308 861 1104 1121
GETWRD 147 262 284 527 679 853 1123
1127 1136 1139 1142 1149 1155
KERNEL_FILE 200 239 262 284 298 299 307
313 314 315 326 331 336 341
346 351 357 363 378 419 447
462 474 483 488 493 498 503
508 513 518 527 528 534 536
577 589 594 599 601 642 656
669 671 678 679 685 687 728
737 778 787 828 855 861 866
871 880 882 923 932 973 986
998 999 1007 1009 1050 1098 1104
1121 1123 1127 1128 1129 1130 1135
1136 1138 1139 1142 1143 1148 1149
1155 1161
L$BHGV 291
L$BSA 290
LAST_DCB_ADDR 1063 1117#
LAST_SCB_ADDR 1068 1141# 1145
LD_DCB 96# 528 678 1009*
LD_LLC 87 200*
LLC_BLOCK 193 251 421 579 644 730 780
830 925 975
LLC_CHAIN 276
LLC_DEV 524 528 676 680
LLC_LLKNUM 474
LLC_NAME 196
LLC_PTR 156 193 196 251 276# 326 331
336 341 346 351 357 363 378
421 474 524 528 536 579 601
644 676 680 687 730 737 780
787 830 882 925 932 975
LL_ATS 91 341 687*
LL_AUX 89 331 536*
LL_DLX 90 336 601*
LL_DTR 95 363 932*
LL_NRD 92 346 737*
LL_NRM 93 351 787*
LL_NSP 88 326 378*
LL_VT6 94 357 882*
LNKDCB 153 1161
LOC 425 458# 462 463# 470# 474 475#
479# 483 484# 488 489# 493 494#
498 499# 503 504# 508 509# 513
514# 518 519# 583 593# 594 595#
648 668# 669 670# 671 734 784
839 929 979 990# 998 999 1000
1001# 1055
M_PCB 152 299
NOD_ADDR 431 453# 454 498
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
NRM_DATA_ADDR 834 855# 861 866 867 871 872
880
NSP_DATA_ADDR 434 447# 451 458 534
NUNITS 1069 1121# 1132
OUTNUM 140
OUTPUT 134
OUTSTR 139
PARTITION_BASE 249 298# 299 300 307 314
PARTITION_NAME 248 297 299
PCB_ADDR 250 284# 286 299# 313 435 527#
528 1009 1130
PCB_ALOC_LEN 837 853# 855
PCOR1B 12#
PCRLF 138
PDV_ADDR 200 262 284 313 314 315 326
331 336 341 346 351 357 363
378 527 534 536 599 601 680
685 687 737 787 880 882 932
1007
PLD_ADDR 430 454# 488
PREV_CHAN_BLK 981 991# 999 1000#
PROCESS_BASE 244 290# 292 308
PROCESS_FLAGS 247
PROCESS_LABEL 243 289# 290 291
PROCESS_SIZE 246 292# 300 306
PROCESS_TOP 245 291# 292
PS_COM 301
PS_NSF 301
PS_SYS 301
PUTBYT 148 307 861 1104
PUTWRD 149 313 314 315 462 474 483
488 493 498 503 508 513 518
534 594 599 669 671 685 866
871 880 998 999 1007 1128 1129
1130 1135 1138 1143 1148
R50TOA 133* 262
RCOR 136 271 847 1084
ROUTINE_NAME 190# 236# 366 416# 574# 639# 725#
775# 825# 920# 970# 1047#
RSTB 135 270 846 1083
SCB_ADDR 1067 1112# 1141 1142# 1143 1145 1148
1150
SEL_LLC 86 156* 276
STS_ADDR 433 451# 452 518
SYM_VAL 143 440 441 442 443 483 493
661 851 852 853 854 866 867
871 1090 1092 1094
S_LHD 1148 1150
S_NOD 427 441# 447 454
S_PLD 426 440# 447
S_STS 428 443# 447 452
S_VER 429 442# 447 453
UCB_ADDR 1064 1134# 1135 1137 1138 1140 1142
1143
UCB_LENGTH 1066 1123# 1134
DSK:PCOR1B.XRF[4,31] 31-Aug-79 14:53
U_DCB 1135 1137
U_RED 1138 1140
U_SCB 1142 1143
VALUES 200 240 262 276 284 301 313
314 315 326 331 336 341 346
351 357 364 378 422 447 527
528 534 536 580 589 599 601
645 656 663 680 685 687 731
737 781 787 831 855 880 882
926 932 976 986 1007 1009 1052
1098 1121 1122 1123 1127 1128 1129
1130 1135 1137 1138 1140 1142 1143
1148 1150 1155 1161
VER_ADDR 432 452# 453 508
VNPVAL_BLOCK 240 422 580 645 731 781 831
926 976 1052
VRBL_SYM 154 316
XXBEG 835 851# 854 855 860 861 872
1058 1090# 1098 1103 1104 1127 1137
1140 1142 1150
XXEND 836 852# 855 860 872 1059 1092#
1098 1103
XXTBL 1060 1094# 1129
Z_DAT 534 599 685 880 1007
Z_DSP 314 315
Z_NAM 262
Z_PCB 284 313 527 680