COMPILATION LISTING OF SEGMENT ebcdic8_to_ascii_ 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 1008.8 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 ebcdic8_to_ascii_: proc (input, output); 14 15 /* This subroutine converts from packed 8 bit EBCDIC to 9 bit ASCII. 16* 17* Usage: 18* dcl ebcdic8_to_ascii_ entry(bit(*),char(*)) 19* call ebcdic8_to_ascii_(input bit string, output char string) 20* 21* Note: 22* The input is converted in 8 bit groups, any leftover bits in the input string are 23* ignored, the number of characters converted will be: divide(length(input), 8, 24). 24* 25* The conversion table defined in ebcdic_to_ascii is used for the tranlation. 26* 27* Written by: R.J.C. Kissel 11/09/76 28**/ 29 30 /* Formal parameters */ 31 32 dcl input bit (*); 33 dcl output char (*); 34 35 /* External variables */ 36 37 dcl ebcdic_to_ascii_$ea_table char (256) external static; 38 39 /* Automatic */ 40 41 dcl char_code fixed bin; 42 dcl char_limit fixed bin; 43 dcl input_chars (1:divide (length (input), 8, 24)) bit (8) based (addr (input)); 44 /* divide the input string into 8 bit chars */ 45 dcl char_index fixed bin; 46 dcl (addr, divide, fixed, hbound, lbound, length, substr, min) builtin; 47 48 output = ""; 49 50 char_limit = min (hbound (input_chars, 1), length (output)); /* only output as much as posible */ 51 do char_index = lbound (input_chars, 1) to char_limit by 1; 52 char_code = fixed (input_chars (char_index), 17); 53 substr (output, char_index, 1) = substr (ebcdic_to_ascii_$ea_table, char_code+1, 1); 54 end; 55 56 end ebcdic8_to_ascii_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0810.5 ebcdic8_to_ascii_.pl1 >spec>install>1112>ebcdic8_to_ascii_.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 46 ref 50 51 52 char_code 000100 automatic fixed bin(17,0) dcl 41 set ref 52* 53 char_index 000102 automatic fixed bin(17,0) dcl 45 set ref 51* 52 53* char_limit 000101 automatic fixed bin(17,0) dcl 42 set ref 50* 51 divide builtin function dcl 46 ref 50 ebcdic_to_ascii_$ea_table 000010 external static char(256) packed unaligned dcl 37 ref 53 fixed builtin function dcl 46 ref 52 hbound builtin function dcl 46 ref 50 input parameter bit packed unaligned dcl 32 set ref 13 50 50 51 52 input_chars based bit(8) array packed unaligned dcl 43 ref 50 51 52 lbound builtin function dcl 46 ref 51 length builtin function dcl 46 ref 50 50 min builtin function dcl 46 ref 50 output parameter char packed unaligned dcl 33 set ref 13 48* 50 53* substr builtin function dcl 46 set ref 53* 53 NAME DECLARED BY EXPLICIT CONTEXT. ebcdic8_to_ascii_ 000006 constant entry external dcl 13 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 134 146 72 144 Length 312 72 12 127 41 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ebcdic8_to_ascii_ 70 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ebcdic8_to_ascii_ 000100 char_code ebcdic8_to_ascii_ 000101 char_limit ebcdic8_to_ascii_ 000102 char_index ebcdic8_to_ascii_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac ext_entry_desc NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. ebcdic_to_ascii_$ea_table LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000002 48 000026 50 000033 51 000041 52 000047 53 000060 54 000067 56 000071 ----------------------------------------------------------- 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