COMPILATION LISTING OF SEGMENT translator_temp_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1807.3 mst Thu Options: optimize map 1 /* *************************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 4* * * 5* * Copyright (c) 1975 by Massachusetts Institute of Technology * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *************************************************************** */ 11 12 13 14 15 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 16 /* */ 17 /* N__a_m_e: translator_temp_ */ 18 /* */ 19 /* This subroutine performs very fast, no_freeing-style storage allocations */ 20 /* (similar to those of alloc_ in a no-freeing area). Its advantage over alloc_ or the */ 21 /* PL/I allocate operator is that it has an associated include file containing an */ 22 /* allocation procedure which is quicker to execute that a PL/I allocate statement. */ 23 /* */ 24 /* Historically, this routine was written before the PL/I allocate operator */ 25 /* existed (ie, all PL/I allocate statements were implemented as subroutine calls to the */ 26 /* external alloc_ subroutine), and before no-freeing areas were known to alloc_. Given */ 27 /* that several programs use it, we must continue to support it. */ 28 /* */ 29 /* S__t_a_t_u_s */ 30 /* */ 31 /* 0) Created by: G. C. Dixon in January, 1975 */ 32 /* 1) Modified by: G. C. Dixon in February, 1981 - use get_temp_segment_ to obtain */ 33 /* temporary segments, rather than teco's get_temp_seg_ subroutine. */ 34 /* */ 35 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 36 37 38 translator_temp_: 39 procedure; 40 41 dcl program_id char(*) aligned, /* Name of program wanting temporary segs. (In) */ 42 APseg ptr, /* ptr to the temporary segment. (In/Out) */ 43 code fixed bin(35), /* a status code. (Out) */ 44 APold_seg ptr, /* ptr to a previously-obtained temp seg. (In) */ 45 Nwords fixed bin; /* number of words to be allocated from temp seg. */ 46 /* (In) */ 47 48 dcl Pnext_seg ptr, /* temp pointers. */ 49 Pprev_seg ptr, 50 Pseg ptr; 51 52 dcl /* based variables */ 53 1 seg aligned based (Pseg), 54 /* header of the temporary segment. */ 55 2 Pfirst_temp_seg ptr unal, /* ptr to first temp seg of a group. */ 56 2 Ofree fixed bin(35), /* offset of next free word in temp seg. */ 57 2 Lfree fixed bin(35), /* length of remaining free space in temp seg. */ 58 2 Pprev_temp_seg ptr unal, /* ptr to immediately previous temp seg of group*/ 59 2 Pnext_temp_seg ptr unal, /* ptr to next temp seg of group. */ 60 2 pad1 (3) fixed bin(35), 61 2 seg_type char(16), /* set to "translator_temp_" for dumping id. */ 62 2 pad2 (4) fixed bin(35), 63 2 program_id char(32); /* program name to be passed to */ 64 /* release_temp_segment_. */ 65 66 dcl (null, size) builtin; 67 68 dcl /* entries */ 69 get_temp_segment_ entry (char(*) aligned, ptr, fixed bin(35)), 70 release_temp_segment_ entry (char(*) aligned, ptr, fixed bin(35)); 71 72 dcl /* static variables */ 73 sys_info$max_seg_size fixed bin(35) ext static; 74 75 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 76 77 78 get_segment: entry (program_id, APseg, code); /* get ptr to first temporary segment associated */ 79 /* with this invocation of named program. */ 80 81 call get_temp_segment_ (program_id, Pseg, code); 82 if Pseg ^= null then do; /* create a temp seg in process directory. */ 83 seg.Pfirst_temp_seg = Pseg; 84 seg.Ofree = size(seg); 85 seg.Lfree = sys_info$max_seg_size - size(seg); 86 seg.Pprev_temp_seg = null; 87 seg.Pnext_temp_seg = null; 88 seg.pad1(*) = 0; 89 seg.seg_type = "translator_temp_"; 90 seg.pad2(*) = 0; 91 seg.program_id = program_id; 92 end; 93 APseg = Pseg; 94 return; 95 96 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 97 98 99 get_next_segment: 100 entry (APold_seg, APseg, code); /* get subsequent temporary segments associated */ 101 /* with this temp segment group. */ 102 103 do Pseg = APold_seg repeat seg.Pnext_temp_seg /* find last temp seg in chained list. */ 104 while (seg.Pnext_temp_seg ^= null); 105 end; 106 Pprev_seg = Pseg; 107 call get_temp_segment_ (seg.program_id, Pseg, code); 108 if Pseg ^= null then do; 109 seg.Pfirst_temp_seg = Pprev_seg -> seg.Pfirst_temp_seg; 110 seg.Ofree = size(seg); 111 seg.Lfree = sys_info$max_seg_size - size(seg); 112 seg.Pprev_temp_seg = Pprev_seg; 113 seg.Pnext_temp_seg = null; 114 seg.pad1(*) = 0; 115 seg.seg_type = "translator_temp_"; 116 seg.pad2(*) = 0; 117 seg.program_id = Pprev_seg->seg.program_id; 118 Pprev_seg->seg.Pnext_temp_seg = Pseg; 119 end; 120 APseg = Pseg; 121 return; 122 123 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 124 125 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 126 127 128 release_segment: 129 entry (APseg, code); /* release a single one of the temporary segments */ 130 /* associated with this temp seg group. */ 131 132 Pseg = APseg; 133 Pprev_seg = seg.Pprev_temp_seg; /* unchain this temp seg from previous in group. */ 134 if Pprev_seg ^= null then 135 Pprev_seg -> seg.Pnext_temp_seg = seg.Pnext_temp_seg; 136 Pnext_seg = seg.Pnext_temp_seg; /* unchain this temp seg from next in group. */ 137 if Pnext_seg ^= null then 138 Pnext_seg -> seg.Pprev_temp_seg = seg.Pprev_temp_seg; 139 140 call release_temp_segment_ (seg.program_id, APseg, code); 141 if code = 0 then APseg = null; 142 return; 143 144 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 145 146 release_all_segments: 147 entry (APseg, code); /* release all of the temporary segments */ 148 /* associated with this temp seg group. */ 149 150 do Pseg = APseg->seg.Pfirst_temp_seg repeat Pnext_seg 151 while (Pseg ^= null); 152 Pnext_seg = seg.Pnext_temp_seg; 153 call release_temp_segment_ (seg.program_id, Pseg, code); 154 if code ^= 0 then return; 155 end; 156 APseg = null; 157 return; 158 159 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 160 161 162 allocate: entry (APseg, Nwords) returns (ptr); /* allocate space in one of the temp segs. */ 163 164 return (allocate (APseg, Nwords)); 165 1 1 /* BEGINNING OF: translator_temp_alloc.incl.pl1 * * * * * * * * * * * * * * * * */ 1 2 1 3 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 4 /* */ 1 5 /* N__a_m_e: translator_temp_alloc.incl.pl1 */ 1 6 /* */ 1 7 /* This include segment allocates space in a translator's temporary segment. It */ 1 8 /* contains a complete space allocation function 'allocate' which can be a quick PL/I */ 1 9 /* internal procedure in the program which includes this include segment. The temporary */ 1 10 /* segment should be one obtained by using the translator_temp_ subroutine. */ 1 11 /* */ 1 12 /* S__t_a_t_u_s */ 1 13 /* */ 1 14 /* 0) Created by: G. C. Dixon in January, 1975. */ 1 15 /* 1) Modified by: G. C. Dixon in February, 1981 - use limit area structure. */ 1 16 /* */ 1 17 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 1 18 1 19 1 20 1 21 allocate: procedure (Parea, ANwords) returns (ptr); 1 22 1 23 dcl Parea ptr, /* ptr to the temporary segment. (In) */ 1 24 ANwords fixed bin; /* number of words to be allocated. (In) */ 1 25 1 26 dcl Nwords fixed bin, /* number of words to be allocated, rounded up */ 1 27 /* to a 0 mod 2 quantity. */ 1 28 P ptr, /* a temporary pointer. */ 1 29 code fixed bin(35), /* a status code. */ 1 30 (mod, null, ptr) builtin; 1 31 1 32 dcl 1 area based (Parea), 1 33 2 Pfirst_temp_seg ptr unal, /* ptr to first temp seg of a group. */ 1 34 2 Ofree fixed bin(35), /* offset of next free word in temp seg. */ 1 35 2 Lfree fixed bin(35); /* length of remaining free space in temp seg. */ 1 36 1 37 dcl translator_temp_$get_next_segment 1 38 entry (ptr, ptr, fixed bin(35)); 1 39 1 40 Nwords = ANwords + mod (ANwords, 2); /* round up word count to 0 + mod 2 quantity. */ 1 41 if Nwords > Lfree then do; /* handle area overflow. */ 1 42 call translator_temp_$get_next_segment (Parea, P, code); 1 43 if P = null then return (null); 1 44 Parea = P; 1 45 if Nwords > area.Lfree then return (null); 1 46 end; 1 47 P = ptr (Parea, area.Ofree); /* get pointer to next free word of area. */ 1 48 area.Ofree = area.Ofree + Nwords; /* increase offset of remaining free space. */ 1 49 area.Lfree = area.Lfree - Nwords; /* decrease length of remaining free space. */ 1 50 return (P); 1 51 1 52 end allocate; 1 53 1 54 /* END OF: translator_temp_alloc.incl.pl1 * * * * * * * * * * * * * * * * */ 166 167 168 /* * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * * * * * * */ 169 170 end translator_temp_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1625.8 translator_temp_.pl1 >dumps>old>recomp>translator_temp_.pl1 166 1 07/22/81 2045.0 translator_temp_alloc.incl.pl1 >ldd>include>translator_temp_alloc.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. ANwords parameter fixed bin(17,0) dcl 1-23 ref 1-21 1-40 1-40 APold_seg parameter pointer dcl 41 ref 99 103 APseg parameter pointer dcl 41 set ref 78 93* 99 120* 128 132 140* 141* 146 150 156* 162 164* Lfree 2 based fixed bin(35,0) level 2 in structure "seg" dcl 52 in procedure "translator_temp_" set ref 85* 111* Lfree 2 based fixed bin(35,0) level 2 in structure "area" dcl 1-32 in procedure "allocate" set ref 1-41 1-45 1-49* 1-49 Nwords parameter fixed bin(17,0) dcl 41 in procedure "translator_temp_" set ref 162 164* Nwords 000124 automatic fixed bin(17,0) dcl 1-26 in procedure "allocate" set ref 1-40* 1-41 1-45 1-48 1-49 Ofree 1 based fixed bin(35,0) level 2 in structure "seg" dcl 52 in procedure "translator_temp_" set ref 84* 110* Ofree 1 based fixed bin(35,0) level 2 in structure "area" dcl 1-32 in procedure "allocate" set ref 1-47 1-48* 1-48 P 000126 automatic pointer dcl 1-26 set ref 1-42* 1-43 1-44 1-47* 1-50 Parea parameter pointer dcl 1-23 set ref 1-21 1-41 1-42* 1-44* 1-45 1-47 1-47 1-48 1-48 1-49 1-49 Pfirst_temp_seg based pointer level 2 packed unaligned dcl 52 set ref 83* 109* 109 150 Pnext_seg 000100 automatic pointer dcl 48 set ref 136* 137 137 152* 155 Pnext_temp_seg 4 based pointer level 2 packed unaligned dcl 52 set ref 87* 103 105 113* 118* 134* 134 136 152 Pprev_seg 000102 automatic pointer dcl 48 set ref 106* 109 112 117 118 133* 134 134 Pprev_temp_seg 3 based pointer level 2 packed unaligned dcl 52 set ref 86* 112* 133 137* 137 Pseg 000104 automatic pointer dcl 48 set ref 81* 82 83 83 84 84 85 85 86 87 88 89 90 91 93 103* 103* 105 106 107 107* 108 109 110 110 111 111 112 113 114 115 116 117 118 120 132* 133 134 136 137 140 150* 150* 152 153 153* area based structure level 1 unaligned dcl 1-32 code parameter fixed bin(35,0) dcl 41 in procedure "translator_temp_" set ref 78 81* 99 107* 128 140* 141 146 153* 154 code 000130 automatic fixed bin(35,0) dcl 1-26 in procedure "allocate" set ref 1-42* get_temp_segment_ 000010 constant entry external dcl 68 ref 81 107 mod builtin function dcl 1-26 ref 1-40 null builtin function dcl 1-26 in procedure "allocate" ref 1-43 1-43 1-45 null builtin function dcl 66 in procedure "translator_temp_" ref 82 86 87 103 108 113 134 137 141 150 156 pad1 5 based fixed bin(35,0) array level 2 dcl 52 set ref 88* 114* pad2 14 based fixed bin(35,0) array level 2 dcl 52 set ref 90* 116* program_id 20 based char(32) level 2 in structure "seg" dcl 52 in procedure "translator_temp_" set ref 91* 107* 117* 117 140* 153* program_id parameter char dcl 41 in procedure "translator_temp_" set ref 78 81* 91 ptr builtin function dcl 1-26 ref 1-47 release_temp_segment_ 000012 constant entry external dcl 68 ref 140 153 seg based structure level 1 dcl 52 set ref 84 85 110 111 seg_type 10 based char(16) level 2 dcl 52 set ref 89* 115* size builtin function dcl 66 ref 84 85 110 111 sys_info$max_seg_size 000014 external static fixed bin(35,0) dcl 72 ref 85 111 translator_temp_$get_next_segment 000016 constant entry external dcl 1-37 ref 1-42 NAMES DECLARED BY EXPLICIT CONTEXT. allocate 000603 constant entry internal dcl 1-21 in procedure "translator_temp_" ref 164 allocate 000545 constant entry external dcl 162 get_next_segment 000200 constant entry external dcl 99 get_segment 000037 constant entry external dcl 78 release_all_segments 000444 constant entry external dcl 146 release_segment 000347 constant entry external dcl 128 translator_temp_ 000023 constant entry external dcl 38 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1032 1052 702 1042 Length 1254 702 20 166 130 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME translator_temp_ 114 external procedure is an external procedure. allocate internal procedure shares stack frame of external procedure translator_temp_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME translator_temp_ 000100 Pnext_seg translator_temp_ 000102 Pprev_seg translator_temp_ 000104 Pseg translator_temp_ 000124 Nwords allocate 000126 P allocate 000130 code allocate THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return mod_fx1 signal ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_temp_segment_ release_temp_segment_ translator_temp_$get_next_segment THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 38 000022 78 000032 81 000061 82 000103 83 000107 84 000111 85 000113 86 000122 87 000124 88 000125 89 000136 90 000144 91 000155 93 000163 94 000165 99 000174 103 000214 105 000224 106 000227 107 000230 108 000251 109 000255 110 000257 111 000262 112 000271 113 000273 114 000275 115 000306 116 000314 117 000325 118 000331 120 000332 121 000334 128 000343 132 000363 133 000366 134 000370 136 000376 137 000400 140 000406 141 000427 142 000433 146 000442 150 000460 152 000467 153 000472 154 000514 155 000525 156 000530 157 000532 162 000541 164 000556 1 21 000603 1 40 000605 1 41 000613 1 42 000617 1 43 000632 1 44 000642 1 45 000645 1 47 000655 1 48 000664 1 49 000670 1 50 000676 ----------------------------------------------------------- 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