COMPILATION LISTING OF SEGMENT cv_bin_to_ascii_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-05-04_1647.59_Thu_mdt 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 /* ***************************************************************************** 12* * * 13* * Modified by RH Morrison 6/22/76 * 14* * * 15* ***************************************************************************** */ 16 17 cv_bin_to_ascii_: proc (a_input_ptr, a_output_ptr, a_code); 18 19 20 /* DECLARATIONS */ 21 /* ------------ */ 22 23 24 /* fixed bin */ 25 26 dcl ( 27 direction, /* direction of 1/2 interval search */ 28 i, /* loop index */ 29 interval, /* interval of 1/2 interval search */ 30 j, /* loop index */ 31 search_index /* index from search into binary table */ 32 ) fixed bin aligned; 33 34 dcl ( 35 a_code /* error code */ 36 ) fixed bin (35) aligned; 37 38 39 /* pointers */ 40 41 dcl ( 42 a_input_ptr, /* pointer to input bit string (argument) */ 43 a_output_ptr, /* pointer to output character string (argument) */ 44 bit_ptr, /* pointer to input bit string (internal) */ 45 letter_ptr /* pointer to output bit string (argument) */ 46 ) ptr aligned; 47 48 49 /* bit strings */ 50 51 dcl ( 52 bin_char_not_found /* ON until a binary table match is found */ 53 ) bit (1) aligned; 54 55 dcl bin_table (0: 63) bit (12) aligned init ( 56 "000000000000"b, 57 "000000000001"b, 58 "000000000010"b, 59 "000000000100"b, 60 "000000000110"b, 61 "000000001000"b, 62 "000000001010"b, 63 "000000010000"b, 64 "000000010010"b, 65 "000000100000"b, 66 "000000100010"b, 67 "000001000000"b, 68 "000001000010"b, 69 "000010000000"b, 70 "000010000010"b, 71 "000100000000"b, 72 "001000000000"b, 73 "001000000001"b, 74 "001000000010"b, 75 "001000000100"b, 76 "001000000110"b, 77 "001000001000"b, 78 "001000001010"b, 79 "001000010000"b, 80 "001000010010"b, 81 "001000100000"b, 82 "001000100010"b, 83 "001001000000"b, 84 "001001000010"b, 85 "001010000000"b, 86 "001010000010"b, 87 "001100000000"b, 88 "010000000000"b, 89 "010000000001"b, 90 "010000000010"b, 91 "010000000100"b, 92 "010000000110"b, 93 "010000001000"b, 94 "010000001010"b, 95 "010000010000"b, 96 "010000010010"b, 97 "010000100000"b, 98 "010000100010"b, 99 "010001000000"b, 100 "010001000010"b, 101 "010010000000"b, 102 "010100000000"b, 103 "011000000000"b, 104 "100000000000"b, 105 "100000000001"b, 106 "100000000010"b, 107 "100000000100"b, 108 "100000000110"b, 109 "100000001000"b, 110 "100000001010"b, 111 "100000010000"b, 112 "100000010010"b, 113 "100000100000"b, 114 "100000100010"b, 115 "100001000000"b, 116 "100001000010"b, 117 "100010000000"b, 118 "100100000000"b, 119 "101000000000"b 120 ); 121 122 123 /* character strings */ 124 125 dcl letter_table (0: 63) char (1) aligned init ( 126 " ", 127 "9", 128 "8", 129 "7", 130 "?", 131 "6", 132 ">", 133 "5", 134 ":", 135 "4", 136 "@", 137 "3", 138 "#", 139 "2", 140 "[", 141 "1", 142 "0", 143 "z", 144 "y", 145 "x", 146 "!", 147 "w", 148 """", 149 "v", 150 "=", 151 "u", 152 "%", 153 "t", 154 ",", 155 "s", 156 "_", /* left arrow */ 157 "/", 158 "-", 159 "r", 160 "q", 161 "p", 162 "'", 163 "o", 164 ";", 165 "n", 166 ")", 167 "m", 168 "*", 169 "l", 170 "$", 171 "k", 172 "j", 173 "^", /* up arrow */ 174 "&", 175 "i", 176 "h", 177 "g", 178 "\", 179 "f", 180 "<", 181 "e", 182 "(", 183 "d", 184 "]", 185 "c", 186 ".", 187 "b", 188 "a", 189 "+" 190 ); 191 192 193 /* built in functions */ 194 195 dcl ( 196 divide 197 ) builtin; 198 199 200 /* masks */ 201 202 dcl 1 columns aligned based (bit_ptr), /* card columns */ 203 2 bin_char (0:79) bit (12) unaligned; /* binary characters on card */ 204 205 dcl 1 output aligned based (letter_ptr), /* output character string */ 206 2 letter (0:79) char (1) unaligned; /* each output character */ 207 208 dcl output_letters char (80) aligned based (letter_ptr); /* for zapping characters in case of error */ 209 210 /* */ 211 212 a_code = 0; /* initialize returned error code */ 213 bit_ptr = a_input_ptr; /* copy in 2 pointer arguments */ 214 letter_ptr = a_output_ptr; 215 216 do i = 0 to 79; /* perform conversion */ 217 218 if bin_char (i) = "0"b /* make quick check for blank */ 219 then letter (i) = " "; 220 221 else /* binary character is not a blank */ 222 do; 223 224 direction = 1; /* initialize 1/2 interval search variables */ 225 interval = 32; 226 search_index = 0; 227 bin_char_not_found = "1"b; 228 229 do j = 1 to 6 while (bin_char_not_found); /* perform search */ 230 231 search_index = search_index + direction * interval; /* set index */ 232 233 if bin_char (i) = bin_table (search_index) /* match found */ 234 then do; 235 letter (i) = letter_table (search_index); /* set output letter */ 236 bin_char_not_found = "0"b; /* turn off search flag */ 237 end; 238 239 else /* match not found */ 240 do; /* increment 1/2 interval search variables */ 241 if bin_char (i) > bin_table (search_index) 242 then direction = 1; 243 else 244 direction = -1; 245 interval = divide (interval, 2, 17, 0); 246 end; 247 248 end; 249 250 if bin_char_not_found /* illegal binary character */ 251 then go to ERROR; 252 253 end; 254 255 end; 256 257 return; 258 259 ERROR: 260 261 a_code = 1; /* return error code */ 262 output_letters = " "; /* zap output string */ 263 return; 264 265 end cv_bin_to_ascii_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/04/00 1647.6 cv_bin_to_ascii_.pl1 >udd>sm>ds>w>ml>cv_bin_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. a_code parameter fixed bin(35,0) dcl 34 set ref 17 212* 259* a_input_ptr parameter pointer dcl 41 ref 17 213 a_output_ptr parameter pointer dcl 41 ref 17 214 bin_char based bit(12) array level 2 packed packed unaligned dcl 202 ref 218 233 241 bin_char_not_found 000112 automatic bit(1) dcl 51 set ref 227* 229 236* 250 bin_table 000113 automatic bit(12) initial array dcl 55 set ref 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 55* 233 241 bit_ptr 000106 automatic pointer dcl 41 set ref 213* 218 233 241 columns based structure level 1 dcl 202 direction 000100 automatic fixed bin(17,0) dcl 26 set ref 224* 231 241* 243* divide builtin function dcl 195 ref 245 i 000101 automatic fixed bin(17,0) dcl 26 set ref 216* 218 218 233 235 241* interval 000102 automatic fixed bin(17,0) dcl 26 set ref 225* 231 245* 245 j 000103 automatic fixed bin(17,0) dcl 26 set ref 229* letter based char(1) array level 2 packed packed unaligned dcl 205 set ref 218* 235* letter_ptr 000110 automatic pointer dcl 41 set ref 214* 218 235 262 letter_table 000213 automatic char(1) initial array dcl 125 set ref 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 125* 235 output based structure level 1 dcl 205 output_letters based char(80) dcl 208 set ref 262* search_index 000104 automatic fixed bin(17,0) dcl 26 set ref 226* 231* 231 233 235 241 NAMES DECLARED BY EXPLICIT CONTEXT. ERROR 001140 constant label dcl 259 ref 250 cv_bin_to_ascii_ 000006 constant entry external dcl 17 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1176 1206 1150 1206 Length 1346 1150 10 124 26 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cv_bin_to_ascii_ 206 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cv_bin_to_ascii_ 000100 direction cv_bin_to_ascii_ 000101 i cv_bin_to_ascii_ 000102 interval cv_bin_to_ascii_ 000103 j cv_bin_to_ascii_ 000104 search_index cv_bin_to_ascii_ 000106 bit_ptr cv_bin_to_ascii_ 000110 letter_ptr cv_bin_to_ascii_ 000112 bin_char_not_found cv_bin_to_ascii_ 000113 bin_table cv_bin_to_ascii_ 000213 letter_table cv_bin_to_ascii_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac 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 17 000002 55 000013 125 000414 212 001016 213 001020 214 001023 216 001026 218 001033 224 001050 225 001052 226 001054 227 001055 229 001057 231 001067 233 001075 235 001107 236 001115 237 001116 241 001117 243 001124 245 001126 248 001131 250 001133 255 001135 257 001137 259 001140 262 001143 263 001147 ----------------------------------------------------------- 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