COMPILATION LISTING OF SEGMENT datmk_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1635.9 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* DATMK_ - Data Segment Grower for Multics. 12* 6/22/68 - Noel I. Morris */ 13 /* 29 May 69 - James D. Mills */ 14 /* 20 Oct 70 - Barry L. Wolman (areas on mod 8 boundary) */ 15 /* 16 Oct 1972 - Melanie B. Weaver (broke into 2 pieces; converted t0 v2pl1) */ 16 17 18 /* 19* 20*Calling Sequence: 21* call datmk_ (arg_list_ptr_ptr, mcptr, fault_ptr); 22* 23*Where: 24* arg_list_ptr_ptr = pointer to EPL or PL/1 -compiled argument list. 25* mcptr = pointer to machine conditions. 26* fault_ptr = pointer to linkage fault-pair. 27* 28*The EPL-compiled argument list appears as follows: 29* dec n number of words to grow data segment 30* dec x x = 0, 1, or 2 31* ... 32* 33* If "x" = 0, no initialization is to be done. 34* If "x" = 1, the third location points to the initialization procedure. 35* If "x" = 2, the third location is the first location of 36* the initialization procedure. 37* 38* 39*The PL/1-compiled argument list appears as follows: 40* dec n number of words to grow data segment 41* dec x x = 0, 3, or 4 42* ... 43* 44* If "x" = 0, no initialization is to be done. 45* If "x" = 3, the third location is the first of n words which must 46* be copied into the newly-grown space to initialize it. 47* If "x" = 4, the newly-grown space must be initialized as an area. 48* There is no third argument. 49* 50* */ 51 52 datmk_: proc (arg_list_ptr_ptr, mcptr, fault_ptr); 53 54 dcl (arg_list_ptr_ptr, /* argument list pointer */ 55 mcptr, /* pointer to machine conditions */ 56 fault_ptr) ptr; /* pointer to linkage fault-pair */ 57 58 dcl seg_ptr ptr, /* pointer to segment name */ 59 def_ptr ptr, /* pointer to definition section */ 60 seg char (32), /* segment name */ 61 rcode fixed bin(35), /* error code */ 62 lseg fixed bin (9), /* length of segment name */ 63 type_pair_ptr ptr, /* pointer to type-pair block */ 64 data_ptr ptr, /* pointer to the grown data */ 65 based_ptr ptr based ; /* pointer to pointer */ 66 67 68 dcl (addr, addrel, bin, fixed, null, substr) builtin; 69 70 dcl hcs_$fs_get_seg_ptr ext entry(char(*), ptr, fixed bin(35)); 71 dcl hcs_$rest_of_datmk_ ext entry(ptr, ptr, fixed bin(35)); /* does actual initialization */ 72 dcl hcs_$make_seg ext entry(char(*), char(*), char(*), fixed bin(5), ptr, fixed bin(35)); 73 dcl hcs_$link_force ext entry(ptr, fixed bin(17), fixed bin(35)); 74 75 76 dcl 1 datmk_info aligned, /* contains info for rest_of_datmk_ */ 1 1 1 2 /* BEGIN INCLUDE FILE ... datmk_info.incl.pl1 */ 1 3 /* created on 18 October 1972 by M. Weaver */ 1 4 1 5 2 arg_list_ptr ptr, /* ptr to datmk_ "argument list" */ 1 6 2 text_ptr ptr, /* ptr to data segment to be grown */ 1 7 2 sym_ptr ptr, /* ptr to ext symbol name which is to be added */ 1 8 2 segname char(32) var; /* seg name of data segment */ 1 9 1 10 /* END INCLUDE FILE ... datmk_info.incl.pl1 */ 77 78 79 /* */ 80 2 1 /* BEGIN INCLUDE FILE linkdcl.incl.pl1 --- last modified 15 Nov 1971 by C Garman */ 2 2 2 3 /* Last Modified (Date and Reason): 2 4* 6/75 by M.Weaver to add virgin_linkage_header declaration 2 5* 6/75 by S.Webber to comment existing structures better 2 6* 9/77 by M. Weaver to add run_depth to link 2 7**/ 2 8 2 9 dcl 1 link based aligned, /* link pair in linkage section */ 2 10 2 head_ptr bit (18) unal, /* rel pointer to beginning of linkage section */ 2 11 2 ringno bit (3) unal, 2 12 2 mbz bit (3) unal, 2 13 2 run_depth fixed bin (5) unal, /* run unit depth, filled when link is snapped */ 2 14 2 ft2 bit (6) unal, /* fault tag. 46(8) if not snapped, 43(8) if snapped */ 2 15 2 16 2 exp_ptr bit (18) unal, /* pointer (rel to defs) of expression word */ 2 17 2 mbz2 bit (12) unal, 2 18 2 modifier bit (6) unal; /* modifier to be left in snapped link */ 2 19 2 20 dcl 1 exp_word based aligned, /* expression word in link definition */ 2 21 2 type_ptr bit (18) unal, /* pointer (rel to defs) of type pair structure */ 2 22 2 exp bit (18) unal; /* constant expression to be added in when snapping link */ 2 23 2 24 dcl 1 type_pair based aligned, /* type pair in link definition */ 2 25 2 type bit (18) unal, /* type of link. may be 1,2,3,4,5, or 6 */ 2 26 2 trap_ptr bit (18) unal, /* pointer (rel to defs) to the trap word */ 2 27 2 seg_ptr bit (18) unal, /* pointer to ACC reference name for segment referenced */ 2 28 2 ext_ptr bit (18) unal; /* pointer (rel to defs) of ACC segdef name */ 2 29 2 30 dcl 1 header based aligned, /* linkage block header */ 2 31 2 def_ptr ptr, /* pointer to definition section */ 2 32 2 symbol_ptr ptr unal, /* pointer to symbol section in object segment */ 2 33 2 original_linkage_ptr ptr unal, /* pointer to linkage section in object segment */ 2 34 2 unused bit (72), 2 35 2 stats, 2 36 3 begin_links bit (18) unal, /* offset (rel to this section) of first link */ 2 37 3 block_length bit (18) unal, /* number of words in this linkage section */ 2 38 3 segment_number bit (18) unal, /* text segment number associated with this section */ 2 39 3 static_length bit (18) unal; /* number of words of static for this segment */ 2 40 2 41 dcl 1 virgin_linkage_header aligned based, /* template for linkage header in object segment */ 2 42 2 pad bit (30) unaligned, /* is filled in by linker */ 2 43 2 defs_in_link bit (6) unaligned, /* =o20 if defs in linkage (nonstandard) */ 2 44 2 def_offset bit (18) unaligned, /* offset of definition section */ 2 45 2 first_ref_relp bit (18) unaligned, /* offset of trap-at-first-reference offset array */ 2 46 2 filled_in_later bit (144), 2 47 2 link_begin bit (18) unaligned, /* offset of first link */ 2 48 2 linkage_section_lng bit (18) unaligned, /* length of linkage section */ 2 49 2 segno_pad bit (18) unaligned, /* will be segment number of copied linkage */ 2 50 2 static_length bit (18) unaligned; /* length of static section */ 2 51 2 52 2 53 dcl 1 trap_word based aligned, /* trap word in link definition */ 2 54 2 call_ptr bit (18) unal, /* pointer (rel to link) of link to trap procedure */ 2 55 2 arg_ptr bit (18) unal; /* pointer (rel to link) of link to arg info for trap proc */ 2 56 2 57 dcl 1 name based aligned, /* storage of ASCII names in definitions */ 2 58 2 nchars bit (9) unaligned, /* number of characters in name */ 2 59 2 char_string char (31) unaligned; /* 31-character name */ 2 60 2 61 /* END INCLUDE FILE linkdcl.incl.pl1 */ 81 82 83 /* */ 84 85 /* Step 1. 86* Assume definition does not exist. Extract the segment name and 87* symbol from the fault pair information. 88* 89* */ 90 91 def_ptr = addrel (fault_ptr, fault_ptr -> link.head_ptr) -> header.def_ptr; 92 /* Get linkage definitions pointer. */ 93 type_pair_ptr = addrel (def_ptr, addrel (def_ptr, fault_ptr -> link.exp_ptr) -> exp_word.type_ptr); 94 /* Generate pointer to type-pair block. */ 95 if fixed (type_pair_ptr -> type_pair.type, 18) ^= 4 then go to type_error; 96 /* Must be a type 4 link. */ 97 98 seg_ptr = addrel (def_ptr, type_pair_ptr -> type_pair.seg_ptr); 99 /* Generate pointer to segment name. */ 100 lseg = bin(seg_ptr -> name.nchars, 9); /* Get length of name. */ 101 seg = substr (seg_ptr -> name.char_string, 1, lseg); 102 /* Make a copy of the segment name. */ 103 sym_ptr = addrel (def_ptr, type_pair_ptr -> type_pair.ext_ptr); 104 /* Generate pointer to symbol name. */ 105 106 107 /* Step 2. 108* Get a pointer to the data segment, try to snap the link and return. 109* If this fails, call hcs_$rest_of_datmk_, which gets a pointer to 110* the linkage section, determines the value of the new def, and 111* initializes the new item, if requested. 112* if the data or linkage segments do not exist, they are created 113* and initialized. 114* 115* */ 116 117 /* Extract caller pointer to SCU data. */ 118 119 call hcs_$fs_get_seg_ptr ( seg, text_ptr, rcode);/* Get a pointer to text segment. */ 120 if text_ptr = null then do; /* If text segment not found ... */ 121 call hcs_$make_seg ("", "", seg, 01011b, text_ptr, rcode); 122 /* Create the text segment. */ 123 if text_ptr = null then go to text_error; /* Check for error in creating text segment. */ 124 end; 125 126 else do; /* Check for existing segment */ 127 call hcs_$link_force (fault_ptr, 0, rcode); 128 /* Try to force the link */ 129 if rcode = 0 then return; /* If successful, the definition exists. Return. */ 130 end; 131 132 /* fill in structure for rest_of_datmk_ */ 133 134 segname = substr(seg_ptr -> name.char_string, 1, lseg); 135 call hcs_$link_force(arg_list_ptr_ptr, 0, rcode); /* get ptr to argument list */ 136 arg_list_ptr = arg_list_ptr_ptr -> based_ptr; 137 138 call hcs_$rest_of_datmk_(addr(datmk_info), data_ptr, rcode); 139 /* let subroutine grow and initialize segment */ 140 141 if rcode ^= 0 then return; 142 143 /* now we have everything set up and can snap the link */ 144 145 call hcs_$link_force(fault_ptr, 0, rcode); 146 147 type_error: 148 text_error: 149 return; 150 151 /* If original link couldn't be snapped for some reason, 152* we return anyway. datmk_'s "caller" should check to see if the link was 153* snapped, and if not, print linkage error message. */ 154 155 end datmk_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1611.9 datmk_.pl1 >dumps>old>recomp>datmk_.pl1 77 1 05/06/74 1741.1 datmk_info.incl.pl1 >ldd>include>datmk_info.incl.pl1 81 2 10/13/77 1545.6 linkdcl.incl.pl1 >ldd>include>linkdcl.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. addr builtin function dcl 68 ref 138 138 addrel builtin function dcl 68 ref 91 93 93 98 103 arg_list_ptr 000122 automatic pointer level 2 dcl 76 set ref 136* arg_list_ptr_ptr parameter pointer dcl 54 set ref 52 135* 136 based_ptr based pointer dcl 58 ref 136 bin builtin function dcl 68 ref 100 char_string 0(09) based char(31) level 2 packed unaligned dcl 2-57 ref 101 134 data_ptr 000120 automatic pointer dcl 58 set ref 138* datmk_info 000122 automatic structure level 1 dcl 76 set ref 138 138 def_ptr based pointer level 2 in structure "header" dcl 2-30 in procedure "datmk_" ref 91 def_ptr 000102 automatic pointer dcl 58 in procedure "datmk_" set ref 91* 93 93 98 103 exp_ptr 1 based bit(18) level 2 packed unaligned dcl 2-9 ref 93 exp_word based structure level 1 dcl 2-20 ext_ptr 1(18) based bit(18) level 2 packed unaligned dcl 2-24 ref 103 fault_ptr parameter pointer dcl 54 set ref 52 91 91 93 127* 145* fixed builtin function dcl 68 ref 95 hcs_$fs_get_seg_ptr 000010 constant entry external dcl 70 ref 119 hcs_$link_force 000016 constant entry external dcl 73 ref 127 135 145 hcs_$make_seg 000014 constant entry external dcl 72 ref 121 hcs_$rest_of_datmk_ 000012 constant entry external dcl 71 ref 138 head_ptr based bit(18) level 2 packed unaligned dcl 2-9 ref 91 header based structure level 1 dcl 2-30 link based structure level 1 dcl 2-9 lseg 000115 automatic fixed bin(9,0) dcl 58 set ref 100* 101 134 mcptr parameter pointer dcl 54 ref 52 name based structure level 1 dcl 2-57 nchars based bit(9) level 2 packed unaligned dcl 2-57 ref 100 null builtin function dcl 68 ref 120 123 rcode 000114 automatic fixed bin(35,0) dcl 58 set ref 119* 121* 127* 129 135* 138* 141 145* seg 000104 automatic char(32) unaligned dcl 58 set ref 101* 119* 121* seg_ptr 1 based bit(18) level 2 in structure "type_pair" packed unaligned dcl 2-24 in procedure "datmk_" ref 98 seg_ptr 000100 automatic pointer dcl 58 in procedure "datmk_" set ref 98* 100 101 134 segname 6 000122 automatic varying char(32) level 2 dcl 76 set ref 134* substr builtin function dcl 68 ref 101 134 sym_ptr 4 000122 automatic pointer level 2 dcl 76 set ref 103* text_ptr 2 000122 automatic pointer level 2 dcl 76 set ref 119* 120 121* 123 type based bit(18) level 2 packed unaligned dcl 2-24 ref 95 type_pair based structure level 1 dcl 2-24 type_pair_ptr 000116 automatic pointer dcl 58 set ref 93* 95 98 103 type_ptr based bit(18) level 2 packed unaligned dcl 2-20 ref 93 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. trap_word based structure level 1 dcl 2-53 virgin_linkage_header based structure level 1 dcl 2-41 NAMES DECLARED BY EXPLICIT CONTEXT. datmk_ 000014 constant entry external dcl 52 text_error 000264 constant label dcl 147 ref 123 type_error 000264 constant label dcl 147 ref 95 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 344 364 265 354 Length 560 265 20 157 57 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME datmk_ 142 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME datmk_ 000100 seg_ptr datmk_ 000102 def_ptr datmk_ 000104 seg datmk_ 000114 rcode datmk_ 000115 lseg datmk_ 000116 type_pair_ptr datmk_ 000120 data_ptr datmk_ 000122 datmk_info datmk_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. hcs_$fs_get_seg_ptr hcs_$link_force hcs_$make_seg hcs_$rest_of_datmk_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 52 000010 91 000021 93 000031 95 000043 98 000047 100 000054 101 000057 103 000062 119 000067 120 000107 121 000113 123 000151 124 000155 127 000156 129 000173 134 000175 135 000206 136 000223 138 000230 141 000245 145 000247 147 000264 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved