COMPILATION LISTING OF SEGMENT print_bind_map Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1804.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 /* Print Object Map - Command to display the bindmap of a segment bound by the 12* new Binder. 13* Designed and Initially coded by Michael J. Spier, May 3, 1971 14* Modified 01/22/82 by E. N. Kittlitz. added -page_offset */ 15 16 /* format: style4 */ 17 print_bind_map: 18 pbm: 19 procedure; 20 21 22 /* DECLARATION OF EXTERNAL ENTRIES */ 23 24 declare com_err_ external entry options (variable); 25 declare cv_oct_check_ external entry (char (*), fixed bin (35)) returns (fixed bin); 26 declare cv_dec_check_ external entry (char (*), fixed bin (35)) returns (fixed bin); 27 declare cu_$arg_count external entry (fixed bin, fixed bin (35)); 28 declare cu_$arg_ptr external entry (fixed bin, pointer, fixed bin, fixed bin (35)); 29 declare date_time_ external entry (fixed bin (71), char (*)); 30 declare expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 31 declare form_bind_map_ external entry (pointer, fixed bin (35)); 32 declare get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 33 declare hcs_$initiate external entry (char (*), char (*), char (*), fixed bin, fixed bin, ptr, fixed bin (35)); 34 declare ioa_ external entry options (variable); 35 declare iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin (35)); 36 declare iox_$user_output ext ptr; 37 declare hcs_$terminate_noname external entry (ptr, fixed bin (35)); 38 declare pathname_ entry (char(*), char(*)) returns(char(168)); 39 declare release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 40 41 /* DECLARATIONS OF EXTERNAL STATIC VARIABLES */ 42 43 declare ( 44 error_table_$noarg, 45 error_table_$too_many_args 46 ) external fixed bin (35); 47 48 /* DECLARATIONS OF BUILTIN FUNCTIONS */ 49 50 declare (addr, clock, divide, null) builtin; 51 52 /* DECLARATIONS OF CONDITIONS */ 53 54 declare cleanup condition; 55 56 /* DECLARATION OF AUTOMATIC STORAGE VARIABLES */ 57 58 declare (i, nargs, curarg, arg_lng, value) fixed bin; 59 declare code fixed bin (35); 60 declare (p, argp, valptr) pointer; 61 declare ( 62 objname char (32), 63 dirname char (168), 64 pathname char (168) 65 ); 66 declare errname char (16); 67 declare date char (24); 68 declare (have_pathname, name_string, option) bit (1) aligned; 69 70 declare 1 x aligned, 71 2 objp pointer, /* pointer to object segment */ 72 2 listp pointer, /* pointer to list segment */ 73 2 list_bc fixed bin (24), /* list segment bitcount */ 74 2 flags aligned, /* option indicators */ 75 3 pad bit (33) unaligned, /* this field used to be fixed bin */ 76 3 page_offset bit (1) unaligned, /* 1 -> show page number; */ 77 3 no_header bit (1) unaligned, /* 1 -> do not print header */ 78 3 long bit (1) unaligned, /* 1 -> long option; 0 -> short option */ 79 2 nopts fixed bin, /* number of options */ 80 2 op (16) aligned, 81 3 opt_name char (32) aligned, /* name of option component */ 82 3 opt_offset fixed bin, /* offset option */ 83 3 name_sw bit (1) unaligned, /* 0 -> offset; 1 -> segname */ 84 3 found bit (1) unaligned; /* preset to 0 */ 85 86 87 /* DECLARATION OF BASED STRUCTURES */ 88 89 declare argname char (arg_lng) unaligned based (argp); 90 declare 1 b0 aligned based (valptr), 91 2 dum char (3) unaligned, 92 2 valchar char (1) unaligned; 93 94 95 96 /* */ 97 98 errname = "print_bind_map"; 99 100 start: 101 valptr = addr (value); 102 objp, listp = null; 103 104 on cleanup call clean_up; 105 106 list_bc, value, nopts = 0; 107 108 page_offset, long, no_header, name_string, have_pathname, option = "0"b; 109 pathname = ""; 110 111 call cu_$arg_count (nargs, code); 112 if code ^= 0 then do; 113 call com_err_ (code, errname); 114 return; 115 end; 116 if nargs = 0 then do; /* must have at least bound_name */ 117 give_usage: 118 call com_err_ (0, errname, "Usage: print_bind_map pathname {-control_args}"); 119 return; 120 end; 121 122 do curarg = 1 to nargs; 123 call cu_$arg_ptr (curarg, argp, arg_lng, code); 124 if code ^= 0 then do; 125 call com_err_ (code, errname); 126 return; 127 end; 128 if name_string then 129 go to name_arg; /* if this follows -name */ 130 else if char (argname, 1) ^= "-" then do; 131 if ^have_pathname then do; /* must be the bound object name */ 132 call expand_pathname_ (argname, dirname, objname, code); 133 if code ^= 0 then do; 134 call com_err_ (code, errname, argname); 135 goto return; 136 end; 137 pathname = pathname_ (dirname, objname); 138 have_pathname = "1"b; 139 end; 140 else do; /* must be a component name/offset */ 141 name_arg: 142 option = "1"b; 143 nopts = nopts + 1; 144 if nopts > hbound (op, 1) then do; 145 call com_err_ (error_table_$too_many_args, errname, 146 "At most ^d components may be specified.", hbound (op, 1)); 147 return; 148 end; 149 op (nopts).found = "0"b; 150 if name_string = "1"b then do; /* this arg is a name */ 151 name_string = "0"b; /* don't inflict this on rest of args */ 152 go to char_string; 153 end; 154 op (nopts).opt_name = " "; 155 op (nopts).opt_offset = cv_oct_check_ (argname, code); 156 if code ^= 0 then do; 157 i = cv_dec_check_ (argname, code); 158 /* see if it's decimal */ 159 if code ^= 0 then 160 goto char_string; 161 call com_err_ (0, errname, "^a is not an octal number", argname); 162 nopts = nopts - 1; /* reset index */ 163 goto get_next; 164 end; 165 op (nopts).name_sw = "0"b; 166 goto get_next; 167 char_string: 168 op (nopts).opt_name = argname; 169 op (nopts).opt_offset = 0; 170 op (nopts).name_sw = "1"b; 171 172 end; 173 end; 174 else if argname = "-nm" | argname = "-name" then 175 name_string = "1"b; /* remember next string is a name */ 176 else if argname = "-lg" | argname = "-long" then 177 long = "1"b; 178 else if argname = "-nhe" | argname = "-no_header" then 179 no_header = "1"b; 180 else if argname = "-page_offset" | argname = "-pgofs" then 181 page_offset = "1"b; 182 get_next: 183 end; 184 185 if ^have_pathname then 186 go to give_usage; 187 188 if name_string then do; 189 call com_err_ (error_table_$noarg, errname, "-name must be followed by an argument."); 190 return; 191 end; 192 193 if option = "1"b then 194 if nopts = 0 then 195 return; 196 197 call hcs_$initiate (dirname, objname, "", 0, 0, objp, code); 198 if objp = null then do; 199 call com_err_ (code, errname, pathname); 200 goto return; 201 end; 202 203 call get_temp_segment_ (errname, listp, code); 204 if code ^= 0 then do; 205 call com_err_ (code, errname, "cannot get temporary segment."); 206 goto return; 207 end; 208 209 call form_bind_map_ (addr (x), code); /* go format bindmap into list segment */ 210 if code ^= 0 then do; /* file system error */ 211 call com_err_ (code, errname, pathname); 212 goto return; 213 end; 214 if ^no_header then do; /* print title only with header */ 215 call date_time_ ((clock ()), date); 216 call ioa_ ("^/^-^-^a^4x^a", objname, date); 217 end; 218 call iox_$put_chars (iox_$user_output, listp, divide (list_bc, 9, 21, 0), code); 219 220 221 return: call clean_up; 222 223 224 clean_up: procedure; 225 if objp ^= null then 226 call hcs_$terminate_noname (objp, code); 227 if listp ^= null then 228 call release_temp_segment_ (errname, listp, code); 229 end; 230 231 232 end print_bind_map; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1608.7 print_bind_map.pl1 >dumps>old>recomp>print_bind_map.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 50 ref 100 209 209 arg_lng 000111 automatic fixed bin(17,0) dcl 58 set ref 123* 130 132 132 134 134 155 155 157 157 161 161 167 174 174 176 176 178 178 180 180 argname based char unaligned dcl 89 set ref 130 132* 134* 155* 157* 161* 167 174 174 176 176 178 178 180 180 argp 000114 automatic pointer dcl 60 set ref 123* 130 132 134 155 157 161 167 174 174 176 176 178 178 180 180 cleanup 000100 stack reference condition dcl 54 ref 104 clock builtin function dcl 50 ref 215 code 000113 automatic fixed bin(35,0) dcl 59 set ref 111* 112 113* 123* 124 125* 132* 133 134* 155* 156 157* 159 197* 199* 203* 204 205* 209* 210 211* 218* 225* 227* com_err_ 000010 constant entry external dcl 24 ref 113 117 125 134 145 161 189 199 205 211 cu_$arg_count 000016 constant entry external dcl 27 ref 111 cu_$arg_ptr 000020 constant entry external dcl 28 ref 123 curarg 000110 automatic fixed bin(17,0) dcl 58 set ref 122* 123* cv_dec_check_ 000014 constant entry external dcl 26 ref 157 cv_oct_check_ 000012 constant entry external dcl 25 ref 155 date 000260 automatic char(24) unaligned dcl 67 set ref 215* 216* date_time_ 000022 constant entry external dcl 29 ref 215 dirname 000130 automatic char(168) unaligned dcl 61 set ref 132* 137* 197* divide builtin function dcl 50 ref 218 218 errname 000254 automatic char(16) unaligned dcl 66 set ref 98* 113* 117* 125* 134* 145* 161* 189* 199* 203* 205* 211* 227* error_table_$noarg 000050 external static fixed bin(35,0) dcl 43 set ref 189* error_table_$too_many_args 000052 external static fixed bin(35,0) dcl 43 set ref 145* expand_pathname_ 000024 constant entry external dcl 30 ref 132 flags 5 000272 automatic structure level 2 dcl 70 form_bind_map_ 000026 constant entry external dcl 31 ref 209 found 20(01) 000272 automatic bit(1) array level 3 packed unaligned dcl 70 set ref 149* get_temp_segment_ 000030 constant entry external dcl 32 ref 203 have_pathname 000266 automatic bit(1) dcl 68 set ref 108* 131 138* 185 hcs_$initiate 000032 constant entry external dcl 33 ref 197 hcs_$terminate_noname 000042 constant entry external dcl 37 ref 225 i 000106 automatic fixed bin(17,0) dcl 58 set ref 157* ioa_ 000034 constant entry external dcl 34 ref 216 iox_$put_chars 000036 constant entry external dcl 35 ref 218 iox_$user_output 000040 external static pointer dcl 36 set ref 218* list_bc 4 000272 automatic fixed bin(24,0) level 2 dcl 70 set ref 106* 218 218 listp 2 000272 automatic pointer level 2 dcl 70 set ref 102* 203* 218* 227 227* long 5(35) 000272 automatic bit(1) level 3 packed unaligned dcl 70 set ref 108* 176* name_string 000267 automatic bit(1) dcl 68 set ref 108* 128 150 151* 174* 188 name_sw 20 000272 automatic bit(1) array level 3 packed unaligned dcl 70 set ref 165* 170* nargs 000107 automatic fixed bin(17,0) dcl 58 set ref 111* 116 122 no_header 5(34) 000272 automatic bit(1) level 3 packed unaligned dcl 70 set ref 108* 178* 214 nopts 6 000272 automatic fixed bin(17,0) level 2 dcl 70 set ref 106* 143* 143 144 149 154 155 162* 162 165 167 169 170 193 null builtin function dcl 50 ref 102 198 225 227 objname 000120 automatic char(32) unaligned dcl 61 set ref 132* 137* 197* 216* objp 000272 automatic pointer level 2 dcl 70 set ref 102* 197* 198 225 225* op 7 000272 automatic structure array level 2 dcl 70 set ref 144 145 145 opt_name 7 000272 automatic char(32) array level 3 dcl 70 set ref 154* 167* opt_offset 17 000272 automatic fixed bin(17,0) array level 3 dcl 70 set ref 155* 169* option 000270 automatic bit(1) dcl 68 set ref 108* 141* 193 page_offset 5(33) 000272 automatic bit(1) level 3 packed unaligned dcl 70 set ref 108* 180* pathname 000202 automatic char(168) unaligned dcl 61 set ref 109* 137* 199* 211* pathname_ 000044 constant entry external dcl 38 ref 137 release_temp_segment_ 000046 constant entry external dcl 39 ref 227 valptr 000116 automatic pointer dcl 60 set ref 100* value 000112 automatic fixed bin(17,0) dcl 58 set ref 100 106* x 000272 automatic structure level 1 dcl 70 set ref 209 209 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. b0 based structure level 1 dcl 90 p automatic pointer dcl 60 NAMES DECLARED BY EXPLICIT CONTEXT. char_string 000665 constant label dcl 167 ref 152 159 clean_up 001312 constant entry internal dcl 224 ref 104 221 get_next 000756 constant label dcl 182 ref 163 166 give_usage 000256 constant label dcl 117 ref 185 name_arg 000466 constant label dcl 141 ref 128 pbm 000136 constant entry external dcl 17 print_bind_map 000145 constant entry external dcl 17 return 001304 constant label dcl 221 ref 135 200 206 212 start 000155 constant label dcl 100 NAMES DECLARED BY CONTEXT OR IMPLICATION. char builtin function ref 130 hbound builtin function ref 144 145 145 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1634 1710 1370 1644 Length 2116 1370 54 172 244 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME pbm 450 external procedure is an external procedure. on unit on line 104 64 on unit clean_up 84 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME pbm 000106 i pbm 000107 nargs pbm 000110 curarg pbm 000111 arg_lng pbm 000112 value pbm 000113 code pbm 000114 argp pbm 000116 valptr pbm 000120 objname pbm 000130 dirname pbm 000202 pathname pbm 000254 errname pbm 000260 date pbm 000266 have_pathname pbm 000267 name_string pbm 000270 option pbm 000272 x pbm THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out call_int_this call_int_other return enable ext_entry int_entry clock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_dec_check_ cv_oct_check_ date_time_ expand_pathname_ form_bind_map_ get_temp_segment_ hcs_$initiate hcs_$terminate_noname ioa_ iox_$put_chars pathname_ release_temp_segment_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noarg error_table_$too_many_args iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 17 000135 98 000152 100 000155 102 000157 104 000162 106 000204 108 000207 109 000220 111 000223 112 000234 113 000236 114 000253 116 000254 117 000256 119 000303 122 000304 123 000312 124 000327 125 000331 126 000346 128 000347 130 000351 131 000362 132 000364 133 000414 134 000416 135 000442 137 000443 138 000463 139 000465 141 000466 143 000470 144 000471 145 000474 147 000526 149 000527 150 000532 151 000536 152 000537 154 000540 155 000544 156 000571 157 000573 159 000617 161 000621 162 000655 163 000657 165 000660 166 000664 167 000665 169 000675 170 000676 173 000702 174 000703 176 000716 178 000731 180 000744 182 000756 185 000760 188 000762 189 000764 190 001010 193 001011 197 001016 198 001060 199 001064 200 001105 203 001106 204 001127 205 001131 206 001155 209 001156 210 001171 211 001173 212 001214 214 001215 215 001220 216 001237 218 001264 221 001304 232 001310 224 001311 225 001317 227 001334 229 001362 ----------------------------------------------------------- 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