1
2
3
4
5
6
7
8
9
10
11
12
13 initialize_kst: proc ();
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 % include kst;
33 % include slt;
34
35 dcl (baseno, addr, fixed, string) builtin;
36
37
38 dcl first_time bit (1),
39 this_is_initializer bit (1),
40 highseg fixed bin,
41 i fixed bin;
42
43 dcl kst_seg$ ext,
44 slt$ ext,
45 pds$max_lot_size (0:7) fixed bin ext,
46 pds$processid bit (36) aligned ext,
47 tc_data$initializer_id bit (36) aligned ext,
48
49 dseg$ (0: 1) fixed bin (71) ext,
50 active_all_rings_data$stack_base_segno fixed bin (18) ext,
51 (active_all_rings_data$hcscnt, active_all_rings_data$max_segno) ext fixed bin (17),
52 pds$ fixed bin ext;
53
54 ^L
55 kstp = addr (kst_seg$);
56 this_is_initializer = (pds$processid = tc_data$initializer_id);
57
58 if this_is_initializer then
59 if kst.lowseg ^= 0 then
60 first_time = "0"b;
61 else first_time = "1"b;
62
63 if this_is_initializer & first_time then do;
64 highseg = addr (slt$) -> slt.first_init_seg - 1;
65 kst.allow_256K_connect = "1"b;
66 end;
67 else highseg = active_all_rings_data$max_segno;
68
69 if this_is_initializer & ^first_time then do;
70 kst.highseg = highseg;
71 pds$max_lot_size (*) = highseg + 1;
72 return;
73 end;
74
75 pds$kstp = kstp;
76 if string (kst.prelinked_ring) = "0"b
77 then do;
78 kst.lowseg = active_all_rings_data$hcscnt;
79 if kst.highseg = 0 then kst.highseg = highseg;
80 kst.highest_used_segno = kst.lowseg + 7;
81 kst.free_list = "0"b;
82
83 do i = kst.lowseg to kst.lowseg + 7;
84 kst.kst_entry (i).fp = (18)"1"b;
85 kst.kst_entry (i).segno = i;
86 end;
87 end;
88
89 return;
90
91
92
93 end initialize_kst;