COMPILATION LISTING OF SEGMENT binary_to_octal_string Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1556.1 mst Mon 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 binary_to_octal_string: procedure(integer,nonvarying); 12 13 vs = "0"b; 14 go to begin; 15 16 dcl integer fixed bin(35) parameter; 17 dcl (addr,mod,substr) builtin; 18 dcl number fixed bin(35); 19 dcl bit_number bit(36) based(addr(number)) aligned; 20 dcl string char(12); 21 dcl nonvarying char(12); 22 dcl varying char(12) varying; 23 dcl 1 bit_string_overlay aligned based(addr(string)), 24 2 bit_string(0:11) bit(9) unaligned; 25 dcl (i,j,l) fixed bin; 26 dcl vs bit(1) aligned; 27 dcl spaces char(12) aligned internal static initial((12)" "); 28 29 binary_to_octal_var_string: entry(integer,varying); 30 31 vs = "1"b; 32 begin: 33 number = integer; 34 i = 0; 35 if number < 0 36 then do; 37 number = -number; 38 i = 1; 39 substr(string,1,1) = "-"; 40 end; 41 42 j = index(bit_number,"1"b); 43 if j = 0 44 then do; 45 string = "0"; 46 i = 1; 47 go to return; 48 end; 49 50 l = mod(j,3); 51 if l = 0 52 then j = j - 2; 53 else j = j - l + 1; 54 55 bit_number = substr(bit_number,j); 56 do j = j to 34 by 3; 57 bit_string(i) = "000110"b || substr(bit_number,1,3); 58 bit_number = substr(bit_number,4); 59 i = i + 1; 60 end; 61 62 return: 63 if vs 64 then varying = substr(string,1,i); 65 else nonvarying = substr(spaces,1,(12-i))||substr(string,1,i); 66 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1007.1 binary_to_octal_string.pl1 >spec>on>pl128d>binary_to_octal_string.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 17 ref 42 55 55 57 57 58 58 bit_number based bit(36) dcl 19 set ref 42 55* 55 57 58* 58 bit_string based bit(9) array level 2 packed unaligned dcl 23 set ref 57* bit_string_overlay based structure level 1 dcl 23 i 000104 automatic fixed bin(17,0) dcl 25 set ref 34* 38* 46* 57 59* 59 62 65 65 integer parameter fixed bin(35,0) dcl 16 ref 11 29 32 j 000105 automatic fixed bin(17,0) dcl 25 set ref 42* 43 50 51* 51 53* 53 55 56* 56* l 000106 automatic fixed bin(17,0) dcl 25 set ref 50* 51 53 mod builtin function dcl 17 ref 50 nonvarying parameter char(12) unaligned dcl 21 set ref 11 65* number 000100 automatic fixed bin(35,0) dcl 18 set ref 32* 35 37* 37 42 55 55 57 58 58 spaces 000176 constant char(12) initial dcl 27 ref 65 string 000101 automatic char(12) unaligned dcl 20 set ref 39* 45* 57 62 65 substr builtin function dcl 17 set ref 39* 55 57 58 62 65 65 varying parameter varying char(12) dcl 22 set ref 29 62* vs 000107 automatic bit(1) dcl 26 set ref 13* 31* 62 NAMES DECLARED BY EXPLICIT CONTEXT. begin 000031 constant label dcl 32 ref 14 binary_to_octal_string 000007 constant entry external dcl 11 binary_to_octal_var_string 000022 constant entry external dcl 29 return 000136 constant label dcl 62 ref 47 NAME DECLARED BY CONTEXT OR IMPLICATION. index builtin function ref 42 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 244 254 203 254 Length 426 203 10 135 41 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME binary_to_octal_string 75 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME binary_to_octal_string 000100 number binary_to_octal_string 000101 string binary_to_octal_string 000104 i binary_to_octal_string 000105 j binary_to_octal_string 000106 l binary_to_octal_string 000107 vs binary_to_octal_string THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs return mod_fx1 shorten_stack ext_entry index_bs_1_eis 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 11 000003 13 000014 14 000015 29 000016 31 000027 32 000031 34 000034 35 000035 37 000036 38 000040 39 000042 42 000044 43 000051 45 000054 46 000057 47 000061 50 000062 51 000065 53 000071 55 000075 56 000106 57 000113 58 000126 59 000132 60 000133 62 000136 65 000153 66 000174 ----------------------------------------------------------- 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