Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/tkb-vnp/pcor1a.bpt
There are no other files named pcor1a.bpt in the archive.
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
1 !<TKB-VNP>PCOR1A.BLI.3, 12-Jun-79 15:51:54, Edit by SROBINSON
2 !<SAUTER.TKB20>PCOR1A.BLI.29, 17-Jan-79 13:22:24, Edit by SROBINSON
3 !<SAUTER.TKB20>PCOR1A.BLI.28, 14-Jan-79 16:36:29, Edit by SROBINSON
4 !<SAUTER.TKB20>PCOR1A.BLI.25, 2-Jan-79 09:38:28, Edit by SROBINSON
5 !<SAUTER.TKB20>PCOR1A.BLI.24, 2-Jan-79 06:46:38, Edit by SROBINSON
6 !<SAUTER.TKB20>PCOR1A.BLI.12, 24-Nov-78 09:31:38, Edit by SROBINSON
7 !<SAUTER.TKB20>PCOR1A.BLI.8, 17-Nov-78 07:07:34, Edit by SROBINSON
8 !<SAUTER.TKB20>PCOR1A.BLI.2, 16-Oct-78 09:51:53, Edit by SROBINSON
9 MODULE PCOR1A ( !PROCESS CORE IMAGE
10 IDENT = 'X0.2-4'
11 ) =
12 BEGIN
13 !
14 !
15 !
16 ! COPYRIGHT (C) 1978, 1979 BY
17 ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
18 !
19 !
20 ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
21 ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
22 ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
23 ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
24 ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
25 ! TRANSFERRED.
26 !
27 !
28 ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
29 ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
30 ! CORPORATION.
31 !
32 ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
33 ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
34 !
35
36 !++
37 ! FACILITY: VNP-20
38 !
39 ! ABSTRACT:
40 !
41 !
42 ! THIS MODULE PROCESSES CORE IMAGES (KERNEL AND TASK) FOR VNP20
43 !
44 !
45 ! ENVIRONMENT: TOPS-20 USER MODE
46 !
47 ! AUTHOR: J. SAUTER, CREATION DATE: 30-MAY-78
48 !
49 ! MODIFIED BY:
50 !
51 ! Scott G. Robinson, 16-SEP-78 : VERSION X0.1-2A
52 ! - Finish Development of D_DCP
53 ! - Finish Development of D_DUP
54 ! - Develop support for NSP, DLX, AUX LLCs
55 ! - Correct minor bugs in various routines
56 !
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
57 ! Scott G. Robinson, 23-SEP-78 : VERSION X0.1-3A
58 ! - Split PCOR into 3 modules (PCOR0,PCOR1,PCOR2)
59 ! - Add support for passwords
60 !
61 ! Scott G. Robinson, 16-OCT-78 : VERSION X0.2
62 ! - Split PCOR1 into PCOR1A, PCOR1B, and PCOR1C so that LLC and
63 ! DDM processing can reside in seperate modules
64 !
65 ! Scott G. Robinson, 17-NOV-78 : VERSION X0.2-1
66 ! - Redo VRBL_SYM because of a BLISS 36 OTS bug in
67 ! CH$FIND_CH
68 !
69 ! Scott G. Robinson, 24-NOV-78 : VERSION X0.2-2, X0.2-3
70 ! - NTL Data Base Processing for M_POOL
71 ! - Add ALOC_POOL Routine for obtaining storage from POOL..
72 ! Partition
73 ! - Change call to ENA_LINES to support NRM lines also
74 !
75 ! Scott G. Robinson, 12-JUN-79 : VERSION X0.2-4
76 ! - Change ALOC_POOL to allocate to a 32-word boundary
77 !
78 ! , : VERSION
79 ! 01 -
80 !--
81
82 !<BLF/PAGE>
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
83 !
84 ! TABLE OF CONTENTS:
85 !
86
87 FORWARD ROUTINE
88 VRBL_SYM, !OBTAIN THE VALUE OF A DEVICE DRIVER'S SYMBOL
89 M_POOL, !MAKE POOL PARTITION
90 ALOC_POOL, !ALLOCATE STORAGE FROM POOL PARTITION
91 LOADP : NOVALUE, !LOAD THE COMM PROCESSES
92 SEL_DLC, !SELECT A DLC BLOCK
93 SEL_DDM; !SELECT A DDM BLOCK
94
95 !
96 ! INCLUDE FILES:
97 !
98
99 LIBRARY 'VNP-LIB.L36';
100
101 ! REQUIRE 'BLOCKH.REQ'; !PREPARE TO DEFINE STORAGE BLOCKS
102 !REQUIRE 'FILE.REQ'; !DEFINE FILE BLOCK
103 !REQUIRE 'VNPVAL.REQ'; !VALUE BLOCK FOR VNP20
104 !REQUIRE 'LLC.REQ'; !DEFINE LLC BLOCK
105 !REQUIRE 'DLC.REQ'; !DEFINE DLC BLOCK
106 !REQUIRE 'DDM.REQ'; !DEFINE DDM BLOCK
107 !REQUIRE 'LIBR.REQ'; !DEFINE LIBRARY BLOCK
108 !REQUIRE 'BLOCKT.REQ'; !END OF DEFINING STORAGE BLOCKS
109 !REQUIRE 'TSKDEF.REQ'; !DEFINE TASK OFFSETS
110 !REQUIRE 'NTLDEF.REQ'; !DEFINE NTL BLOCK INFORMATION
111 !
112 ! MACROS:
113 !
114 ! NONE
115 !
116 ! EQUATED SYMBOLS:
117 !
118
119 LITERAL
120 DEBUG = 0;
121
122 !
123 ! OWN STORAGE:
124 !
125 ! NONE
126 !
127 ! EXTERNAL REFERENCES:
128 !
129
130 EXTERNAL ROUTINE
131 R50TOA : NOVALUE, !CONVERT RADIX50_11 TO ASCII
132 OUTPUT : NOVALUE, !OUTPUT A CHARACTER TO A FILE
133 PCRLF : NOVALUE, !PRINT CR THEN LF
134 OUTSTR : NOVALUE, !PRINT A STRING
135 OUTNUM : NOVALUE, !PRINT A NUMBER
136 ERROR : NOVALUE, !SIGNAL PROGRAMMING ERROR
137 ERRMSG : NOVALUE, !ERROR MESSAGE
138 SYM_VAL, !OBTAIN VALUE OF A SYMBOL
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
139 FND_CHAIN, !"FIND" AN ITEM IN A CHAIN
140 GETBYT, !GET A PDP-11 BYTE
141 GETWRD, !GET A PDP-11 WORD
142 PUTBYT : NOVALUE, !PUT A PDP-11 BYTE
143 PUTWRD : NOVALUE, !PUT A PDP-11 WORD
144 ALOCB, !ALLOCATE PDP-11 CORE
145 M_PCB, !MAKE A PCB
146 ENA_LINES, !ENABLE READY LINES
147 SET_PASWRDS, !SETUP THE PASSWORD DATA BASE
148 FIX_LLC : NOVALUE, !FIXUP REVERSE MAPPING TABLE
149 LD_LLC : NOVALUE, !BUILD LLC DATA STRUCTURES
150 LD_DDM : NOVALUE, !BUILD DDM DATA STRUCTURES
151 LD_DLC : NOVALUE; !BUILD DLC DATA STRUCTURES
152
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
153 GLOBAL ROUTINE VRBL_SYM (FILE_PTR, LEN, SYMBOL_NAME, ERR) = !GET VALUE OF SYMBOL WITH COMPUTED NAME
154
155 !++
156 ! FUNCTIONAL DESCRIPTION:
157 !
158 ! GET THE VALUE OF A PARTIALLY NAMED SYMBOL. PART OF THE NAME OF
159 ! THE FILE MUST BE SUBSTITUTED INTO THE GIVEN NAME.
160 !
161 ! FORMAL PARAMETERS:
162 !
163 ! FILE_PTR - THE FILE BLOCK THAT MAY HAVE THE SPECIFIED SYMBOL.
164 ! LEN - NUMBER OF CHARACTERS TO COPY FROM THE FILE NAME
165 ! SYMBOL_NAME - NAME OF THE SYMBOL, "\" STARTS PLACE TO
166 ! SUBSTITUTE FILE NAME.
167 ! ERR - PASSED TO SYM_VAL.
168 !
169 ! IMPLICIT INPUTS:
170 !
171 ! NONE
172 !
173 ! IMPLICIT OUTPUTS:
174 !
175 ! NONE
176 !
177 ! ROUTINE VALUE:
178 !
179 ! VALUE OF THE SYMBOL, OR -1 IF UNDEFINED.
180 !
181 ! SIDE EFFECTS
182 !
183 ! NONE
184 !
185 !--
186
187 BEGIN
188
189 BIND
190 ROUTINE_NAME = UPLIT (%ASCIZ'VRBL_SYM');
191
192 MAP
193 FILE_PTR : REF FILE_BLOCK;
194
195 LOCAL
196 CONVERTED_NAME : VECTOR [(CH$ALLOCATION (7))],
197 BACKSL,
198 RESULT;
199
200 RESULT = -1;
201 !
202 ! COPY THE SYMBOL NAME TO LOCAL STORAGE SO IT CAN BE MODIFIED
203 !
204 CH$MOVE (7, CH$PTR (.SYMBOL_NAME), CH$PTR (CONVERTED_NAME [0]));
205 !
206 ! FIND THE BACKSLASH
207 !
208 BACKSL = -1;
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
209
210 INCR C_POINTER FROM 0 TO 6 BY 1 DO
211
212 IF (CH$RCHAR (CH$PTR (CONVERTED_NAME [0], .C_POINTER)) EQL %C'\')
213 THEN
214 BEGIN
215 BACKSL = .C_POINTER;
216 EXITLOOP
217 END;
218
219 IF (.BACKSL EQL -1)
220 THEN
221 ERROR (UPLIT (%ASCIZ'BACKSLASH MISSING - VRBL_SYM'))
222 ELSE
223 BEGIN
224 CH$MOVE (.LEN, CH$PTR (FILE_PTR [FILE_NAME]), CH$PTR (CONVERTED_NAME [0], .BACKSL));
225 RESULT = SYM_VAL (.FILE_PTR, CONVERTED_NAME [0], .ERR);
226 END;
227
228 .RESULT
229 END; !OF VRBL_SYM
230
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
231 GLOBAL ROUTINE M_POOL (KERNEL_FILE, GEN_PCB, VALUES) = !MAKE THE POOL PARTITION
232
233 !++
234 ! FUNCTIONAL DESCRIPTION:
235 !
236 ! SET UP THE POOL.. PARTITION. ALLOCATE IN IT THE
237 ! RDBS AND SDBS. THIS ROUTINE ALSO ALLOCATES THE
238 ! CCBS, WHICH GO IN KERNEL SPACE.
239 !
240 ! FORMAL PARAMETERS:
241 !
242 ! KERNEL_FILE - POINTER TO THE FILE BLOCK WHICH DESCRIBES
243 ! THE RSX-11S KERNEL
244 ! GEN_PCB - PDP-11 ADDRESS OF THE SYSTEM-CONTROLLED PARTITION
245 ! VALUES - POINTER TO THE VALUES BLOCK
246 !
247 ! IMPLICIT INPUTS:
248 !
249 ! VALUES FROM CETAB.MAC, HELD IN THE VALUES ARRAY
250 !
251 ! IMPLICIT OUTPUTS:
252 !
253 ! NONE
254 !
255 ! ROUTINE VALUE:
256 !
257 ! PDP-11 ADDRESS OF THE POOL.. PCB
258 !
259 ! SIDE EFFECTS
260 !
261 ! MODIFIES THE KERNEL'S DATA STRUCTURES
262 !
263 !--
264
265 BEGIN
266
267 BIND
268 ROUTINE_NAME = UPLIT (%ASCIZ'MAKE_POOL');
269
270 MAP
271 KERNEL_FILE : REF FILE_BLOCK,
272 VALUES : REF VNPVAL_BLOCK;
273
274 LOCAL
275 POOL_PCB,
276 POOL_SIZE,
277 POOL_ALOC,
278 CCB_ADDR,
279 RDB_ADDR,
280 SDB_ADDR,
281 LAST_CCB,
282 LAST_SDB,
283 LAST_RDB,
284 CCB_COUNT,
285 RDB_COUNT,
286 SDB_COUNT,
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
287 CCB_SIZE,
288 RDB_SIZE,
289 SDB_SIZE;
290
291 !
292 ! BE SURE THE SIZES OF THE BLOCKS ARE EVEN.
293 !
294 CCB_SIZE = (.VALUES [CCBSZ] + 1) AND ( NOT 1);
295 RDB_SIZE = (.VALUES [RDBSZ] + 1) AND ( NOT 1);
296 SDB_SIZE = (.VALUES [SDBSZ] + 1) AND ( NOT 1);
297 !
298 ! COMPUTE THE BASE AND SIZE OF THE POOL
299 ! NOTE THAT THE RDBS AND SDBS ARE ACTUALLY 64 BYTES LONGER THAN
300 ! SPECIFIED ABOVE, TO ALLOW ROOM FOR NSP TO PUT HEADERS ON MESSAGES.
301 ! PERHAPS LATER WE CAN REDUCE THIS TO 32 OR SO, BUT IT WILL
302 ! REQUIRE SLIGHTLY MORE COMPLICATED CODE WHEN STORING ADDRESS
303 ! DOUBLEWORDS, SINCE THE ADDRESS PORTION MUST BE CAPABLE OF BEING
304 ! BACKED UP AS FAR AS NSP NEEDS WITHOUT GOING BELOW 0.
305 !
306 VALUES [POOL_BASE] = .KERNEL_FILE [FILE_HWM] + 1;
307 POOL_SIZE = (((.VALUES [RDBNM]*(.RDB_SIZE + 64)) !
308 + (.VALUES [SDBNM]*(.SDB_SIZE + 64)) !
309 + (.VALUES [FUDGE]*64)) + 63) AND ( NOT 63);
310 !
311 ! NOW ALLOCATE THE PARTITION CONTROL BLOCK.
312 !
313 POOL_PCB = M_PCB (.KERNEL_FILE, UPLIT (%ASCIZ'POOL..'), .GEN_PCB, .VALUES [POOL_BASE],
314 .VALUES [POOL_BASE] + .POOL_SIZE - 1, %O'000000',
315 .VALUES [PS_COM] OR .VALUES [PS_NSF] OR .VALUES [PS_SYS], 0, .VALUES);
316 !
317 ! NOW WE ALLOCATE CCBS. WE WILL NEED AN EXTRA CCB FOR EACH RDB.
318 !
319 LAST_CCB = 0;
320 CCB_COUNT = 0;
321
322 WHILE (.CCB_COUNT NEQ (.VALUES [CCBNM] + .VALUES [RDBNM])) DO
323 BEGIN
324 CCB_ADDR = ALOCB (.KERNEL_FILE, .CCB_SIZE, 1, .VALUES);
325 PUTBYT (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_BID], .VALUES [CB_CCB]);
326 PUTWRD (.KERNEL_FILE, .CCB_ADDR, .LAST_CCB);
327 LAST_CCB = .CCB_ADDR;
328 CCB_COUNT = .CCB_COUNT + 1;
329 END;
330
331 !
332 ! PUT THE RDBS AND SDBS AT THE TOP OF THE POOL PARTITION
333 !
334 POOL_ALOC = .VALUES [POOL_BASE] + .POOL_SIZE - ((((.VALUES [RDBNM]*(.RDB_SIZE + 64)) !
335 + (.VALUES [SDBNM]*(.SDB_SIZE + 64))) + 64) AND ( NOT 63));
336 !
337 ! REMEMBER WHERE TO START ALLOCATING LIBRARY ROUTINES IN THE POOL.
338 !
339 VALUES [POOL_ALLOC] = .POOL_ALOC;
340 !
341 ! NOW WE ALLOCATE SDBS. THEY ARE MERELY LINKED TOGETHER.
342 !
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
343 LAST_SDB = 0;
344 SDB_COUNT = 0;
345
346 WHILE (.SDB_COUNT NEQ .VALUES [SDBNM]) DO
347 BEGIN
348 SDB_ADDR = .POOL_ALOC;
349 POOL_ALOC = .POOL_ALOC + .SDB_SIZE + 64;
350
351 IF (.LAST_SDB NEQ 0)
352 THEN
353 BEGIN
354 PUTWRD (.KERNEL_FILE, .SDB_ADDR + 64, .LAST_SDB/64);
355 PUTWRD (.KERNEL_FILE, .SDB_ADDR + 64 + 2, %O'140000' OR (.LAST_SDB AND 63) + 64);
356 END;
357
358 LAST_SDB = .SDB_ADDR;
359 SDB_COUNT = .SDB_COUNT + 1;
360 END;
361
362 !
363 ! NOW WE ALLOCATE RDBS FROM THE POOL PARTITION
364 ! EACH RDB IS POINTED TO BY A CCB.
365 ! SUCH A CCB IS OFTEN REFERED TO AS AN RDB.
366 !
367 LAST_RDB = 0;
368 RDB_COUNT = 0;
369
370 WHILE (.RDB_COUNT NEQ .VALUES [RDBNM]) DO
371 BEGIN
372 RDB_ADDR = .POOL_ALOC;
373 POOL_ALOC = .POOL_ALOC + .RDB_SIZE + 64;
374 !
375 ! TAKE ONE OF THE EXTRA CCBS CREATED ON THE CCB LIST
376 !
377 CCB_ADDR = .LAST_CCB;
378 LAST_CCB = GETWRD (.KERNEL_FILE, .CCB_ADDR);
379 !
380 ! POINT IT TO THE BUFFER SPACE IN THE POOL PARTITION
381 !
382 PUTWRD (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_BUF1], (.RDB_ADDR/64));
383 PUTWRD (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_BUF1] + 2, %O'140000' OR ((.RDB_ADDR AND 63) + 64));
384 PUTWRD (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_CNT1], .RDB_SIZE);
385 PUTWRD (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_BUF2], (.RDB_ADDR/64));
386 PUTWRD (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_BUF2] + 2, %O'140000' OR ((.RDB_ADDR AND 63) + 64));
387 PUTWRD (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_CNT2], .RDB_SIZE);
388 PUTBYT (.KERNEL_FILE, .CCB_ADDR + .VALUES [C_BID], .VALUES [CB_RDB]);
389 PUTWRD (.KERNEL_FILE, .CCB_ADDR, .LAST_RDB);
390 LAST_RDB = .CCB_ADDR;
391 RDB_COUNT = .RDB_COUNT + 1;
392 END;
393
394 !
395 ! STORE LIST HEADERS FOR CCB, RDB AND SDB IN THE COMM EXEC
396 !
397 PUTWRD (.KERNEL_FILE, .VALUES [CCBLH], .LAST_CCB);
398 PUTWRD (.KERNEL_FILE, .VALUES [RDBLH], .LAST_RDB);
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
399 PUTWRD (.KERNEL_FILE, .VALUES [SDBLH], (.LAST_SDB/64));
400 PUTWRD (.KERNEL_FILE, .VALUES [SDBLH] + 2, %O'140000' + (.LAST_SDB AND 63) + 64);
401 !
402 ! STORE NTLPT, QBIAS AND QSTRT CELLS IN THE COMM EXEC
403 !
404 PUTWRD (.KERNEL_FILE, .VALUES [NTLPT], .VALUES [POOL_BASE]/64);
405 PUTWRD (.KERNEL_FILE, .VALUES [QBIAS], (.VALUES [POOL_BASE] + 64)/64);
406 PUTWRD (.KERNEL_FILE, .VALUES [QSTRT], (.VALUES [POOL_BASE] + 64)/64);
407 !
408 ! CHECK FOR OVERFLOW OF POOL PARTITION. SHOULD NEVER HAPPEN.
409 !
410
411 IF (.POOL_ALOC GTR (.VALUES [POOL_BASE] + .POOL_SIZE)) THEN ERROR (UPLIT (%ASCIZ'POOL OVERFLOW - M_POOL'))
412
413 ;
414 !
415 ! SET THE CURRENT BOTTOM OF THE POOL PARTITION TO JUST PAST THE NTL HOME BLOCK
416 !
417 VALUES [POOL_BOTTOM] = .VALUES [POOL_BASE] + 64;
418 !
419 ! WE NOW INITIALIZE SOME LOCATIONS IN THE NTL HOME BLOCK WHICH IS THE FIRST
420 ! 32. WORD SEGMENT STARTING AT POOL_BASE
421 !
422 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $NTPCB, .POOL_PCB);
423 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXPCB, .VALUES [CEX_PCB_ADDR]);
424 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 0, .VALUES [CCBRT]);
425 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 2, .VALUES [CEAVL]);
426 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 4, .VALUES [CTCMP]);
427 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 6, .VALUES [DDENB]);
428 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 8, .VALUES [INTSX]);
429 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 10, .VALUES [LLCRS]);
430 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 12, .VALUES [MVFBF]);
431 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 14, .VALUES [MVTBF]);
432 PUTWRD (.KERNEL_FILE, .VALUES [POOL_BASE] + $CXSYM + 16, .VALUES [PDDSP]);
433 !
434 ! WE ARE DONE WITH THE POOL PARTITION. RETURN THE PCB ADDRESS.
435 !
436 .POOL_PCB
437 END; !OF M_POOL
438
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
439 GLOBAL ROUTINE ALOC_POOL (REASON, AMOUNT, HOW, VALUES) = !ALLOCATE FROM POOL PARTITION
440
441 !++
442 ! FUNCTIONAL DESCRIPTION:
443 !
444 ! ALLOCATE "AMOUNT" BYTES FROM THE POOL.. PARTITION
445 !
446 ! FORMAL PARAMETERS:
447 !
448 ! REASON - WHAT GETS PRINTED WHEN OVERALLOCATED
449 ! AMOUNT - THE NUMBER OF BYTES TO ALLOCATE
450 ! HOW - 0 TO ALLOCATE FROM BASE, 1 TO ALLOCATE TOP-DOWN
451 ! VALUES - POINTER TO THE VALUES BLOCK
452 !
453 ! IMPLICIT INPUTS:
454 !
455 ! VALUES FROM CETAB.MAC, HELD IN THE VALUES ARRAY
456 !
457 ! IMPLICIT OUTPUTS:
458 !
459 ! NONE
460 !
461 ! ROUTINE VALUE:
462 !
463 ! ADDRESS OF START OF ALLOCATED AREA
464 !
465 ! SIDE EFFECTS
466 !
467 ! MODIFIES SOME OF THE VALUES DATA ITEMS
468 !
469 !--
470
471 BEGIN
472
473 BIND
474 ROUTINE_NAME = UPLIT (%ASCIZ'ALLOCATE_POOL..');
475
476 MAP
477 VALUES : REF VNPVAL_BLOCK;
478
479 LOCAL
480 REAL_AMOUNT,
481 RESULT;
482
483 !
484 ! ROUND AMOUNT TO 64 BYTE QUANTITY
485 !
486 REAL_AMOUNT = (.AMOUNT + 63) AND ( NOT 63);
487 !
488 ! SPLIT INTO PROCESSING FOR TOP-DOWN AND BOTTOM-UP ALLOCATION
489 !
490
491 IF (.HOW EQL 1)
492 THEN
493 !
494 ! HERE TO ALLOCATE TOP-DOWN
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
495 !
496 BEGIN
497 VALUES [POOL_ALLOC] = .VALUES [POOL_ALLOC] - .REAL_AMOUNT;
498
499 IF (.VALUES [POOL_ALLOC] LSS .VALUES [POOL_BOTTOM])
500 THEN
501 ERRMSG (0, 35, ROUTINE_NAME, .REASON,
502 .VALUES [POOL_BOTTOM] - .VALUES [POOL_ALLOC], 0, 0);
503
504 RESULT = .VALUES [POOL_ALLOC];
505 END
506 ELSE
507 !
508 ! HERE TO ALLOCATE BOTTOM-UP
509 !
510 BEGIN
511 RESULT = .VALUES [POOL_BOTTOM];
512 VALUES [POOL_BOTTOM] = .VALUES [POOL_BOTTOM] + .REAL_AMOUNT;
513
514 IF (.VALUES [POOL_ALLOC] LSS .VALUES [POOL_BOTTOM])
515 THEN
516 ERRMSG (0, 35, ROUTINE_NAME, .REASON,
517 .VALUES [POOL_BOTTOM] - .VALUES [POOL_ALLOC], 0, 0);
518
519 END;
520
521 .RESULT
522 END; !OF ALOC_POOL
523
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
524 GLOBAL ROUTINE LOADP (KERNEL_FILE, GEN_PCB, FILE_CHAN, VALUES) : NOVALUE = !LOAD THE COMM PROCESSES
525
526 !++
527 ! FUNCTIONAL DESCRIPTION:
528 !
529 ! LOAD THE COMMUNICATIONS PROCESSES. THEY ARE LISTED IN
530 ! THE COMM EXEC.
531 !
532 ! FORMAL PARAMETERS:
533 !
534 ! KERNEL_FILE - POINTER TO THE FILE BLOCK WHICH DESCRIBES
535 ! THE RSX-11S KERNEL
536 ! GEN_PCB - PDP-11 ADDRESS OF THE SYSTEM-CONTROLLED PARTITION
537 ! FILE_CHAN - CHANNEL TO READ ON
538 ! VALUES - POINTER TO THE VALUES BLOCK
539 !
540 ! IMPLICIT INPUTS:
541 !
542 ! VALUES FROM CETAB.MAC, HELD IN THE PDP-11 CORE IMAGE
543 !
544 ! IMPLICIT OUTPUTS:
545 !
546 ! NONE
547 !
548 ! ROUTINE VALUE:
549 !
550 ! NONE
551 !
552 ! SIDE EFFECTS
553 !
554 ! MODIFIES THE CORE IMAGE
555 !
556 !--
557
558 BEGIN
559
560 BIND
561 ROUTINE_NAME = UPLIT (%ASCIZ'LOAD_PROCESSES');
562
563 MAP
564 KERNEL_FILE : REF FILE_BLOCK,
565 VALUES : REF VNPVAL_BLOCK;
566
567 LOCAL
568 PROCESS_FLAGS,
569 PDV_POINTER,
570 SLT_POINTER,
571 PDV_COUNT,
572 PDV_ADDR,
573 SLT_ADDR,
574 SLT_COUNT,
575 DLC_INDEX,
576 DDM_INDEX,
577 DDM_PTR : REF DDM_BLOCK,
578 DLC_PTR : REF DLC_BLOCK,
579 DDM_ADDR,
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
580 DLC_ADDR,
581 ASCVAL : VECTOR [CH$ALLOCATION (7)],
582 PD_NSP,
583 PD_NRM;
584
585 !
586 ! SCAN THE PROCESSES, AND LOAD THEM.
587 !
588 PDV_POINTER = GETWRD (.KERNEL_FILE, .VALUES [PDVTA]);
589 !
590 ! FIRST LOAD THE DLC AND DDM FOR EACH SYSTEM LINE
591 !
592 SLT_POINTER = GETWRD (.KERNEL_FILE, .VALUES [SLTTA]);
593 SLT_COUNT = GETWRD (.KERNEL_FILE, .VALUES [SLTNM]);
594
595 INCR SLT_NUMBER FROM 0 TO .SLT_COUNT - 1 DO
596 BEGIN
597 SLT_ADDR = .SLT_POINTER + (.VALUES [L_LEN]*.SLT_NUMBER);
598 !
599 ! LOAD EACH LINE WHICH IS "MARKED FOR LOAD".
600 !
601
602 IF ((GETWRD (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_FLG]) AND .VALUES [LF_MFL]) NEQ 0)
603 THEN
604 BEGIN
605 !
606 ! GET POINTERS TO THE DDM AND DLC BLOCKS
607 !
608 DLC_INDEX = GETBYT (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_DLC]);
609 DDM_INDEX = GETBYT (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_DDM]);
610 DLC_ADDR = GETWRD (.KERNEL_FILE, .PDV_POINTER + .DLC_INDEX);
611 DDM_ADDR = GETWRD (.KERNEL_FILE, .PDV_POINTER + .DDM_INDEX);
612 R50TOA ((GETWRD (.KERNEL_FILE, .DDM_ADDR + .VALUES [Z_NAM])^16), ASCVAL);
613 DDM_PTR = FND_CHAIN (.VALUES [DDM_CHAIN], SEL_DDM, ASCVAL);
614 R50TOA ((GETWRD (.KERNEL_FILE, .DLC_ADDR + .VALUES [Z_NAM])^16), ASCVAL);
615 DLC_PTR = FND_CHAIN (.VALUES [DLC_CHAIN], SEL_DLC, ASCVAL);
616 !
617 ! IF THE DLC AND THE DDM ARE THE SAME (A COMBINED DLC/DDM)
618 ! DON'T DO ANY DLC PROCESSING.
619 !
620
621 IF (.DLC_INDEX NEQ .DDM_INDEX)
622 THEN
623 LD_DLC (.KERNEL_FILE, .FILE_CHAN, .GEN_PCB, .DLC_ADDR,
624 .SLT_ADDR, .DDM_PTR, .DLC_PTR, .VALUES);
625
626 !
627 ! NOW LOAD THE LINE'S DDM
628 !
629 LD_DDM (.KERNEL_FILE, .FILE_CHAN, .GEN_PCB, .DDM_ADDR, .SLT_ADDR, .DDM_PTR, .DLC_PTR, .VALUES);
630 !
631 ! NOW AFTER LOADING THE DDM WE CAN MARK THE SLT ENTRY APPROPRIATELY
632 !
633 PUTWRD (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_FLG], !
634 GETWRD (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_FLG]) !
635 OR .VALUES [LF_ENA] OR .VALUES [LF_RDY] OR .VALUES [LF_ACT]);
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
636
637 IF (.DLC_INDEX EQL .DDM_INDEX)
638 THEN
639 PUTWRD (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_DLS],
640 GETWRD (.KERNEL_FILE, .SLT_ADDR + .VALUES [L_DDS]));
641
642 END; !OF "MARKED FOR LOAD"
643
644 END; !OF CHECKING EACH SYSTEM LINE
645
646 !
647 ! FINALLY, WE LOAD ALL THE MARKED LLC'S.
648 !
649 PDV_COUNT = GETWRD (.KERNEL_FILE, .VALUES [PDVNM]);
650 PD_NSP = 0;
651 PD_NRM = 0;
652
653 INCR COUNTER FROM 0 TO .PDV_COUNT - 1 DO
654 BEGIN
655 PDV_ADDR = GETWRD (.KERNEL_FILE, .PDV_POINTER + (.COUNTER*2));
656 !
657 ! CHECK FOR "MARK FOR LOAD"
658 !
659 PROCESS_FLAGS = GETBYT (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_FLG]);
660
661 IF (((.PROCESS_FLAGS AND .VALUES [ZF_MFL]) NEQ 0) AND (GETWRD (.KERNEL_FILE,
662 .PDV_ADDR + .VALUES [Z_PCB]) EQL 0) AND ((.PROCESS_FLAGS AND .VALUES [ZF_LLC]) NEQ 0))
663 THEN
664 LD_LLC (.KERNEL_FILE, .FILE_CHAN, .GEN_PCB, .PDV_ADDR, .VALUES);
665
666 !
667 ! REMEMBER THE NSP PDV ADDRESS
668 !
669 R50TOA ((GETWRD (.KERNEL_FILE, .PDV_ADDR + .VALUES [Z_NAM])^16), ASCVAL);
670
671 IF (CH$EQL (3, CH$PTR (ASCVAL), 3, CH$PTR (UPLIT (%ASCIZ'NSP')))) THEN PD_NSP = .COUNTER*2;
672
673 !
674 ! REMEMBER THE NRM PDV ADDRESS
675 !
676
677 IF (CH$EQL (3, CH$PTR (ASCVAL), 3, CH$PTR (UPLIT (%ASCIZ'NRM')))) THEN PD_NRM = .COUNTER*2;
678
679 END;
680
681 !
682 ! NOW FIXUP THE LLC REVERSE MAPPING TABLE BECAUSE OF A BUG IN MACY11
683 !
684 FIX_LLC (.KERNEL_FILE, .VALUES);
685 !
686 ! ENABLE ALL READY LINES AND SETUP THE PASSWORD DATA BASE
687 !
688 ENA_LINES (.KERNEL_FILE, .PD_NSP, .PD_NRM, .VALUES);
689 SET_PASWRDS (.KERNEL_FILE, .PD_NSP, .VALUES);
690 END; !OF LOADP
691
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
692 ROUTINE SEL_DLC (DLC_PTR, ASCVAL) = !SELECT AN DLC BLOCK
693
694 !++
695 ! FUNCTIONAL DESCRIPTION:
696 !
697 ! SELECT THE DLC BLOCK WHICH CORRESPONDS TO THE
698 ! FILE NAME
699 !
700 ! FORMAL PARAMETERS:
701 !
702 ! DLC_PTR - POINTER TO THE DLC BLOCK TO BE TESTED
703 ! ASCVAL - 3-CHARACTER ASCII NAME OF DLC
704 !
705 ! IMPLICIT INPUTS:
706 !
707 ! NONE
708 !
709 ! IMPLICIT OUTPUTS:
710 !
711 ! NONE
712 !
713 ! ROUTINE VALUE:
714 !
715 ! 0 = NOT SUITABLE, OTHERWISE A POINTER TO THE DLC BLOCK
716 !
717 ! SIDE EFFECTS
718 !
719 ! NONE
720 !
721 !--
722
723 BEGIN
724
725 BIND
726 ROUTINE_NAME = UPLIT (%ASCIZ'SEL_DLC');
727
728 MAP
729 DLC_PTR : REF DLC_BLOCK,
730 ASCVAL : REF VECTOR [CH$ALLOCATION (7)];
731
732 LOCAL
733 NUM_OF_CHARS;
734
735 NUM_OF_CHARS = (IF (CH$EQL (1, CH$PTR (ASCVAL [0], 2), 1, CH$PTR (UPLIT (%ASCIZ' ')))) THEN 2 ELSE 3);
736
737 IF (CH$EQL (.NUM_OF_CHARS, CH$PTR (ASCVAL [0]), .NUM_OF_CHARS, CH$PTR (DLC_PTR [DLC_NAME])))
738 THEN
739 .DLC_PTR
740 ELSE
741 0
742
743 END; !OF SEL_DLC
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
744 ROUTINE SEL_DDM (DDM_PTR, ASCVAL) = !SELECT AN DDM BLOCK
745
746 !++
747 ! FUNCTIONAL DESCRIPTION:
748 !
749 ! SELECT THE DDM BLOCK WHICH CORRESPONDS TO THE
750 ! FILE NAME
751 !
752 ! FORMAL PARAMETERS:
753 !
754 ! DDM_PTR - POINTER TO THE DDM BLOCK TO BE TESTED
755 ! ASCVAL - 3-CHARACTER ASCII NAME OF DDM
756 !
757 ! IMPLICIT INPUTS:
758 !
759 ! NONE
760 !
761 ! IMPLICIT OUTPUTS:
762 !
763 ! NONE
764 !
765 ! ROUTINE VALUE:
766 !
767 ! 0 = NOT SUITABLE, OTHERWISE A POINTER TO THE DDM BLOCK
768 !
769 ! SIDE EFFECTS
770 !
771 ! NONE
772 !
773 !--
774
775 BEGIN
776
777 BIND
778 ROUTINE_NAME = UPLIT (%ASCIZ'SEL_DDM');
779
780 MAP
781 DDM_PTR : REF DDM_BLOCK,
782 ASCVAL : REF VECTOR [CH$ALLOCATION (7)];
783
784 LOCAL
785 NUM_OF_CHARS;
786
787 NUM_OF_CHARS = (IF (CH$EQL (1, CH$PTR (ASCVAL [0], 2), 1, CH$PTR (UPLIT (%ASCIZ' ')))) THEN 2 ELSE 3);
788
789 IF (CH$EQL (.NUM_OF_CHARS, CH$PTR (ASCVAL [0]), .NUM_OF_CHARS, CH$PTR (DDM_PTR [DDM_NAME])))
790 THEN
791 .DDM_PTR
792 ELSE
793 0
794
795 END; !OF SEL_DDM
796 END
797
798 ELUDOM
799 ! Local Modes:
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
800 ! Comment Column:36
801 ! Comment Start:!
802 ! Mode:Fundamental
803 ! Auto Save Mode:2
804 ! End:
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
ALOCB 144 324
ALOC_POOL 90 439*
AMOUNT 439 486
ASCVAL 581 612 613 614 615 669 671
677 692 730 735 737 744 782
787 789
BACKSL 197 208# 215# 219 224
CB_CCB 325
CB_RDB 388
CCBLH 397
CCBNM 322
CCBRT 424
CCBSZ 294
CCB_ADDR 278 324# 325 326 327 377# 378
382 383 384 385 386 387 388
389 390
CCB_COUNT 284 320# 322 328#
CCB_SIZE 287 294# 324
CEAVL 425
CEX_PCB_ADDR 423
CONVERTED_NAME 196 204 212 224 225
COUNTER 653 655 671 677
CTCMP 426
C_BID 325 388
C_BUF1 382 383
C_BUF2 385 386
C_CNT1 384
C_CNT2 387
C_POINTER 210 212 215
DDENB 427
DDM_ADDR 579 611# 612 629
DDM_BLOCK 577 781
DDM_CHAIN 613
DDM_INDEX 576 609# 611 621 637
DDM_NAME 789
DDM_PTR 577 613# 624 629 744 781 789
791
DLC_ADDR 580 610# 614 623
DLC_BLOCK 578 729
DLC_CHAIN 615
DLC_INDEX 575 608# 610 621 637
DLC_NAME 737
DLC_PTR 578 615# 624 629 692 729 737
739
ENA_LINES 146 688
ERR 153 225
ERRMSG 137 501 516
ERROR 136 221 411
FILE_BLOCK 193 271 564
FILE_CHAN 524 623 629 664
FILE_HWM 306
FILE_NAME 224
FILE_PTR 153 193 224 225
FIX_LLC 148 684
FND_CHAIN 139 613 615
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
FUDGE 309
GEN_PCB 231 313 524 623 629 664
GETBYT 140 608 609 659
GETWRD 141 378 588 592 593 602 610
611 612 614 634 640 649 655
661 669
HOW 439 491
INTSX 428
KERNEL_FILE 231 271 306 313 324 325 326
354 355 378 382 383 384 385
386 387 388 389 397 398 399
400 404 405 406 422 423 424
425 426 427 428 429 430 431
432 524 564 588 592 593 602
608 609 610 611 612 614 623
629 633 634 639 640 649 655
659 661 664 669 684 688 689
LAST_CCB 281 319# 326 327# 377 378# 397
LAST_RDB 283 367# 389 390# 398
LAST_SDB 282 343# 351 354 355 358# 399
400
LD_DDM 150 629
LD_DLC 151 623
LD_LLC 149 664
LEN 153 224
LF_ACT 635
LF_ENA 635
LF_MFL 602
LF_RDY 635
LLCRS 429
LOADP 91 524*
L_DDM 609
L_DDS 640
L_DLC 608
L_DLS 639
L_FLG 602 633 634
L_LEN 597
MVFBF 430
MVTBF 431
M_PCB 145 313
M_POOL 89 231*
NTLPT 404
NUM_OF_CHARS 733 735# 737 785 787# 789
OUTNUM 135
OUTPUT 132
OUTSTR 134
PCOR1A 9#
PCRLF 133
PDDSP 432
PDVNM 649
PDVTA 588
PDV_ADDR 572 655# 659 662 664 669
PDV_COUNT 571 649# 653
PDV_POINTER 569 588# 610 611 655
PD_NRM 583 651# 677# 688
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
PD_NSP 582 650# 671# 688 689
POOL_ALLOC 339 497 499 502 504 514 517
POOL_ALOC 277 334# 339 348 349# 372 373#
411
POOL_BASE 306 313 314 334 404 405 406
411 417 422 423 424 425 426
427 428 429 430 431 432
POOL_BOTTOM 417 499 502 511 512 514 517
POOL_PCB 275 313# 422 436
POOL_SIZE 276 307# 314 334 411
PROCESS_FLAGS 568 659# 661 662
PS_COM 315
PS_NSF 315
PS_SYS 315
PUTBYT 142 325 388
PUTWRD 143 326 354 355 382 383 384
385 386 387 389 397 398 399
400 404 405 406 422 423 424
425 426 427 428 429 430 431
432 633 639
QBIAS 405
QSTRT 406
R50TOA 131* 612 614 669
RDBLH 398
RDBNM 307 322 334 370
RDBSZ 295
RDB_ADDR 279 372# 382 383 385 386
RDB_COUNT 285 368# 370 391#
RDB_SIZE 288 295# 307 334 373 384 387
REAL_AMOUNT 480 486# 497 512
REASON 439 501 516
RESULT 198 200# 225# 228 481 504# 511#
521
ROUTINE_NAME 190# 268# 474# 501 516 561# 726#
778#
SDBLH 399 400
SDBNM 308 335 346
SDBSZ 296
SDB_ADDR 280 348# 354 355 358
SDB_COUNT 286 344# 346 359#
SDB_SIZE 289 296# 308 335 349
SEL_DDM 93# 613 744*
SEL_DLC 92 615 692*
SET_PASWRDS 147 689
SLTNM 593
SLTTA 592
SLT_ADDR 573 597# 602 608 609 624 629
633 634 639 640
SLT_COUNT 574 593# 595
SLT_NUMBER 595 597
SLT_POINTER 570 592# 597
SYMBOL_NAME 153 204
SYM_VAL 138 225
VALUES 231 272 294 295 296 306# 307
308 309 313 314 315 322 324
DSK:PCOR1A.XRF[4,31] 31-Aug-79 14:52
325 334 335 339# 346 370 382
383 384 385 386 387 388 397
398 399 400 404 405 406 411
417# 422 423 424 425 426 427
428 429 430 431 432 439 477
497# 499 502 504 511 512# 514
517 524 565 588 592 593 597
602 608 609 612 613 614 615
624 629 633 634 635 639 640
649 659 661 662 664 669 684
688 689
VNPVAL_BLOCK 272 477 565
VRBL_SYM 88 153*
ZF_LLC 662
ZF_MFL 661
Z_FLG 659
Z_NAM 612 614 669
Z_PCB 662
$CXPCB 423
$CXSYM 424 425 426 427 428 429 430
431 432
$NTPCB 422