COMPILATION LISTING OF SEGMENT ips_mask_commands Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 08/27/84 1438.9 mst Mon 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 /* format: style3 */ 11 12 get_ips_mask: 13 proc () options (variable); 14 15 /* DESCRIPTION: 16* Utility commands for manipulating IPS masks. 17**/ 18 19 /* HISTORY: 20*Written by W. Olin Sibert, 02/16/80. 21*Modified: 22*07/16/84 by R. Michael Tague: To work work 32 char IPS signal names. 23**/ 24 25 26 /* START OF DECLARATIONS */ 27 28 dcl (argno, nargs) fixed bin; 29 dcl al fixed bin (21); 30 dcl ap pointer; 31 dcl arg char (al) based (ap); 32 dcl code fixed bin (35); 33 dcl whoami char (32); 34 dcl (brief_sw, all_sw) bit (1) aligned; 35 36 dcl (old_mask, new_mask, current_mask) 37 bit (36) aligned; 38 dcl temp_mask bit (36) aligned; 39 dcl mask_string char (1188) varying; /* 35 signals * 32 char names 40* + (35-1) * length(", ") */ 41 42 dcl com_err_ entry options (variable); 43 dcl cu_$arg_count entry (fixed bin); 44 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 45 dcl hcs_$get_ips_mask entry (bit (36) aligned); 46 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 47 dcl ioa_ entry options (variable); 48 dcl ioa_$nnl entry options (variable); 49 dcl ioa_$rsnnl entry options (variable); 50 51 dcl ( 52 error_table_$noarg, 53 error_table_$inconsistent, 54 error_table_$badopt 55 ) fixed bin (35) external static; 56 57 dcl 1 sys_info$ips_mask_data 58 aligned external static, 59 2 count fixed bin, 60 2 masks (35), 61 3 name char (32) aligned, 62 3 mask bit (35) aligned; 63 64 dcl ALL_IPS_MASK bit (36) aligned internal static options (constant) init ("000000000000"b3); 65 dcl NO_IPS_MASK bit (36) aligned internal static options (constant) init ("777777777777"b3); 66 dcl LAST_MASK_BIT bit (36) aligned internal static options (constant) init ("000000000001"b3); 67 68 dcl (addr, copy, substr, rel, bit, binary, null) 69 builtin; 70 71 /* END OF DECLARATIONS */ 72 73 74 /* get_ips_mask: proc () options (variable) */ 75 76 whoami = "get_ips_mask"; /* this entry prints the current list of masked signals */ 77 brief_sw = "0"b; 78 79 call cu_$arg_count (nargs); 80 do argno = 1 to nargs; 81 call cu_$arg_ptr (argno, ap, al, (0)); 82 83 if arg = "-brief" | arg = "-bf" 84 then brief_sw = "1"b; 85 else if arg = "-long" | arg = "-lg" 86 then brief_sw = "0"b; 87 88 else do; 89 BADOPT: 90 call com_err_ (error_table_$badopt, whoami, "^a", arg); 91 goto MAIN_RETURN; 92 end; 93 end; /* of this argument loop */ 94 95 call hcs_$get_ips_mask (current_mask); 96 97 call get_mask_string (current_mask); 98 99 current_mask = current_mask & (^LAST_MASK_BIT); /* turn off last bit, for ease of comuptation */ 100 if brief_sw 101 then do; /* print the masked signals in brief format */ 102 if current_mask = ALL_IPS_MASK 103 then call ioa_ ("All IPS signals masked."); 104 else if mask_string ^= "" 105 then call ioa_ ("^a", mask_string); 106 end; 107 108 else do; 109 if current_mask = ALL_IPS_MASK 110 then call ioa_ ("All IPS signals are masked."); 111 else if mask_string ^= "" 112 then /* if anything is masked, print it */ 113 call ioa_ ("Masked IPS signals: ^a.", mask_string); 114 else call ioa_ ("No IPS signals are masked."); 115 end; 116 117 MAIN_RETURN: 118 return; /* end of code for get_ips_mask */ 119 120 /* */ 121 122 reset_ips_mask: 123 entry () options (variable); 124 125 whoami = "reset_ips_mask"; /* this entry resets specified masks or all masks */ 126 goto SET_IPS_MASK_COMMON; 127 128 129 set_ips_mask: 130 entry () options (variable); 131 132 whoami = "set_ips_mask"; /* this entry masks signals -- either those specified or all */ 133 goto SET_IPS_MASK_COMMON; 134 135 136 SET_IPS_MASK_COMMON: 137 brief_sw = "0"b; 138 all_sw = "0"b; 139 140 new_mask = NO_IPS_MASK; 141 142 call cu_$arg_count (nargs); 143 do argno = 1 to nargs; 144 call cu_$arg_ptr (argno, ap, al, (0)); 145 146 if substr (arg, 1, 1) ^= "-" 147 then do; /* a signal name */ 148 temp_mask = get_mask_bit (arg); /* find out what bit to turn off */ 149 if temp_mask = NO_IPS_MASK 150 then do; 151 call com_err_ (0, whoami, "Unknown IPS signal ""^a"".", arg); 152 goto MAIN_RETURN; 153 end; 154 155 new_mask = new_mask & temp_mask; /* turn off the corresponding bit */ 156 end; 157 158 else if arg = "-brief" | arg = "-bf" 159 then brief_sw = "1"b; 160 else if arg = "-long" | arg = "-lg" 161 then brief_sw = "0"b; 162 else if arg = "-all" | arg = "-a" 163 then all_sw = "1"b; 164 165 else goto BADOPT; 166 end; /* of this argument loop */ 167 168 if all_sw & (new_mask ^= NO_IPS_MASK) 169 then do; 170 call com_err_ (error_table_$inconsistent, whoami, "-all and any signal names."); 171 goto MAIN_RETURN; 172 end; 173 174 if (^all_sw) & (new_mask = NO_IPS_MASK) 175 then do; 176 call com_err_ (error_table_$noarg, whoami, "^/^5xUsage:^3x^a signal_name(s)|-all {-brief}", whoami); 177 goto MAIN_RETURN; 178 end; 179 180 if all_sw 181 then new_mask = ALL_IPS_MASK; /* if we're to mask them all, get all zero bits */ 182 183 call hcs_$get_ips_mask (current_mask); 184 185 if whoami = "reset_ips_mask" 186 then /* complement mask bits and set new ones to 1 */ 187 new_mask = current_mask | (^new_mask); /* turn all bits in the mask as specified */ 188 else new_mask = current_mask & new_mask; /* otherwise, turn off specified bits in current_mask */ 189 190 call hcs_$reset_ips_mask (new_mask, (""b)); /* set it */ 191 192 current_mask = current_mask & (^LAST_MASK_BIT); /* turn off last bit, for ease of comuptation */ 193 if ^brief_sw 194 then do; /* and print the results, if desired */ 195 call get_mask_string (current_mask); 196 197 if current_mask = ALL_IPS_MASK 198 then call ioa_ ("All IPS signals were previously masked."); 199 else if mask_string ^= "" 200 then /* if anything is masked, print it */ 201 call ioa_ ("Previously masked IPS signals: ^a.", mask_string); 202 else call ioa_ ("No IPS signals were previously masked."); 203 end; 204 205 goto MAIN_RETURN; 206 207 /* */ 208 209 get_mask_string: 210 proc (P_mask); 211 212 /* * This procedure sets mask_string according to the signals indicated as masked 213* * in P_mask. P_mask is assumed to be in the normal format; that is, a "1" bit 214* * indicates that the corresponding signal is NOT masked. */ 215 216 dcl P_mask bit (36) aligned parameter; 217 218 dcl idx fixed bin; 219 dcl (all_on, all_off) bit (1) aligned; 220 dcl all_masks bit (36); 221 dcl temp_mask bit (36) aligned; 222 dcl temp_str char (50) varying; 223 224 mask_string = ""; 225 temp_mask = P_mask & (^LAST_MASK_BIT); /* turn off last bit, of course */ 226 all_masks = ""b; 227 228 do idx = 1 to sys_info$ips_mask_data.count; 229 if ((^temp_mask) & sys_info$ips_mask_data.mask (idx)) ^= ""b 230 then do; /* found one with the right bit */ 231 if length (mask_string) > 0 232 then /* format real pretty now */ 233 mask_string = mask_string || ", "; 234 235 mask_string = mask_string || rtrim (sys_info$ips_mask_data.name (idx)); 236 /* and add the signal name */ 237 end; 238 239 all_masks = all_masks | sys_info$ips_mask_data.mask (idx); 240 end; 241 242 /* At this point, a bit will be set in all_masks for each valid mask, and temp_mask will have 243* a zero for all masked signals. */ 244 245 all_on, all_off = "1"b; 246 247 do idx = 1 to 35; 248 if substr (all_masks, idx, 1) = "0"b 249 then do; /* not a defined mask */ 250 if substr (temp_mask, idx, 1) = "0"b 251 then all_on = "0"b; /* keep a pair of bits describing the state of all */ 252 else all_off = "0"b; /* the nonstandard signals */ 253 end; 254 end; 255 256 if ^(all_on | all_off) 257 then do; /* something nonstandard */ 258 if length (mask_string) > 0 259 then /* add formatting, regardless */ 260 mask_string = mask_string || ", "; 261 262 call ioa_$rsnnl ("", temp_str, (0), temp_mask); 263 mask_string = mask_string || temp_str; 264 end; 265 266 return; 267 268 end get_mask_string; 269 270 /* */ 271 272 get_mask_bit: 273 proc (P_name) returns (bit (36) aligned); 274 275 /* * This procedure returns a bit string to mask the named signal; the bit 276* * string is in the normal format, such that all bits will be "1"b except 277* * for the one indicating the specified signal. If the named signal does not 278* * exist, the returned mask will be equal to NO_IPS_MASK. */ 279 280 dcl P_name char (*) parameter; 281 282 dcl mask bit (36) aligned; 283 dcl idx fixed bin; 284 285 mask = NO_IPS_MASK; 286 287 do idx = 1 to sys_info$ips_mask_data.count; 288 if P_name = sys_info$ips_mask_data.name (idx) 289 then do; 290 mask = ^sys_info$ips_mask_data.mask (idx); 291 return (mask); /* found it */ 292 end; 293 end; 294 295 return (mask); 296 end get_mask_bit; 297 298 end get_ips_mask; 299 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/22/84 1220.6 ips_mask_commands.pl1 >special_ldd>on>ips_signal>ips_mask_commands.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. ALL_IPS_MASK constant bit(36) initial dcl 64 ref 102 109 180 197 LAST_MASK_BIT constant bit(36) initial dcl 66 ref 99 192 225 NO_IPS_MASK 001434 constant bit(36) initial dcl 65 ref 140 149 168 174 285 P_mask parameter bit(36) dcl 216 ref 209 225 P_name parameter char unaligned dcl 280 ref 272 288 al 000102 automatic fixed bin(21,0) dcl 29 set ref 81* 83 83 85 85 89 89 144* 146 148 148 151 151 158 158 160 160 162 162 all_masks 000611 automatic bit(36) unaligned dcl 220 set ref 226* 239* 239 248 all_off 000610 automatic bit(1) dcl 219 set ref 245* 252* 256 all_on 000607 automatic bit(1) dcl 219 set ref 245* 250* 256 all_sw 000117 automatic bit(1) dcl 34 set ref 138* 162* 168 174 180 ap 000104 automatic pointer dcl 30 set ref 81* 83 83 85 85 89 144* 146 148 151 158 158 160 160 162 162 arg based char unaligned dcl 31 set ref 83 83 85 85 89* 146 148* 151* 158 158 160 160 162 162 argno 000100 automatic fixed bin(17,0) dcl 28 set ref 80* 81* 143* 144* brief_sw 000116 automatic bit(1) dcl 34 set ref 77* 83* 85* 100 136* 158* 160* 193 com_err_ 000010 constant entry external dcl 42 ref 89 151 170 176 count 000034 external static fixed bin(17,0) level 2 dcl 57 ref 228 287 cu_$arg_count 000012 constant entry external dcl 43 ref 79 142 cu_$arg_ptr 000014 constant entry external dcl 44 ref 81 144 current_mask 000121 automatic bit(36) dcl 36 set ref 95* 97* 99* 99 102 109 183* 185 188 192* 192 195* 197 error_table_$badopt 000032 external static fixed bin(35,0) dcl 51 set ref 89* error_table_$inconsistent 000030 external static fixed bin(35,0) dcl 51 set ref 170* error_table_$noarg 000026 external static fixed bin(35,0) dcl 51 set ref 176* hcs_$get_ips_mask 000016 constant entry external dcl 45 ref 95 183 hcs_$reset_ips_mask 000020 constant entry external dcl 46 ref 190 idx 000606 automatic fixed bin(17,0) dcl 218 in procedure "get_mask_string" set ref 228* 229 235 239* 247* 248 250* idx 000641 automatic fixed bin(17,0) dcl 283 in procedure "get_mask_bit" set ref 287* 288 290* ioa_ 000022 constant entry external dcl 47 ref 102 104 109 111 114 197 199 202 ioa_$rsnnl 000024 constant entry external dcl 49 ref 262 mask 000640 automatic bit(36) dcl 282 in procedure "get_mask_bit" set ref 285* 290* 291 295 mask 11 000034 external static bit(35) array level 3 in structure "sys_info$ips_mask_data" dcl 57 in procedure "get_ips_mask" ref 229 239 290 mask_string 000123 automatic varying char(1188) dcl 39 set ref 104 104* 111 111* 199 199* 224* 231 231* 231 235* 235 258 258* 258 263* 263 masks 1 000034 external static structure array level 2 dcl 57 name 1 000034 external static char(32) array level 3 dcl 57 ref 235 288 nargs 000101 automatic fixed bin(17,0) dcl 28 set ref 79* 80 142* 143 new_mask 000120 automatic bit(36) dcl 36 set ref 140* 155* 155 168 174 180* 185* 185 188* 188 190* substr builtin function dcl 68 ref 146 248 250 sys_info$ips_mask_data 000034 external static structure level 1 dcl 57 temp_mask 000122 automatic bit(36) dcl 38 in procedure "get_ips_mask" set ref 148* 149 155 temp_mask 000612 automatic bit(36) dcl 221 in procedure "get_mask_string" set ref 225* 229 250 262* temp_str 000613 automatic varying char(50) dcl 222 set ref 262* 263 whoami 000106 automatic char(32) unaligned dcl 33 set ref 76* 89* 125* 132* 151* 170* 176* 176* 185 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. addr builtin function dcl 68 binary builtin function dcl 68 bit builtin function dcl 68 code automatic fixed bin(35,0) dcl 32 copy builtin function dcl 68 ioa_$nnl 000000 constant entry external dcl 48 null builtin function dcl 68 old_mask automatic bit(36) dcl 36 rel builtin function dcl 68 NAMES DECLARED BY EXPLICIT CONTEXT. BADOPT 000264 constant label dcl 89 ref 162 MAIN_RETURN 000472 constant label dcl 117 ref 91 152 171 177 205 SET_IPS_MASK_COMMON 000517 constant label dcl 136 ref 126 133 get_ips_mask 000171 constant entry external dcl 12 get_mask_bit 001353 constant entry internal dcl 272 ref 148 get_mask_string 001132 constant entry internal dcl 209 ref 97 195 reset_ips_mask 000474 constant entry external dcl 122 set_ips_mask 000506 constant entry external dcl 129 NAMES DECLARED BY CONTEXT OR IMPLICATION. length builtin function ref 231 258 rtrim builtin function ref 235 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1614 1652 1440 1624 Length 2056 1440 36 170 153 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_ips_mask 502 external procedure is an external procedure. get_mask_string internal procedure shares stack frame of external procedure get_ips_mask. get_mask_bit internal procedure shares stack frame of external procedure get_ips_mask. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_ips_mask 000100 argno get_ips_mask 000101 nargs get_ips_mask 000102 al get_ips_mask 000104 ap get_ips_mask 000106 whoami get_ips_mask 000116 brief_sw get_ips_mask 000117 all_sw get_ips_mask 000120 new_mask get_ips_mask 000121 current_mask get_ips_mask 000122 temp_mask get_ips_mask 000123 mask_string get_ips_mask 000606 idx get_mask_string 000607 all_on get_mask_string 000610 all_off get_mask_string 000611 all_masks get_mask_string 000612 temp_mask get_mask_string 000613 temp_str get_mask_string 000640 mask get_mask_bit 000641 idx get_mask_bit 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. com_err_ cu_$arg_count cu_$arg_ptr hcs_$get_ips_mask hcs_$reset_ips_mask ioa_ ioa_$rsnnl THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$inconsistent error_table_$noarg sys_info$ips_mask_data LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000170 76 000176 77 000201 79 000202 80 000210 81 000217 83 000235 85 000252 89 000264 91 000316 93 000317 95 000321 97 000330 99 000332 100 000335 102 000337 104 000361 106 000405 109 000406 111 000425 114 000456 117 000472 122 000473 125 000501 126 000504 129 000505 132 000513 133 000516 136 000517 138 000520 140 000521 142 000523 143 000532 144 000541 146 000557 148 000564 149 000603 151 000606 152 000645 155 000646 156 000647 158 000650 160 000664 162 000676 166 000710 168 000712 170 000717 171 000743 174 000744 176 000751 177 001000 180 001001 183 001004 185 001013 188 001024 190 001026 192 001041 193 001044 195 001046 197 001050 199 001067 202 001115 205 001131 209 001132 224 001134 225 001135 226 001141 228 001142 229 001153 231 001162 235 001176 239 001231 240 001234 245 001236 247 001241 248 001247 250 001253 252 001261 254 001262 256 001264 258 001270 262 001304 263 001340 266 001352 272 001353 285 001364 287 001366 288 001377 290 001413 291 001416 293 001421 295 001423 ----------------------------------------------------------- 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