COMPILATION LISTING OF SEGMENT analyze_device_stat_ Compiled by: Multics PL/I Compiler, Release 28b, of April 11, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 09/12/83 1107.7 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* ANALYZE_DEVICE_STAT_ - Procedure to analyze status from peripheral device. 7* coded 12/1/74 by Noel I. Morris */ 8 /* Modified January 1976 by Larry Johnson to add rsnnl entry. */ 9 /* Modified 4/79 by R.J.C. Kissel to handle major status 0. */ 10 11 12 /* ****************************************************** 13* * * 14* * * 15* * Copyright (c) 1972 by Massachusetts Institute of * 16* * Technology and Honeywell Information Systems, Inc. * 17* * * 18* * * 19* ****************************************************** */ 20 21 22 /* format: style3,ind3,initlm3,dclind6,idind32 */ 23 analyze_device_stat_: 24 proc (name, tablep, stat, flags); /* procedure to analyze device status */ 25 26 dcl name char (*), /* device name */ 27 tablep ptr, /* pointer to status interpretation table */ 28 stat bit (72) aligned, /* IOM status */ 29 flags bit (18) aligned; /* status information flags */ 30 31 dcl majstat bit (4) aligned, /* major status */ 32 substat bit (6) aligned, /* substatus */ 33 cstat bit (3) aligned, /* central or channel status */ 34 imaj fixed bin (4), /* major status as integer */ 35 i fixed bin, /* iteration variable */ 36 message char (256) var, /* status interpretation message */ 37 line char (60) aligned, /* for calls to ioa_ */ 38 line_lth fixed bin, /* length of line */ 39 srel bit (18) aligned, /* rel pointer to substatus info block */ 40 sp ptr, /* ITS pointer to substatus info block */ 41 mask bit (6) aligned, /* mask for substatus */ 42 comp bit (6) aligned, /* comparison bits for substatus */ 43 nnl_sw bit (1) init ("0"b), /* set if entered thru rsnnl entry */ 44 print_flag bit (1) aligned; /* flag indicating if line was printed */ 45 46 dcl 1 stable (0:15) based (tablep) aligned, 47 /* major status table */ 48 ( 2 offset bit (18), /* offset of substatus information */ 49 2 count fixed bin (17) 50 ) unal; /* count of recognizable substatuses */ 51 52 dcl 1 sinfo based (sp) aligned, /* substatus information block */ 53 2 maj char (24), /* name of major status */ 54 2 sub (stable (imaj).count),/* substatus information */ 55 3 control char (6), /* used to generate mask and comparison */ 56 3 flags bit (18), /* action flags */ 57 3 desc char (32); /* description of substatus */ 58 59 dcl com_err_ entry options (variable), 60 ioa_$rsnnl entry options (variable); 61 62 dcl (addr, bin, bit, null, ptr, substr, translate) 63 builtin; 64 1 1 1 2 /* Begin include file ...... iom_stat.incl.pl1 */ 1 3 /* Last modified on 10/31/74 by Noel I. Morris */ 1 4 1 5 dcl statp ptr; /* pointer to status */ 1 6 1 7 dcl 1 status based (statp) aligned, /* IOM status information */ 1 8 (2 t bit (1), /* set to "1"b by IOM */ 1 9 2 power bit (1), /* non-zero if peripheral absent or power off */ 1 10 2 major bit (4), /* major status */ 1 11 2 sub bit (6), /* substatus */ 1 12 2 eo bit (1), /* even/odd bit */ 1 13 2 marker bit (1), /* non-zero if marker status */ 1 14 2 soft bit (2), /* software status */ 1 15 2 initiate bit (1), /* initiate bit */ 1 16 2 abort bit (1), /* software abort bit */ 1 17 2 channel_stat bit (3), /* IOM channel status */ 1 18 2 central_stat bit (3), /* IOM central status */ 1 19 2 mbz bit (6), 1 20 2 rcount bit (6), /* record count residue */ 1 21 2 address bit (18), /* DCW address residue */ 1 22 2 char_pos bit (3), /* character position residue */ 1 23 2 r bit (1), /* non-zero if reading */ 1 24 2 type bit (2), /* type of last DCW */ 1 25 2 tally bit (12)) unal; /* DCW tally residue */ 1 26 1 27 dcl 1 faultword based (statp) aligned, /* system fault word */ 1 28 (2 mbz1 bit (9), 1 29 2 channel bit (9), /* channel number */ 1 30 2 serv_req bit (5), /* service request */ 1 31 2 mbz2 bit (3), 1 32 2 controller_fault bit (4), /* system controller fault code */ 1 33 2 io_fault bit (6)) unal; /* I/O fault code */ 1 34 1 35 dcl 1 special_status based (statp) aligned, /* special status from PSIA */ 1 36 (2 t bit (1), /* entry present bit */ 1 37 2 channel bit (8), /* channel number */ 1 38 2 pad1 bit (3), 1 39 2 device bit (6), /* device address */ 1 40 2 pad2 bit (1), 1 41 2 byte2 bit (8), /* device dependent information */ 1 42 2 pad3 bit (1), 1 43 2 byte3 bit (8)) unal; /* device dependent information */ 1 44 1 45 /* End of include file iom_stat.incl.pl1 */ 1 46 65 2 1 2 2 /* Begin include file ...... status_flags.incl.pl1 */ 2 3 /* created 6/11/75 by Noel I. Morris */ 2 4 2 5 dcl (backup_flag init ("100000000000000000"b), /* indicates retry of previous operation */ 2 6 init_flag init ("010000000000000000"b), /* indicates backup if failure during initiation */ 2 7 report_flag init ("001000000000000000"b), /* indicates error should be reported */ 2 8 halt_flag init ("000100000000000000"b), /* indicates error caused device to halt */ 2 9 eurc_no_backup_flag init ("000010000000000000"b)) /* indicates eurc device should ignore backup_flag */ 2 10 bit (18) aligned static; 2 11 2 12 /* End of include file ...... status_flags.incl.pl1 */ 2 13 66 67 68 call rs (message, tablep, stat, flags); /* Call to get string to print. */ 69 70 call com_err_ (0, name, "^/^a", message); /* Print out the message. */ 71 72 return; 73 74 rsnnl: 75 entry (mess, tablep, stat, flags); /* entry to return string without tabs and newlines */ 76 77 nnl_sw = "1"b; /* remember entry from here */ 78 79 rs: 80 entry (mess, tablep, stat, flags); /* entry to return string */ 81 82 dcl mess char (*) var; /* message is returned into this string */ 83 84 85 statp = addr (stat); /* Get pointer to status info. */ 86 mess = ""; /* Initialize message string. */ 87 flags = "0"b; /* Reset flag bits. */ 88 89 majstat = status.major; /* Extract major status. */ 90 substat = status.sub; /* And substatus. */ 91 imaj = bin (majstat, 4); /* Get major status as integer. */ 92 93 if tablep = null 94 then 95 do; /* If no status table. */ 96 call ioa_$rsnnl ("Major status = ^o, substatus = ^2.3b", line, line_lth, imaj, substat); 97 call report (line); 98 flags = flags | report_flag | halt_flag; 99 return; 100 end; 101 102 srel = stable (imaj).offset; /* Get offset of info for this major status. */ 103 104 /* Only print major and sub status if they are non-zero, or if there is no other status to print. */ 105 106 if majstat | substat | ((status.central_stat | status.channel_stat | status.power) = "0"b) 107 then 108 do; 109 if srel 110 then 111 do; /* If information exists ... */ 112 sp = ptr (tablep, srel); /* Generate pointer to substatus info. */ 113 call report (sinfo.maj); /* Report the major status. */ 114 115 print_flag = "0"b; /* Reset the flag. */ 116 do i = 1 to stable (imaj).count; /* Look through the substatuses. */ 117 mask = bit (translate (sinfo.sub (i).control, "10", "0X"), 6); 118 /* Make 1's out of 0's and 1's, 0's out of X's. */ 119 comp = bit (translate (sinfo.sub (i).control, "0", "X"), 6); 120 /* Make X's into 0's. */ 121 if (substat & mask) = comp 122 then 123 do; /* Did we get this status? */ 124 print_flag = "1"b; /* Turn on print flag. */ 125 call report (sinfo.sub (i).desc);/* Report the substatus. */ 126 flags = flags | sinfo.sub (i).flags; 127 /* Return the flags. */ 128 if flags & init_flag 129 then 130 do; /* If initiate bit should be checked ... */ 131 if status.initiate 132 then /* And it is ON ... */ 133 flags = flags | backup_flag; 134 end; 135 end; /* Indicate retry of previous operation. */ 136 end; 137 138 if ^print_flag 139 then 140 do; /* Be sure to print unrecognized substatus. */ 141 call ioa_$rsnnl ("Substatus = ^2.3b", line, line_lth, substat); 142 call report (line); 143 flags = flags | report_flag | halt_flag; 144 end; 145 end; 146 else 147 do; /* Unrecognized major status ... */ 148 call ioa_$rsnnl ("Major status = ^o, substatus = ^2.3b", line, line_lth, imaj, substat); 149 call report (line); 150 flags = flags | report_flag | halt_flag; 151 end; 152 end; 153 154 if status.central_stat 155 then 156 do; /* Check for IOM central status */ 157 cstat = status.central_stat; /* Extract the central status. */ 158 159 if cstat = "001"b 160 then line = "LPW tally runout"; 161 else if cstat = "010"b 162 then line = "2 sequential TDCW's"; 163 else if cstat = "011"b 164 then line = "Boundary violation"; 165 else if cstat = "101"b 166 then line = "IDCW in restricted mode"; 167 else if cstat = "110"b 168 then line = "Character position/size discrepancy during list service"; 169 else if cstat = "111"b 170 then line = "Parity error on I/O bus, data _f_r_o_m channel"; 171 172 call report (line); /* Print out the central status. */ 173 flags = flags | report_flag | backup_flag | halt_flag; 174 end; /* Set appropriate flags. */ 175 176 if status.channel_stat 177 then 178 do; /* Check for IOM channel status */ 179 cstat = status.channel_stat; /* Extract the channel status. */ 180 181 if cstat = "001"b 182 then line = "Attempt to connect while busy"; 183 else if cstat = "010"b 184 then line = "Illegal channel command in PCW"; 185 else if cstat = "011"b 186 then line = "Incorrect DCW during list service"; 187 else if cstat = "100"b 188 then line = "Incomplete instruction sequence"; 189 else if cstat = "110"b 190 then line = "Parity error on peripheral interface"; 191 else if cstat = "111"b 192 then line = "Parity error on I/O bus, data _t_o channel"; 193 194 call report (line); /* Print out the channel status. */ 195 flags = flags | report_flag | backup_flag | halt_flag; 196 end; /* Set appropriate flags. */ 197 198 if status.power 199 then 200 do; /* If peripheral absent or power off ... */ 201 call report ("Device disconnected or power off"); 202 flags = flags | report_flag | backup_flag | halt_flag; 203 end; 204 205 return; 206 207 report: 208 proc (message); /* internal proc to print error message */ 209 210 dcl message char (*) aligned; /* error message */ 211 212 213 if message = "" 214 then return; 215 216 if ^nnl_sw 217 then mess = mess || " ***** "; /* Insert asterisks. */ 218 219 mess = mess || rtrim (message); /* Add message to output line. */ 220 221 if ^nnl_sw 222 then mess = mess || ". 223 "; /* Add period and newline. */ 224 else mess = mess || ". "; 225 226 end report; 227 228 end analyze_device_stat_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/12/83 1000.9 analyze_device_stat_.pl1 >special_ldd>on>09/12/83>analyze_device_stat_.pl1 65 1 01/10/75 1343.6 iom_stat.incl.pl1 >ldd>include>iom_stat.incl.pl1 66 2 09/12/83 1005.5 status_flags.incl.pl1 >special_ldd>on>09/12/83>status_flags.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. addr builtin function dcl 62 ref 85 backup_flag constant bit(18) initial dcl 2-5 ref 131 173 195 202 bin builtin function dcl 62 ref 91 bit builtin function dcl 62 ref 117 119 central_stat 0(21) based bit(3) level 2 packed unaligned dcl 1-7 ref 106 154 157 channel_stat 0(18) based bit(3) level 2 packed unaligned dcl 1-7 ref 106 176 179 com_err_ 000010 constant entry external dcl 59 ref 70 comp 000233 automatic bit(6) dcl 31 set ref 119* 121 control 6 based char(6) array level 3 dcl 52 ref 117 119 count 0(18) based fixed bin(17,0) array level 2 packed unaligned dcl 46 ref 116 cstat 000102 automatic bit(3) dcl 31 set ref 157* 159 161 163 165 167 169 179* 181 183 185 187 189 191 desc 11 based char(32) array level 3 dcl 52 set ref 125* flags parameter bit(18) dcl 26 in procedure "analyze_device_stat_" set ref 23 68* 74 79 87* 98* 98 126* 126 128 131* 131 143* 143 150* 150 173* 173 195* 195 202* 202 flags 10 based bit(18) array level 3 in structure "sinfo" dcl 52 in procedure "analyze_device_stat_" ref 126 halt_flag constant bit(18) initial dcl 2-5 ref 98 143 150 173 195 202 i 000104 automatic fixed bin(17,0) dcl 31 set ref 116* 117 119 125 126* imaj 000103 automatic fixed bin(4,0) dcl 31 set ref 91* 96* 102 116 148* init_flag constant bit(18) initial dcl 2-5 ref 128 initiate 0(16) based bit(1) level 2 packed unaligned dcl 1-7 ref 131 ioa_$rsnnl 000012 constant entry external dcl 59 ref 96 141 148 line 000206 automatic char(60) dcl 31 set ref 96* 97* 141* 142* 148* 149* 159* 161* 163* 165* 167* 169* 172* 181* 183* 185* 187* 189* 191* 194* line_lth 000225 automatic fixed bin(17,0) dcl 31 set ref 96* 141* 148* maj based char(24) level 2 dcl 52 set ref 113* major 0(02) based bit(4) level 2 packed unaligned dcl 1-7 ref 89 majstat 000100 automatic bit(4) dcl 31 set ref 89* 91 106 mask 000232 automatic bit(6) dcl 31 set ref 117* 121 mess parameter varying char dcl 82 set ref 74 79 86* 216* 216 219* 219 221* 221 224* 224 message 000105 automatic varying char(256) dcl 31 in procedure "analyze_device_stat_" set ref 68* 70* message parameter char dcl 210 in procedure "report" ref 207 213 219 name parameter char unaligned dcl 26 set ref 23 70* nnl_sw 000234 automatic bit(1) initial unaligned dcl 31 set ref 31* 77* 216 221 null builtin function dcl 62 ref 93 offset based bit(18) array level 2 packed unaligned dcl 46 ref 102 power 0(01) based bit(1) level 2 packed unaligned dcl 1-7 ref 106 198 print_flag 000235 automatic bit(1) dcl 31 set ref 115* 124* 138 ptr builtin function dcl 62 ref 112 report_flag constant bit(18) initial dcl 2-5 ref 98 143 150 173 195 202 sinfo based structure level 1 dcl 52 sp 000230 automatic pointer dcl 31 set ref 112* 113 117 119 125 126 srel 000226 automatic bit(18) dcl 31 set ref 102* 109 112 stable based structure array level 1 dcl 46 stat parameter bit(72) dcl 26 set ref 23 68* 74 79 85 statp 000236 automatic pointer dcl 1-5 set ref 85* 89 90 106 106 106 131 154 157 176 179 198 status based structure level 1 dcl 1-7 sub 0(06) based bit(6) level 2 in structure "status" packed unaligned dcl 1-7 in procedure "analyze_device_stat_" ref 90 sub 6 based structure array level 2 in structure "sinfo" dcl 52 in procedure "analyze_device_stat_" substat 000101 automatic bit(6) dcl 31 set ref 90* 96* 106 121 141* 148* tablep parameter pointer dcl 26 set ref 23 68* 74 79 93 102 112 116 translate builtin function dcl 62 ref 117 119 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. eurc_no_backup_flag internal static bit(18) initial dcl 2-5 faultword based structure level 1 dcl 1-27 special_status based structure level 1 dcl 1-35 substr builtin function dcl 62 NAMES DECLARED BY EXPLICIT CONTEXT. analyze_device_stat_ 000231 constant entry external dcl 23 report 001155 constant entry internal dcl 207 ref 97 113 125 142 149 172 194 201 rs 000353 constant entry external dcl 79 ref 68 rsnnl 000332 constant entry external dcl 74 NAME DECLARED BY CONTEXT OR IMPLICATION. rtrim builtin function ref 219 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1766 2002 1712 1776 Length 2214 1712 14 176 53 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME analyze_device_stat_ 391 external procedure is an external procedure. report internal procedure shares stack frame of external procedure analyze_device_stat_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME analyze_device_stat_ 000100 majstat analyze_device_stat_ 000101 substat analyze_device_stat_ 000102 cstat analyze_device_stat_ 000103 imaj analyze_device_stat_ 000104 i analyze_device_stat_ 000105 message analyze_device_stat_ 000206 line analyze_device_stat_ 000225 line_lth analyze_device_stat_ 000226 srel analyze_device_stat_ 000230 sp analyze_device_stat_ 000232 mask analyze_device_stat_ 000233 comp analyze_device_stat_ 000234 nnl_sw analyze_device_stat_ 000235 print_flag analyze_device_stat_ 000236 statp analyze_device_stat_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as call_ext_in_desc call_ext_out_desc return ext_entry_desc any_to_any_tr THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ ioa_$rsnnl NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 31 000221 23 000224 68 000245 70 000272 72 000324 74 000325 77 000346 79 000350 85 000367 86 000372 87 000374 89 000375 90 000401 91 000405 93 000410 96 000414 97 000450 98 000453 99 000461 102 000462 106 000467 109 000513 112 000515 113 000520 115 000530 116 000531 117 000545 119 000566 121 000606 124 000613 125 000615 126 000631 128 000637 131 000643 136 000652 138 000654 141 000656 142 000711 143 000714 145 000722 148 000723 149 000757 150 000762 154 000770 157 000774 159 000775 161 001003 163 001011 165 001017 167 001025 169 001033 172 001040 173 001043 176 001052 179 001056 181 001057 183 001065 185 001073 187 001101 189 001107 191 001115 194 001122 195 001125 198 001134 201 001137 202 001145 205 001154 207 001155 213 001166 216 001175 219 001215 221 001244 224 001261 226 001273 ----------------------------------------------------------- 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