COMPILATION LISTING OF SEGMENT dump_fnp Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1635.7 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 11 /* DUMP_FNP - Command to dump fnp memory */ 12 /* PATCH_FNP - Command to patch fnp memory */ 13 /* 14* Re-implemented October 1978 by Larry Johnson to use debug_fnp interfaces. 15* Modified 1979 June 1 by Art Beattie to remove maximum address checks. 16**/ 17 18 dump_fnp: proc; 19 20 /* Automatic */ 21 22 dcl name char (16); 23 dcl n_args fixed bin; 24 dcl arg_no fixed bin; 25 dcl arg_ptr ptr; 26 dcl arg_len fixed bin; 27 dcl fnp fixed bin; 28 dcl fnp_addr fixed bin; 29 dcl fnp_len fixed bin; 30 dcl code fixed bin (35); 31 dcl display_mode fixed bin; 32 dcl length_given bit (1); 33 dcl mem_buf (0:2047) bit (18) unal; 34 dcl patch_buf (10) fixed bin (17) unal; 35 36 /* Based */ 37 38 dcl arg char (arg_len) based (arg_ptr); 39 40 /* External */ 41 42 dcl cu_$arg_count entry (fixed bin); 43 dcl com_err_ entry options (variable); 44 dcl db_fnp_memory_$fetch entry (ptr, fixed bin, fixed bin, fixed bin, ptr, fixed bin (35)); 45 dcl db_fnp_display_ entry (ptr, fixed bin, fixed bin, fixed bin, ptr, fixed bin, fixed bin (35)); 46 dcl db_fnp_memory_$store entry (ptr, fixed bin, fixed bin, fixed bin, ptr, char (*), fixed bin, fixed bin (35)); 47 dcl db_fnp_eval_ entry (ptr, fixed bin, char (*), ptr, char (*), fixed bin, fixed bin (35)); 48 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 49 50 dcl (addr, index, null, substr) builtin; 51 52 dcl error_table_$too_many_args ext fixed bin (35); 53 dcl error_table_$noarg ext fixed bin (35); 54 55 /* Dump_fnp command */ 56 57 name = "dump_fnp"; 58 call cu_$arg_count (n_args); 59 if n_args < 2 then do; 60 call com_err_ (0, name, "Usage: ^a tag address {length} {-ch}", name); 61 return; 62 end; 63 64 arg_no = 1; 65 fnp = get_fnp (); 66 fnp_addr = get_address (); 67 68 display_mode = 0; /* Octal */ 69 length_given = "0"b; 70 fnp_len = 1; /* The default */ 71 do while (arg_no <= n_args); 72 call get_arg; 73 if arg = "-character" | arg = "-ch" then display_mode = 1; 74 else if ^length_given then do; 75 fnp_len = eval_arg (); 76 length_given = "1"b; 77 end; 78 else do; 79 call com_err_ (0, name, "Unrecognized argument: ^a", arg); 80 return; 81 end; 82 end; 83 84 call check_values; 85 86 call db_fnp_memory_$fetch (null (), fnp, fnp_addr, fnp_len, addr (mem_buf), code); 87 if code ^= 0 then do; 88 call com_err_ (code, name, "Unable to read memory."); 89 return; 90 end; 91 92 call db_fnp_display_ (null (), fnp, fnp_addr, fnp_len, addr (mem_buf), display_mode, code); 93 if code ^= 0 then do; 94 call com_err_ (code, name, "Unable to display memory"); 95 return; 96 end; 97 98 return; 99 100 /* Patch_fnp command */ 101 102 patch_fnp: entry; 103 104 name = "patch_fnp"; 105 call cu_$arg_count (n_args); 106 if n_args < 3 then do; 107 call com_err_ (0, name, "Usage: ^a tag address word1 {... word10}", name); 108 return; 109 end; 110 111 arg_no = 1; 112 fnp = get_fnp (); 113 fnp_addr = get_address (); 114 115 fnp_len = 0; 116 do while (arg_no <= n_args); 117 call get_arg; 118 if fnp_len >= 10 then do; 119 call com_err_ (error_table_$too_many_args, name, "^a", arg); 120 return; 121 end; 122 fnp_len = fnp_len + 1; 123 patch_buf (fnp_len) = eval_arg (); 124 end; 125 126 call check_values; 127 128 call db_fnp_memory_$store (null (), fnp, fnp_addr, fnp_len, addr (patch_buf), name, 2, code); 129 if code ^= 0 then do; 130 call com_err_ (code, name, "Unable to patch memory"); 131 return; 132 end; 133 134 done: return; 135 136 /* Check fnp arg */ 137 138 get_fnp: proc returns (fixed bin); 139 140 dcl i fixed bin; 141 142 call get_arg; 143 i = index ("abcdefgh", arg); 144 if i = 0 then do; 145 bad_tag: call com_err_ (0, name, "Bad FNP tag: ^a", arg); 146 go to done; 147 end; 148 if substr ("abcdefgh", i, 1) ^= arg then go to bad_tag; 149 return (i); 150 151 end get_fnp; 152 153 /* Get address argument */ 154 155 get_address: proc returns (fixed bin); 156 157 if arg_no > n_args then do; 158 call com_err_ (error_table_$noarg, name, "Address"); 159 go to done; 160 end; 161 162 call get_arg; 163 return (eval_arg ()); 164 165 end get_address; 166 167 /* Procedure to handle numeric args */ 168 169 eval_arg: proc returns (fixed bin); 170 171 dcl i fixed bin; 172 173 call db_fnp_eval_ (null (), fnp, arg, null (), name, i, code); 174 if code ^= 0 then go to done; 175 return (i); 176 177 end; 178 179 /* Get next argument */ 180 181 get_arg: proc; 182 183 call cu_$arg_ptr (arg_no, arg_ptr, arg_len, code); 184 if code ^= 0 then do; 185 call com_err_ (code, name, "Arg ^d", arg_no); /* Should be impossible */ 186 go to done; 187 end; 188 arg_no = arg_no + 1; 189 return; 190 191 end get_arg; 192 193 /* Check FNP address and length values */ 194 195 check_values: proc; 196 197 if fnp_addr < 0 then do; 198 call com_err_ (0, name, "Starting address out of range: ^o", fnp_addr); 199 go to done; 200 end; 201 202 if fnp_len < 1 | fnp_len > dim (mem_buf, 1) then do; 203 call com_err_ (0, name, "Invalid length: ^o", fnp_len); 204 go to done; 205 end; 206 207 return; 208 209 end check_values; 210 211 end dump_fnp; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1505.4 dump_fnp.pl1 >dumps>old>recomp>dump_fnp.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 86 86 92 92 128 128 arg based char unaligned dcl 38 set ref 73 73 79* 119* 143 145* 148 173* arg_len 000110 automatic fixed bin(17,0) dcl 26 set ref 73 73 79 79 119 119 143 145 145 148 173 173 183* arg_no 000105 automatic fixed bin(17,0) dcl 24 set ref 64* 71 111* 116 157 183* 185* 188* 188 arg_ptr 000106 automatic pointer dcl 25 set ref 73 73 79 119 143 145 148 173 183* code 000114 automatic fixed bin(35,0) dcl 30 set ref 86* 87 88* 92* 93 94* 128* 129 130* 173* 174 183* 184 185* com_err_ 000012 constant entry external dcl 43 ref 60 79 88 94 107 119 130 145 158 185 198 203 cu_$arg_count 000010 constant entry external dcl 42 ref 58 105 cu_$arg_ptr 000024 constant entry external dcl 48 ref 183 db_fnp_display_ 000016 constant entry external dcl 45 ref 92 db_fnp_eval_ 000022 constant entry external dcl 47 ref 173 db_fnp_memory_$fetch 000014 constant entry external dcl 44 ref 86 db_fnp_memory_$store 000020 constant entry external dcl 46 ref 128 display_mode 000115 automatic fixed bin(17,0) dcl 31 set ref 68* 73* 92* error_table_$noarg 000030 external static fixed bin(35,0) dcl 53 set ref 158* error_table_$too_many_args 000026 external static fixed bin(35,0) dcl 52 set ref 119* fnp 000111 automatic fixed bin(17,0) dcl 27 set ref 65* 86* 92* 112* 128* 173* fnp_addr 000112 automatic fixed bin(17,0) dcl 28 set ref 66* 86* 92* 113* 128* 197 198* fnp_len 000113 automatic fixed bin(17,0) dcl 29 set ref 70* 75* 86* 92* 115* 118 122* 122 123 128* 202 202 203* i 002132 automatic fixed bin(17,0) dcl 140 in procedure "get_fnp" set ref 143* 144 148 149 i 002150 automatic fixed bin(17,0) dcl 171 in procedure "eval_arg" set ref 173* 175 index builtin function dcl 50 ref 143 length_given 000116 automatic bit(1) unaligned dcl 32 set ref 69* 74 76* mem_buf 000117 automatic bit(18) array unaligned dcl 33 set ref 86 86 92 92 202 n_args 000104 automatic fixed bin(17,0) dcl 23 set ref 58* 59 71 105* 106 116 157 name 000100 automatic char(16) unaligned dcl 22 set ref 57* 60* 60* 79* 88* 94* 104* 107* 107* 119* 128* 130* 145* 158* 173* 185* 198* 203* null builtin function dcl 50 ref 86 86 92 92 128 128 173 173 173 173 patch_buf 002117 automatic fixed bin(17,0) array unaligned dcl 34 set ref 123* 128 128 substr builtin function dcl 50 ref 148 NAMES DECLARED BY EXPLICIT CONTEXT. bad_tag 000725 constant label dcl 145 set ref 148 check_values 001162 constant entry internal dcl 195 ref 84 126 done 000711 constant label dcl 134 ref 146 159 174 186 199 204 dump_fnp 000141 constant entry external dcl 18 eval_arg 001033 constant entry internal dcl 169 ref 75 123 163 get_address 000773 constant entry internal dcl 155 ref 66 113 get_arg 001110 constant entry internal dcl 181 ref 72 117 142 162 get_fnp 000712 constant entry internal dcl 138 ref 65 112 patch_fnp 000450 constant entry external dcl 102 NAME DECLARED BY CONTEXT OR IMPLICATION. dim builtin function ref 202 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1436 1470 1306 1446 Length 1654 1306 32 150 130 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dump_fnp 1368 external procedure is an external procedure. get_fnp internal procedure shares stack frame of external procedure dump_fnp. get_address internal procedure shares stack frame of external procedure dump_fnp. eval_arg internal procedure shares stack frame of external procedure dump_fnp. get_arg internal procedure shares stack frame of external procedure dump_fnp. check_values internal procedure shares stack frame of external procedure dump_fnp. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dump_fnp 000100 name dump_fnp 000104 n_args dump_fnp 000105 arg_no dump_fnp 000106 arg_ptr dump_fnp 000110 arg_len dump_fnp 000111 fnp dump_fnp 000112 fnp_addr dump_fnp 000113 fnp_len dump_fnp 000114 code dump_fnp 000115 display_mode dump_fnp 000116 length_given dump_fnp 000117 mem_buf dump_fnp 002117 patch_buf dump_fnp 002132 i get_fnp 002150 i eval_arg THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry set_cs_eis index_cs_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr db_fnp_display_ db_fnp_eval_ db_fnp_memory_$fetch db_fnp_memory_$store THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noarg error_table_$too_many_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000140 57 000146 58 000151 59 000157 60 000162 61 000212 64 000213 65 000215 66 000217 68 000221 69 000222 70 000223 71 000225 72 000230 73 000231 74 000246 75 000250 76 000252 77 000254 79 000255 80 000311 82 000312 84 000313 86 000314 87 000341 88 000343 89 000367 92 000370 93 000417 94 000421 95 000445 98 000446 102 000447 104 000455 105 000460 106 000467 107 000472 108 000522 111 000523 112 000525 113 000527 115 000531 116 000532 117 000535 118 000536 119 000541 120 000573 122 000574 123 000575 124 000611 126 000612 128 000613 129 000662 130 000664 131 000710 134 000711 138 000712 142 000714 143 000715 144 000724 145 000725 146 000762 148 000763 149 000770 155 000773 157 000775 158 001000 159 001023 162 001024 163 001025 169 001033 173 001035 174 001102 175 001104 181 001110 183 001111 184 001126 185 001130 186 001157 188 001160 189 001161 195 001162 197 001163 198 001165 199 001216 202 001217 203 001224 204 001260 207 001261 ----------------------------------------------------------- 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