COMPILATION LISTING OF SEGMENT format_fnp_trace_msg_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1726.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 11 /* FORMAT_FNP_TRACE_MSG_ - A procedure to interpret an FNP trace table entry */ 12 13 /* Written May 1977 by Larry Johnson */ 14 /* Modified August 1979 by Larry Johnson for better decoding of dia codes */ 15 16 /* This module performs an ioa-like edit of a control string found in od355_msgs. 17* There is one control for each kind of trace message. The string may contain 18* only ^d, ^o, ^w, ^b, ^e, and ^f codes with their normal ioa_ meaning. In addition, 19* the special request ^n* may be used, with the following meanings: 20* 21* ^1* module|offset 22* ^2* opblock name 23* ^3* 3rd word of jump table 24* ^4* dia mailbox opcode 25* ^5* alter parameters sub-code 26**/ 27 28 format_fnp_trace_msg_: proc (arg_tmsgp, arg_modchp, arg_string); 29 30 /* Parameters */ 31 32 dcl arg_tmsgp ptr; /* Pointer to the trace table entry to interpret */ 33 dcl arg_modchp ptr; /* Address of module chain */ 34 dcl arg_string char (*) var; /* Where to put the result */ 35 36 /* Automatic */ 37 38 dcl (i, j) fixed bin; 39 dcl p ptr; 40 dcl argno fixed bin; /* For counting args */ 41 dcl edit_temp char (50) var; 42 43 dcl ctlp ptr; /* Pointer to unprocess part of control string */ 44 dcl ctll fixed bin; /* Its length */ 45 dcl ctl char (ctll) based (ctlp); 46 47 dcl ctl_accp ptr; /* Pointer to origional ACC control string */ 48 dcl 1 ctl_acc aligned based (ctl_accp), 49 2 length fixed bin (8) unal, 50 2 msg char (ctl_acc.length) unal; 51 52 /* Format of a trace table entry */ 53 54 dcl tmsgp ptr; 55 dcl 1 tmsg unal based (tmsgp), 56 2 module bit (6) unal, /* Module that logged entry */ 57 2 type bit (6) unal, /* Index into possible msgs for that module */ 58 2 length bit (6) unal, /* Number of data words */ 59 2 time bit (18) unal, /* Relative time message was logged */ 60 2 data (1) bit (18) unal; /* Array of optional data words */ 61 62 /* Format of module chain table */ 63 64 dcl modchp ptr; 65 dcl 1 modch aligned based (modchp), 66 2 nmodules fixed bin, 67 2 entries (modch.nmodules), 68 3 name char (4), 69 3 address fixed bin; 70 71 /* Format of the third word of a jump table */ 72 73 dcl jumptblp ptr; 74 dcl 1 jumptbl unal based (jumptblp), 75 2 channel bit (4), 76 2 device bit (2), 77 2 subchan bit (5), 78 2 module bit (7); 79 80 /* Things in od355_msgs */ 81 82 dcl od355_msgs$ ext; 83 dcl od355_msgs$trace_modtab (1) bit (18) aligned ext; /* Array of offsets for each module */ 84 dcl message_offsetsp ptr; 85 dcl message_offsets (1) bit (18) aligned based (message_offsetsp); /* Offsets to the individual acc strings */ 86 87 /* External */ 88 89 dcl ioa_$rsnpnnl entry options (variable); 90 dcl db_fnp_opblock_util_$get_name entry (bit (18), char (*)); 91 dcl db_fnp_sym_util_$lookup_member entry (fixed bin, char (*), char (*)); 92 93 dcl (addr, bin, hbound, index, lbound, length, ptr, substr, verify) builtin; 94 95 /* Find the origional control string in od355_msgs */ 96 97 tmsgp = arg_tmsgp; /* Address of tracetable entry */ 98 modchp = arg_modchp; 99 i = bin (tmsg.module); /* Module number */ 100 j = bin (tmsg.type); /* Message number for that module */ 101 p = addr (od355_msgs$); /* For doing pointercalculations */ 102 message_offsetsp = ptr (p, bin (od355_msgs$trace_modtab (i))); /* Address of table of messages for the module */ 103 ctl_accp = ptr (p, bin (message_offsets (j))); /* Address of ACC string */ 104 ctlp = addr (ctl_acc.msg); /* For looking at text part */ 105 ctll = length (ctl_acc.msg); 106 107 /* Now parse the input "ioa_" string, editing each operand */ 108 109 call ioa_$rsnpnnl ("^.3b", arg_string, (0), tmsg.time); /* Start line with the time */ 110 arg_string = arg_string || " "; 111 argno = 0; 112 do while (ctll > 0); /* Loop till string exhausted */ 113 i = index (ctl, "^"); /* Look for next control */ 114 if i = 1 then do; /* Found one */ 115 i = verify (substr (ctl, 2), "0123456789."); /* Count digits */ 116 if substr (ctl, i+1, 1) ^= "*" then do; /* Normal ioa_ control */ 117 argno = argno + 1; /* Get next argument */ 118 if substr (ctl, i+1, 1) = "b" then /* ^b requries a bit arg */ 119 call ioa_$rsnpnnl (substr (ctl, 1, i+1), edit_temp, (0), tmsg.data (argno)); 120 else call ioa_$rsnpnnl (substr (ctl, 1, i+1), edit_temp, (0), bin (tmsg.data (argno), 18)); 121 /* Let ioa_ edit number */ 122 arg_string = arg_string || edit_temp; 123 end; 124 else do; /* Special dump edit request */ 125 j = bin (substr (ctl, 2, i-1)); /* Decode request nubber */ 126 argno = argno + 1; 127 call special_edit (j); 128 end; 129 ctlp = substraddr (ctl, i+2); /* Next character to deal with */ 130 ctll = ctll - i - 1; 131 end; 132 else do; /* The next char is not a "^" */ 133 if i = 0 then i = ctll; 134 else i = i - 1; /* Number of characters berore next "^" */ 135 arg_string = arg_string || substr (ctl, 1, i); /* Copy to string under construction */ 136 ctlp = substraddr (ctl, i+1); /* Skip over them */ 137 ctll = ctll - i; 138 end; 139 end; 140 141 /* All items have been turned into character rsults */ 142 143 return; 144 145 146 /* Procedure to perform special editing requests */ 147 148 special_edit: proc (n); 149 150 dcl n fixed bin; /* The special type */ 151 dcl i fixed bin; 152 dcl idx fixed bin; 153 dcl (diff, min_diff) fixed bin; 154 dcl addr_val fixed bin; 155 dcl opname char (6); 156 dcl opval bit (18); 157 158 go to special_ed (n); 159 160 special_ed (1): /* ^1* means edit as module|offset */ 161 162 min_diff = 32768; 163 idx = 0; 164 addr_val = bin (tmsg.data (argno)); 165 do i = 1 to modch.nmodules; 166 diff = addr_val - modch.address (i); 167 if diff >= 0 then 168 if diff < min_diff then do; 169 idx = i; 170 min_diff = diff; 171 end; 172 end; 173 if idx = 0 then call ioa_$rsnpnnl ("^6w", edit_temp, (0), addr_val); /* No conversion */ 174 else call ioa_$rsnpnnl ("^o (^a|^o)", edit_temp, (0), addr_val, modch.name (idx), min_diff); 175 arg_string = arg_string || edit_temp; 176 return; 177 178 special_ed (2): /* ^2* means explain opblock number */ 179 180 i = bin (tmsg.data (argno)); 181 substr (opval, 1, 9) = "777"b3; /* rebuild opblock */ 182 substr (opval, 10, 9) = bit (bin (i, 9), 9); 183 call db_fnp_opblock_util_$get_name (opval, opname); 184 if opname = "" then opname = "?"; 185 186 call ioa_$rsnpnnl ("^3w (^a)", edit_temp, (0), i, opname); 187 arg_string = arg_string || edit_temp; 188 return; 189 190 special_ed (3): /* ^3* means third word of jump table */ 191 192 jumptblp = addr (tmsg.data (argno)); 193 call ioa_$rsnpnnl ("^.3b (ch=^o dv=^o subch=^o mod=^o)", edit_temp, (0), 194 tmsg.data (argno), 195 bin (jumptbl.channel, 4), 196 bin (jumptbl.device, 2), 197 bin (jumptbl.subchan, 5), 198 bin (jumptbl.module, 7)); 199 arg_string = arg_string || edit_temp; 200 return; 201 202 special_ed (4): /* ^4* means dia opcode */ 203 call db_fnp_sym_util_$lookup_member (bin (tmsg.data (argno)), "diaop", opname); 204 call ioa_$rsnpnnl ("^o (^a)", edit_temp, (0), bin (tmsg.data (argno)), opname); 205 arg_string = arg_string || edit_temp; 206 return; 207 208 special_ed (5): /* ^5* means alter paramaters code */ 209 call db_fnp_sym_util_$lookup_member (bin (substr (tmsg.data (argno), 1, 9)), "alterp", opname); 210 call ioa_$rsnpnnl ("^o (^a)", edit_temp, (0), bin (tmsg.data (argno)), opname); 211 arg_string = arg_string || edit_temp; 212 return; 213 214 end special_edit; 215 216 /* Simulate substraddr builtin temporarily */ 217 218 substraddr: proc (c, n) returns (ptr); 219 220 dcl c char (*); 221 dcl n fixed bin; 222 dcl ca (n) char (1) unal based (addr (c)); 223 224 return (addr (ca (n))); 225 226 end substraddr; 227 228 end format_fnp_trace_msg_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1516.3 format_fnp_trace_msg_.pl1 >dumps>old>recomp>format_fnp_trace_msg_.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 93 ref 101 104 190 224 224 addr_val 000154 automatic fixed bin(17,0) dcl 154 set ref 164* 166 173* 174* address 2 based fixed bin(17,0) array level 3 dcl 65 ref 166 arg_modchp parameter pointer dcl 33 ref 28 98 arg_string parameter varying char dcl 34 set ref 28 109* 110* 110 122* 122 135* 135 175* 175 187* 187 199* 199 205* 205 211* 211 arg_tmsgp parameter pointer dcl 32 ref 28 97 argno 000104 automatic fixed bin(17,0) dcl 40 set ref 111* 117* 117 118 120 120 126* 126 164 178 190 193 202 202 204 204 208 208 210 210 bin builtin function dcl 93 ref 99 100 102 103 120 120 125 164 178 182 193 193 193 193 193 193 193 193 202 202 204 204 208 208 210 210 c parameter char unaligned dcl 220 set ref 218 224 ca based char(1) array unaligned dcl 222 set ref 224 channel based bit(4) level 2 packed unaligned dcl 74 ref 193 193 ctl based char unaligned dcl 45 set ref 113 115 116 118 118 118 120 120 125 129* 135 136* ctl_acc based structure level 1 dcl 48 ctl_accp 000130 automatic pointer dcl 47 set ref 103* 104 104 105 105 ctll 000126 automatic fixed bin(17,0) dcl 44 set ref 105* 112 113 115 116 118 118 118 120 120 125 129 129 130* 130 133 135 136 136 137* 137 ctlp 000124 automatic pointer dcl 43 set ref 104* 113 115 116 118 118 118 120 120 125 129* 129 135 136* 136 data 1 based bit(18) array level 2 packed unaligned dcl 55 set ref 118* 120 120 164 178 190 193* 202 202 204 204 208 208 210 210 db_fnp_opblock_util_$get_name 000016 constant entry external dcl 90 ref 183 db_fnp_sym_util_$lookup_member 000020 constant entry external dcl 91 ref 202 208 device 0(04) based bit(2) level 2 packed unaligned dcl 74 ref 193 193 diff 000152 automatic fixed bin(17,0) dcl 153 set ref 166* 167 167 170 edit_temp 000105 automatic varying char(50) dcl 41 set ref 118* 120* 122 173* 174* 175 186* 187 193* 199 204* 205 210* 211 entries 1 based structure array level 2 dcl 65 i 000100 automatic fixed bin(17,0) dcl 38 in procedure "format_fnp_trace_msg_" set ref 99* 102 113* 114 115* 116 118 118 118 120 120 125 129 130 133 133* 134* 134 135 136 137 i 000150 automatic fixed bin(17,0) dcl 151 in procedure "special_edit" set ref 165* 166 169* 178* 182 186* idx 000151 automatic fixed bin(17,0) dcl 152 set ref 163* 169* 173 174 index builtin function dcl 93 ref 113 ioa_$rsnpnnl 000014 constant entry external dcl 89 ref 109 118 120 173 174 186 193 204 210 j 000101 automatic fixed bin(17,0) dcl 38 set ref 100* 103 125* 127* jumptbl based structure level 1 packed unaligned dcl 74 jumptblp 000136 automatic pointer dcl 73 set ref 190* 193 193 193 193 193 193 193 193 length builtin function dcl 93 in procedure "format_fnp_trace_msg_" ref 105 length based fixed bin(8,0) level 2 in structure "ctl_acc" packed unaligned dcl 48 in procedure "format_fnp_trace_msg_" ref 104 105 message_offsets based bit(18) array dcl 85 ref 103 message_offsetsp 000140 automatic pointer dcl 84 set ref 102* 103 min_diff 000153 automatic fixed bin(17,0) dcl 153 set ref 160* 167 170* 174* modch based structure level 1 dcl 65 modchp 000134 automatic pointer dcl 64 set ref 98* 165 166 174 module 0(11) based bit(7) level 2 in structure "jumptbl" packed unaligned dcl 74 in procedure "format_fnp_trace_msg_" ref 193 193 module based bit(6) level 2 in structure "tmsg" packed unaligned dcl 55 in procedure "format_fnp_trace_msg_" ref 99 msg 0(09) based char level 2 packed unaligned dcl 48 set ref 104 105 n parameter fixed bin(17,0) dcl 221 in procedure "substraddr" ref 218 224 n parameter fixed bin(17,0) dcl 150 in procedure "special_edit" ref 148 158 name 1 based char(4) array level 3 dcl 65 set ref 174* nmodules based fixed bin(17,0) level 2 dcl 65 ref 165 od355_msgs$ 000010 external static fixed bin(17,0) dcl 82 set ref 101 od355_msgs$trace_modtab 000012 external static bit(18) array dcl 83 ref 102 opname 000156 automatic char(6) unaligned dcl 155 set ref 183* 184 184* 186* 202* 204* 208* 210* opval 000160 automatic bit(18) unaligned dcl 156 set ref 181* 182* 183* p 000102 automatic pointer dcl 39 set ref 101* 102 103 ptr builtin function dcl 93 ref 102 103 subchan 0(06) based bit(5) level 2 packed unaligned dcl 74 ref 193 193 substr builtin function dcl 93 set ref 115 116 118 118 118 120 120 125 135 181* 182* 208 208 time 0(18) based bit(18) level 2 packed unaligned dcl 55 set ref 109* tmsg based structure level 1 packed unaligned dcl 55 tmsgp 000132 automatic pointer dcl 54 set ref 97* 99 100 109 118 120 120 164 178 190 193 202 202 204 204 208 208 210 210 type 0(06) based bit(6) level 2 packed unaligned dcl 55 ref 100 verify builtin function dcl 93 ref 115 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. hbound builtin function dcl 93 lbound builtin function dcl 93 NAMES DECLARED BY EXPLICIT CONTEXT. format_fnp_trace_msg_ 000073 constant entry external dcl 28 special_ed 000000 constant label array(5) dcl 160 ref 158 special_edit 000544 constant entry internal dcl 148 ref 127 substraddr 001432 constant entry internal dcl 218 ref 129 136 NAME DECLARED BY CONTEXT OR IMPLICATION. bit builtin function ref 182 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1766 2010 1663 1776 Length 2172 1663 22 146 103 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME format_fnp_trace_msg_ 396 external procedure is an external procedure. special_edit internal procedure shares stack frame of external procedure format_fnp_trace_msg_. substraddr internal procedure shares stack frame of external procedure format_fnp_trace_msg_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME format_fnp_trace_msg_ 000100 i format_fnp_trace_msg_ 000101 j format_fnp_trace_msg_ 000102 p format_fnp_trace_msg_ 000104 argno format_fnp_trace_msg_ 000105 edit_temp format_fnp_trace_msg_ 000124 ctlp format_fnp_trace_msg_ 000126 ctll format_fnp_trace_msg_ 000130 ctl_accp format_fnp_trace_msg_ 000132 tmsgp format_fnp_trace_msg_ 000134 modchp format_fnp_trace_msg_ 000136 jumptblp format_fnp_trace_msg_ 000140 message_offsetsp format_fnp_trace_msg_ 000150 i special_edit 000151 idx special_edit 000152 diff special_edit 000153 min_diff special_edit 000154 addr_val special_edit 000156 opname special_edit 000160 opval special_edit THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc return shorten_stack ext_entry_desc any_to_any_tr THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. db_fnp_opblock_util_$get_name db_fnp_sym_util_$lookup_member ioa_$rsnpnnl THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. od355_msgs$ od355_msgs$trace_modtab LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 28 000067 97 000106 98 000112 99 000115 100 000123 101 000131 102 000133 103 000141 104 000147 105 000152 109 000155 110 000207 111 000220 112 000221 113 000223 114 000235 115 000237 116 000253 117 000261 118 000262 120 000327 122 000377 123 000414 125 000415 126 000431 127 000432 129 000434 130 000462 131 000466 133 000467 134 000474 135 000476 136 000512 137 000540 139 000542 143 000543 148 000544 158 000546 160 000550 163 000552 164 000553 165 000564 166 000573 167 000600 169 000603 170 000605 172 000607 173 000611 174 000644 175 000712 176 000726 178 000727 181 000740 182 000742 183 000750 184 000765 186 001000 187 001034 188 001050 190 001051 193 001057 199 001161 200 001175 202 001176 204 001233 205 001277 206 001313 208 001314 210 001351 211 001415 212 001431 218 001432 224 001443 ----------------------------------------------------------- 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