COMPILATION LISTING OF SEGMENT io_chnl_util Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1016.0 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(85-11-27,Fawcett), approve(85-11-27,MCR6979), 17* audit(85-12-11,CLJones), install(86-03-21,MR12.0-1033): 18* Change support of 127 channels to 63, dipper support 19* END HISTORY COMMENTS */ 20 21 22 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 23 io_chnl_util: 24 procedure; 25 26 /* Convert I/O channel names to old CONFIG card format */ 27 /* Written by C. Hornig, March 1981. */ 28 /* Fixed to work in wired environment, 10 July, 1981, W. Olin Sibert */ 29 /* Canonicalize entry added by Chris Jones, January 1984 */ 30 31 dcl Iom fixed bin (3) parameter; 32 dcl Channel fixed bin (7) parameter; 33 dcl Name char (8) aligned parameter; 34 dcl Code fixed bin (35) parameter; 35 36 dcl digit fixed bin; 37 dcl value fixed bin; 38 39 dcl MAX_CHANNEL_NUMBER fixed bin static options (constant) init (63); 40 41 dcl (character, index, length, ltrim, rtrim, substr, translate) 42 builtin; 43 44 io_chnl_util$canonicalize_chanid: 45 entry (Name) returns (char (8) aligned); 46 47 return (translate (Name, "ABCD", "abcd")); 48 49 io_chnl_util$iom_to_name: 50 entry (Iom, Channel, Name, Code); 51 52 Name = ""; 53 Code = 0; 54 55 if (Iom < 1) | (Iom > 4) | (Channel < 0) | (Channel > MAX_CHANNEL_NUMBER) then do; 56 Code = 1; 57 return; 58 end; 59 60 Name = substr ("ABCD", Iom, 1) || ltrim (character (Channel)); 61 return; 62 63 64 io_chnl_util$name_to_iom: 65 entry (Name, Iom, Channel, Code); 66 67 Code, Iom, Channel = 0; 68 69 Iom = index ("ABCD", translate (substr (Name, 1, 1), "ABCD", "abcd")); 70 if Iom < 1 then 71 goto bad_name; 72 73 if length (rtrim (Name)) < 2 then 74 goto bad_name; 75 76 /* This conversion must be done inline because there is no wired procedure 77* for converting from character strings to binary, and this code is wired. 78**/ 79 80 do digit = 2 to length (rtrim (Name)); 81 value = index ("0123456789", substr (Name, digit, 1)); 82 if value = 0 then 83 goto bad_name; 84 Channel = 10 * Channel + (value - 1); 85 end; 86 87 if Channel > MAX_CHANNEL_NUMBER then 88 goto bad_name; 89 90 return; 91 92 bad_name: 93 Iom, Channel = 0; 94 Code = 1; /* An error */ 95 return; 96 97 end io_chnl_util; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0802.4 io_chnl_util.pl1 >spec>install>1110>io_chnl_util.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. Channel parameter fixed bin(7,0) dcl 32 set ref 49 55 55 60 64 67* 84* 84 87 92* Code parameter fixed bin(35,0) dcl 34 set ref 49 53* 56* 64 67* 94* Iom parameter fixed bin(3,0) dcl 31 set ref 49 55 55 60 64 67* 69* 70 92* MAX_CHANNEL_NUMBER constant fixed bin(17,0) initial dcl 39 ref 55 87 Name parameter char(8) dcl 33 set ref 44 47 49 52* 60* 64 69 73 80 81 character builtin function dcl 41 ref 60 digit 000100 automatic fixed bin(17,0) dcl 36 set ref 80* 81* index builtin function dcl 41 ref 69 81 length builtin function dcl 41 ref 73 80 ltrim builtin function dcl 41 ref 60 rtrim builtin function dcl 41 ref 73 80 substr builtin function dcl 41 ref 60 69 81 translate builtin function dcl 41 ref 47 69 value 000101 automatic fixed bin(17,0) dcl 37 set ref 81* 82 84 NAMES DECLARED BY EXPLICIT CONTEXT. bad_name 000350 constant label dcl 92 ref 70 73 82 87 io_chnl_util 000022 constant entry external dcl 23 io_chnl_util$canonicalize_chanid 000036 constant entry external dcl 44 io_chnl_util$iom_to_name 000076 constant entry external dcl 49 io_chnl_util$name_to_iom 000224 constant entry external dcl 64 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 700 710 566 710 Length 1062 566 10 136 111 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME io_chnl_util 82 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME io_chnl_util 000100 digit io_chnl_util 000101 value io_chnl_util THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp return_mac signal_op shorten_stack ext_entry NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 23 000021 44 000031 47 000047 49 000071 52 000114 53 000120 55 000122 56 000133 57 000135 60 000144 61 000207 64 000217 67 000242 69 000246 70 000265 73 000267 80 000302 81 000313 82 000325 84 000326 85 000334 87 000336 90 000341 92 000350 94 000352 95 000355 ----------------------------------------------------------- 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