COMPILATION LISTING OF SEGMENT mu_convert Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1040.5 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 19 /* BEGIN DESCRIPTION 20* 21* This procedure converts data located by the source_ptr with a descriptor 22* located by source_desc_ptr, to the data located by target_ptr and described 23* by the descriptor located by target_desc_ptr. 24* 25* The conversion is done using assign_round_. 26* NOTE: assign_ currently only handles data types 1-12, 19-22, 33-34, & 41-46. 27* 28* Error conditions are returned as mrds_error codes, for example, 29* the conversion condition is returned as the error code 30* mrds_error_$conversion_condition. 31* 32* END DESCRIPTION 33**/ 34 35 /* HISTORY 36* Written by R. D. Lackey June 1979 37* Modified by Jim Gray Oct. 1979 to add illegal_procedure condition capture. 38* Modified by Rickie E. Brinegar December 8, 1979 to have each condition captured use its own error code. 39* Modified by Jim Gray Dec. 1979, to correct the length parameter handling 40* for assign_, when the data type is string 41* Modified by M Pierret 8 October 1980 to combine all condition handlers into one. 42* Modified by D. Woodka 07/02/82 to change the any-other condition to continue 43* instead of doing a goto EXIT. 44**/ 45 46 mu_convert: 47 convert_data: 48 proc (a_source_ptr, a_source_desc_ptr, a_target_ptr, a_target_desc_ptr, 49 a_code); 50 51 52 /* PARAMETERS 53* 54* a_source_ptr ptr Pointer to source data 55* a_source_desc_ptr ptr Pointer to source descriptor 56* a_target_ptr ptr Pointer to targer data 57* a_target_desc_ptr ptr Pointer to target descriptor 58* a_code fixed bin (35) Error code 59**/ 60 61 a_code = 0; 62 source_ptr = a_source_ptr; /* copy arguments */ 63 source_desc_ptr = a_source_desc_ptr; 64 target_ptr = a_target_ptr; 65 target_desc_ptr = a_target_desc_ptr; 66 67 target_type = 68 2 * target_desc_ptr -> descriptor.type 69 + fixed (target_desc_ptr -> descriptor.packed); 70 71 if target_desc_ptr -> descriptor.type >= 19 72 & target_desc_ptr -> descriptor.type <= 22 then 73 target_length = fixed (string (target_desc_ptr -> descriptor.size)); 74 else do; 75 target_len.scale = 76 addr (target_desc_ptr -> descriptor.scale) -> signed_scale; 77 target_len.precision = fixed (target_desc_ptr -> descriptor.precision); 78 end; 79 80 source_type = 81 2 * source_desc_ptr -> descriptor.type 82 + fixed (source_desc_ptr -> descriptor.packed); 83 84 if source_desc_ptr -> descriptor.type >= 19 85 & source_desc_ptr -> descriptor.type <= 22 then 86 source_length = fixed (string (source_desc_ptr -> descriptor.size)); 87 else do; 88 source_len.scale = 89 addr (source_desc_ptr -> descriptor.scale) -> signed_scale; 90 source_len.precision = fixed (source_desc_ptr -> descriptor.precision); 91 end; 92 93 on any_other 94 begin; 95 96 call find_condition_info_ ((null), addr (cond_info), a_code); 97 do cond_idx = 1 to 7 98 while (cond_info.condition_name ^= cond_name (cond_idx)); 99 end; 100 if cond_idx > 7 then 101 call continue_to_signal_ (a_code); 102 103 goto COND (cond_idx); 104 105 COND (1): /* size */ 106 a_code = mrds_error_$size_condition; 107 goto EXIT; 108 109 COND (2): /* conversion */ 110 a_code = mrds_error_$conversion_condition; 111 goto EXIT; 112 113 114 COND (3): /* fixedoverflow */ 115 a_code = mrds_error_$fixedoverflow_condition; 116 goto EXIT; 117 118 COND (4): /* error */ 119 a_code = mrds_error_$error_condition; 120 goto EXIT; 121 122 COND (5): /* illegal_procedure */ 123 a_code = mrds_error_$illegal_procedure_condition; 124 goto EXIT; 125 126 COND (6): /* overflow */ 127 a_code = mrds_error_$overflow_condition; 128 goto EXIT; 129 130 COND (7): /* underflow */ 131 a_code = mrds_error_$underflow_condition; 132 goto EXIT; 133 134 COND (8): /* any other */ 135 call continue_to_signal_ (a_code); 136 137 138 end; /* end of condition handler */ 139 140 141 call 142 assign_round_ (target_ptr, target_type, target_length, source_ptr, 143 source_type, source_length); 144 145 EXIT: 146 return; 147 148 /* PARAMETERS */ 149 150 dcl a_source_ptr ptr; /* (INPUT) Pointer to source data */ 151 dcl a_source_desc_ptr ptr; /* (INPUT) Pointer to source descriptor */ 152 dcl a_target_ptr ptr; /* (INPUT) Pointer to target data */ 153 dcl a_target_desc_ptr ptr; /* (INPUT) Pointer to target descriptor */ 154 dcl a_code fixed bin (35); /* (OUTPUT) Error code */ 155 156 /* OTHERS */ 157 158 dcl source_desc_ptr ptr; 159 dcl target_desc_ptr ptr; 160 161 dcl source_ptr ptr; 162 dcl target_ptr ptr; 163 164 dcl source_type fixed bin; 165 dcl target_type fixed bin; 166 dcl cond_idx fixed bin; 167 168 dcl source_length fixed bin (35); 169 170 dcl 1 source_len aligned based (addr (source_length)), /* Length of source */ 171 2 scale fixed bin (17) unal, 172 2 precision fixed bin (17) unal; 173 174 declare signed_scale fixed bin (11) unal based; /* signed fixed binary version of bit(12) */ 175 176 dcl target_length fixed bin (35); 177 178 dcl 1 target_len aligned based (addr (target_length)), /* Length of target */ 179 2 scale fixed bin (17) unal, 180 2 precision fixed bin (17) unal; 181 182 dcl 1 cond_info aligned, 183 2 mc_ptr ptr, 184 2 version fixed bin, 185 2 condition_name char (32) varying, 186 2 info_ptr ptr, 187 2 wc_ptr ptr, 188 2 loc_ptr ptr, 189 2 flags aligned, 190 3 crawlout bit (1) unal, 191 3 mbz1 bit (35) unal, 192 2 mbz2 bit (36) aligned, 193 2 user_loc_ptr ptr, 194 2 mbz (4) bit (36) aligned; 195 196 dcl cond_name (7) char (32) varying int static options (constant) 197 init ("size", "conversion", "fixedoverflow", "error", 198 "illegal_procedure", "overflow", "underflow"); 199 200 /* Builtin */ 201 202 dcl (addr, fixed, null, string) builtin; 203 204 /* External Entries */ 205 206 dcl assign_round_ 207 entry (ptr, fixed bin, fixed bin (35), ptr, fixed bin, fixed bin (35)); 208 dcl find_condition_info_ entry (ptr, ptr, fixed bin (35)); 209 dcl continue_to_signal_ entry (fixed bin (35)); 210 211 /* External */ 212 213 dcl ( 214 mrds_error_$conversion_condition, 215 mrds_error_$error_condition, 216 mrds_error_$fixedoverflow_condition, 217 mrds_error_$illegal_procedure_condition, 218 mrds_error_$overflow_condition, 219 mrds_error_$size_condition, 220 mrds_error_$underflow_condition 221 ) ext fixed bin (35); 222 dcl any_other condition; 223 1 1 /* BEGIN mdbm_descriptor.incl.pl1 -- jaw 5/31/78 */ 1 2 /* modified by Jim Gray - - Nov. 1979, to change type from fixed bin(5) to 1 3* unsigned fixed bin(6), so new packed decimal data types could be handled. 1 4* also the duplicate mrds_descriptor.incl.pl1 was eliminated. */ 1 5 1 6 dcl 1 descriptor based (desc_ptr), /* map of Multics descriptor */ 1 7 2 version bit (1) unal, /* DBM handles vers. 1 only */ 1 8 2 type unsigned fixed bin (6) unal, /* data type */ 1 9 2 packed bit (1) unal, /* on if data item is packed */ 1 10 2 number_dims bit (4) unal, /* dimensions */ 1 11 2 size, /* size for string data */ 1 12 3 scale bit (12) unal, /* scale for num. data */ 1 13 3 precision bit (12) unal, /* prec. for num. data */ 1 14 2 array_info (num_dims), 1 15 3 lower_bound fixed bin (35), /* lower bound of dimension */ 1 16 3 upper_bound fixed bin (35), /* upper bound of dimension */ 1 17 3 multiplier fixed bin (35); /* element separation */ 1 18 1 19 dcl desc_ptr ptr; 1 20 dcl num_dims fixed bin init (0) ; /* more useful form of number_dims */ 1 21 1 22 /* END mdbm_descriptor.incl.pl1 */ 1 23 1 24 224 225 226 end mu_convert; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0908.0 mu_convert.pl1 >special_ldd>online>mrds.pbf-04/18/85>mu_convert.pl1 224 1 10/14/83 1608.6 mdbm_descriptor.incl.pl1 >ldd>include>mdbm_descriptor.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. a_code parameter fixed bin(35,0) dcl 154 set ref 46 46 61* 96* 100* 105* 109* 114* 118* 122* 126* 130* 134* a_source_desc_ptr parameter pointer dcl 151 ref 46 46 63 a_source_ptr parameter pointer dcl 150 ref 46 46 62 a_target_desc_ptr parameter pointer dcl 153 ref 46 46 65 a_target_ptr parameter pointer dcl 152 ref 46 46 64 addr builtin function dcl 202 ref 75 75 77 88 88 90 96 96 any_other 000150 stack reference condition dcl 222 ref 93 assign_round_ 000010 constant entry external dcl 206 ref 141 cond_idx 000112 automatic fixed bin(17,0) dcl 166 set ref 97* 97* 100 103 cond_info 000116 automatic structure level 1 dcl 182 set ref 96 96 cond_name 000010 constant varying char(32) initial array dcl 196 ref 97 condition_name 3 000116 automatic varying char(32) level 2 dcl 182 set ref 97 continue_to_signal_ 000014 constant entry external dcl 209 ref 100 134 descriptor based structure level 1 unaligned dcl 1-6 find_condition_info_ 000012 constant entry external dcl 208 ref 96 fixed builtin function dcl 202 ref 67 71 77 80 84 90 mrds_error_$conversion_condition 000016 external static fixed bin(35,0) dcl 213 ref 109 mrds_error_$error_condition 000020 external static fixed bin(35,0) dcl 213 ref 118 mrds_error_$fixedoverflow_condition 000022 external static fixed bin(35,0) dcl 213 ref 114 mrds_error_$illegal_procedure_condition 000024 external static fixed bin(35,0) dcl 213 ref 122 mrds_error_$overflow_condition 000026 external static fixed bin(35,0) dcl 213 ref 126 mrds_error_$size_condition 000030 external static fixed bin(35,0) dcl 213 ref 105 mrds_error_$underflow_condition 000032 external static fixed bin(35,0) dcl 213 ref 130 null builtin function dcl 202 ref 96 num_dims 000156 automatic fixed bin(17,0) initial dcl 1-20 set ref 1-20* packed 0(07) based bit(1) level 2 packed unaligned dcl 1-6 ref 67 80 precision 0(18) based fixed bin(17,0) level 2 in structure "source_len" packed unaligned dcl 170 in procedure "convert_data" set ref 90* precision 0(24) based bit(12) level 3 in structure "descriptor" packed unaligned dcl 1-6 in procedure "convert_data" ref 77 90 precision 0(18) based fixed bin(17,0) level 2 in structure "target_len" packed unaligned dcl 178 in procedure "convert_data" set ref 77* scale based fixed bin(17,0) level 2 in structure "source_len" packed unaligned dcl 170 in procedure "convert_data" set ref 88* scale 0(12) based bit(12) level 3 in structure "descriptor" packed unaligned dcl 1-6 in procedure "convert_data" set ref 75 88 scale based fixed bin(17,0) level 2 in structure "target_len" packed unaligned dcl 178 in procedure "convert_data" set ref 75* signed_scale based fixed bin(11,0) unaligned dcl 174 ref 75 88 size 0(12) based structure level 2 packed unaligned dcl 1-6 set ref 71 84 source_desc_ptr 000100 automatic pointer dcl 158 set ref 63* 80 80 84 84 84 88 90 source_len based structure level 1 dcl 170 source_length 000113 automatic fixed bin(35,0) dcl 168 set ref 84* 88 90 141* source_ptr 000104 automatic pointer dcl 161 set ref 62* 141* source_type 000110 automatic fixed bin(17,0) dcl 164 set ref 80* 141* string builtin function dcl 202 ref 71 84 target_desc_ptr 000102 automatic pointer dcl 159 set ref 65* 67 67 71 71 71 75 77 target_len based structure level 1 dcl 178 target_length 000114 automatic fixed bin(35,0) dcl 176 set ref 71* 75 77 141* target_ptr 000106 automatic pointer dcl 162 set ref 64* 141* target_type 000111 automatic fixed bin(17,0) dcl 165 set ref 67* 141* type 0(01) based fixed bin(6,0) level 2 packed unsigned unaligned dcl 1-6 ref 67 71 71 80 84 84 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. desc_ptr automatic pointer dcl 1-19 NAMES DECLARED BY EXPLICIT CONTEXT. COND 000000 constant label array(8) dcl 105 set ref 103 EXIT 000463 constant label dcl 145 ref 107 111 116 120 124 128 132 convert_data 000130 constant entry external dcl 46 mu_convert 000141 constant entry external dcl 46 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 652 706 464 662 Length 1114 464 34 172 166 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME convert_data 128 external procedure is an external procedure. on unit on line 93 76 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME convert_data 000100 source_desc_ptr convert_data 000102 target_desc_ptr convert_data 000104 source_ptr convert_data 000106 target_ptr convert_data 000110 source_type convert_data 000111 target_type convert_data 000112 cond_idx convert_data 000113 source_length convert_data 000114 target_length convert_data 000116 cond_info convert_data 000156 num_dims convert_data THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return tra_ext enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. assign_round_ continue_to_signal_ find_condition_info_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_error_$conversion_condition mrds_error_$error_condition mrds_error_$fixedoverflow_condition mrds_error_$illegal_procedure_condition mrds_error_$overflow_condition mrds_error_$size_condition mrds_error_$underflow_condition LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 1 20 000120 46 000123 61 000147 62 000151 63 000154 64 000157 65 000162 67 000165 71 000200 75 000211 77 000215 80 000220 84 000233 88 000244 90 000250 93 000253 96 000267 97 000310 99 000330 100 000332 103 000345 105 000350 107 000354 109 000357 111 000363 114 000366 116 000372 118 000375 120 000401 122 000404 124 000410 126 000413 128 000417 130 000422 132 000426 134 000431 138 000441 141 000442 145 000463 ----------------------------------------------------------- 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