COMPILATION LISTING OF SEGMENT ffip Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1641.9 mst Thu 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 ffip: proc(inp, len, ip, ret_value); 12 /* ffip converts a free format inputted string into a bin float number */ 13 dcl 14 (len, code, ip, ex, j, llen) fixed bin(17), 15 (val_mult, new_div, ret_value) float bin(27), 16 (pos, e_pos, frac) bit(1), 17 in char(llen) based(inp1) unaligned, 18 (inp, inp1) ptr, 19 wrk char(1) aligned, 20 (value, new) float bin(63), 21 ten float bin(27) static init(10e0); 22 23 code = 5000; 24 llen = len; 25 inp1 = inp; 26 blank: if ip>len then do; 27 code = 5001; 28 return; 29 end; 30 if substr(in,ip,1)^=" " then go to non_blank; 31 ip = ip+1; 32 go to blank; 33 34 non_blank: pos = "1"b; frac = "0"b; val_mult = ten; new_div = 1.e0; value = 0.e0; 35 wrk = substr(in,ip,1); 36 if wrk="+" then go to plus; 37 if wrk^="-" then go to no_sign; 38 pos = "0"b; 39 plus:ip = ip+1; 40 if ip>len then return; 41 wrk = substr(in,ip,1); 42 no_sign: next: 43 new = index("0123456789", wrk)-1; 44 if new<0e0 then go to not_num; 45 code = 0; 46 if frac then do; 47 new_div = new_div*ten; 48 new = new / new_div; 49 end; 50 value = val_mult*value+new; 51 ip = ip+1; 52 if ip>len then go to fin; 53 wrk = substr(in,ip,1); 54 go to next; 55 not_num: if wrk="." then do; 56 if frac then go to fin; 57 frac = "1"b; 58 ip = ip+1; 59 if ip>len then go to fin; 60 wrk = substr(in,ip,1); 61 val_mult = 1.e0; 62 go to next; 63 end; 64 if wrk^="e" then 65 if wrk^="E" then go to fin; 66 e_pos = "1"b; ex = 0; 67 ip = ip+1; 68 if ip>len then go to fin; 69 wrk = substr(in,ip,1); 70 if wrk="+" then go to e_plus; 71 if wrk^="-" then go to e_no_sign; 72 e_pos = "0"b; 73 e_plus:ip = ip+1; 74 if ip>len then go to fin; 75 wrk = substr(in,ip,1); 76 e_no_sign: e_next: 77 j = index("0123456789",wrk)-1; 78 if j<0 then go to e_fin; 79 ex = ten*ex+j; 80 ip = ip+1; 81 if ip>len then go to e_fin; 82 wrk = substr(in,ip,1); 83 go to e_next; 84 e_fin: if ^e_pos then ex = -ex; 85 value = value*10.e0**ex; 86 fin: if ^pos then value= - value; 87 ret_value = value; 88 return; 89 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1613.3 ffip.pl1 >dumps>old>recomp>ffip.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. code 000100 automatic fixed bin(17,0) dcl 13 set ref 23* 27* 45* e_pos 000107 automatic bit(1) unaligned dcl 13 set ref 66* 72* 84 ex 000101 automatic fixed bin(17,0) dcl 13 set ref 66* 79* 79 84* 84 85 frac 000110 automatic bit(1) unaligned dcl 13 set ref 34* 46 56 57* in based char unaligned dcl 13 ref 30 35 41 53 60 69 75 82 inp parameter pointer dcl 13 ref 11 25 inp1 000112 automatic pointer dcl 13 set ref 25* 30 35 41 53 60 69 75 82 ip parameter fixed bin(17,0) dcl 13 set ref 11 26 30 31* 31 35 39* 39 40 41 51* 51 52 53 58* 58 59 60 67* 67 68 69 73* 73 74 75 80* 80 81 82 j 000102 automatic fixed bin(17,0) dcl 13 set ref 76* 78 79 len parameter fixed bin(17,0) dcl 13 ref 11 24 26 40 52 59 68 74 81 llen 000103 automatic fixed bin(17,0) dcl 13 set ref 24* 30 35 41 53 60 69 75 82 new 000120 automatic float bin(63) dcl 13 set ref 42* 44 48* 48 50 new_div 000105 automatic float bin(27) dcl 13 set ref 34* 47* 47 48 pos 000106 automatic bit(1) unaligned dcl 13 set ref 34* 38* 86 ret_value parameter float bin(27) dcl 13 set ref 11 87* ten constant float bin(27) initial dcl 13 ref 34 47 79 val_mult 000104 automatic float bin(27) dcl 13 set ref 34* 50 61* value 000116 automatic float bin(63) dcl 13 set ref 34* 50* 50 85* 85 86* 86 87 wrk 000114 automatic char(1) dcl 13 set ref 35* 36 37 41* 42 53* 55 60* 64 64 69* 70 71 75* 76 82* NAMES DECLARED BY EXPLICIT CONTEXT. blank 000033 constant label dcl 26 ref 32 e_fin 000263 constant label dcl 84 ref 78 81 e_next 000227 constant label dcl 76 ref 83 e_no_sign 000227 constant label dcl 76 ref 71 e_plus 000217 constant label dcl 73 ref 70 ffip 000016 constant entry external dcl 11 fin 000320 constant label dcl 86 ref 52 56 59 64 68 74 next 000103 constant label dcl 42 ref 54 62 no_sign 000103 constant label dcl 42 ref 37 non_blank 000053 constant label dcl 34 ref 30 not_num 000144 constant label dcl 55 ref 44 plus 000073 constant label dcl 39 ref 36 NAMES DECLARED BY CONTEXT OR IMPLICATION. index builtin function ref 42 76 substr builtin function ref 30 35 41 53 60 69 75 82 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 364 376 331 374 Length 534 331 12 121 32 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ffip 154 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ffip 000100 code ffip 000101 ex ffip 000102 j ffip 000103 llen ffip 000104 val_mult ffip 000105 new_div ffip 000106 pos ffip 000107 e_pos ffip 000110 frac ffip 000112 inp1 ffip 000114 wrk ffip 000116 value ffip 000120 new ffip THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. fx1_to_fl2 call_ext_out return fl2_to_fx1 ext_entry real_to_real_rd THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. decimal_exp_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000011 23 000023 24 000025 25 000030 26 000033 27 000037 28 000041 30 000042 31 000051 32 000052 34 000053 34 000055 34 000056 34 000060 34 000062 35 000064 36 000066 37 000070 38 000072 39 000073 40 000074 41 000077 42 000103 44 000114 45 000115 46 000116 47 000120 48 000123 50 000125 51 000131 52 000133 53 000136 54 000143 55 000144 56 000147 57 000151 58 000153 59 000155 60 000160 61 000165 62 000167 64 000170 66 000174 66 000176 67 000177 68 000201 69 000204 70 000211 71 000214 72 000216 73 000217 74 000220 75 000223 76 000227 78 000237 79 000240 80 000250 81 000252 82 000255 83 000262 84 000263 85 000267 86 000320 87 000325 88 000330 ----------------------------------------------------------- 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