COMPILATION LISTING OF SEGMENT probe_increment_indices_ Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/24/88 1601.7 mst Mon Options: optimize map 1 /****^ ****************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* ****************************************************** */ 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(88-09-07,WAAnderson), approve(88-09-30,MCR7952), 14* audit(88-09-30,JRGray), install(88-10-24,MR12.2-1184): 15* Added format control comment to make the source more readable. 16* END HISTORY COMMENTS */ 17 18 19 /* format: style1,insnl,ifthendo,indthenelse,^indnoniterdo,^inditerdo,indcom,^indthenbegin,^indprocbody,ind2,ll78,initcol0,dclind4,idind24,struclvlind1,comcol41 */ 20 21 /**** * * * * * * * * * * * * * * * * * * * * * * * */ 22 23 probe_increment_indices_: 24 procedure (invert_sw, subscript, bounds, n_subscripts, finished, 25 almost_finished); 26 27 /* * PROBE_INCREMENT_INDICES_ 28* * 29* * Increment a set of array indices to get to the next element in 30* * a cross-section. The order is determined by invert_sw, which is 31* * set to "1"b for Fortran style subscripts, and "0"b otherwise. 32* * 33* * Modification history: 34* * 2 Jun 83, W. Olin Sibert: return almost_finished, 35* * change calling sequence for a single entrypoint 36* * 29 Nov 78, JRD: fix stupidity - index(1) is MOST, not least sig!!! 37* * 11 Nov 78, James R. Davis: Initial coding 38* */ 39 40 dcl invert_sw bit (1) aligned parameter; 41 /* "1"b => Fortran style subscripts */ 42 dcl subscript (*) fixed bin (24) parameter; 43 /* i/o what we are incrementing */ 44 dcl bounds (2, *) fixed bin (24) parameter; 45 /* (input) low and high limits */ 46 dcl n_subscripts fixed bin parameter; 47 /* input: how many dims are meaningful */ 48 dcl finished bit (1) aligned parameter; 49 /* output: set "1"b when incremented over full range */ 50 dcl almost_finished bit (1) aligned parameter; 51 /* output: set "1"b when next call will set "finished" */ 52 53 dcl LOWER fixed bin static options (constant) init (1); 54 dcl UPPER fixed bin static options (constant) init (2); 55 /* */ 56 if invert_sw 57 then 58 call increment (1, (n_subscripts)); 59 else call increment ((n_subscripts), 1); 60 return; 61 62 63 64 increment: 65 procedure (first, last); 66 67 dcl first fixed bin parameter; 68 dcl last fixed bin parameter; 69 70 dcl idx fixed bin; 71 dcl direction fixed bin; 72 73 if (last > first) 74 then /* This determines the order in which the */ 75 direction = 1; /* subscripts are processed */ 76 else direction = -1; 77 78 idx = first; /* start with least significant */ 79 80 subscript (idx) = subscript (idx) + 1; 81 do while (subscript (idx) > bounds (UPPER, idx)); 82 /* did we just overflow ? */ 83 subscript (idx) = bounds (LOWER, idx); 84 /* then reset to low */ 85 if (idx = last) then do; /* have just finished last? */ 86 finished = "1"b; 87 return; 88 end; 89 90 idx = idx + direction; /* now bump next highest */ 91 subscript (idx) = subscript (idx) + 1; 92 /* bump, and test before we exit */ 93 end; 94 95 finished = "0"b; /* there is useful work to be finished */ 96 97 almost_finished = "1"b; 98 do idx = first to last by direction; /* Is this the last time we'll be here? */ 99 if (subscript (idx) ^= bounds (UPPER, idx)) 100 then 101 almost_finished = "0"b; 102 end; 103 return; 104 end increment; 105 106 end probe_increment_indices_; 107 108 SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/24/88 1342.6 probe_increment_indices_.pl1 >special_ldd>install>MR12.2-1184>probe_increment_indices_.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. LOWER constant fixed bin(17,0) initial dcl 53 ref 83 UPPER constant fixed bin(17,0) initial dcl 54 ref 81 99 almost_finished parameter bit(1) dcl 50 set ref 23 97* 99* bounds parameter fixed bin(24,0) array dcl 44 ref 23 81 83 99 direction 000107 automatic fixed bin(17,0) dcl 71 set ref 73* 76* 90 98 finished parameter bit(1) dcl 48 set ref 23 86* 95* first parameter fixed bin(17,0) dcl 67 ref 64 73 78 98 idx 000106 automatic fixed bin(17,0) dcl 70 set ref 78* 80 80 81 81 83 83 85 90* 90 91 91 98* 99 99* invert_sw parameter bit(1) dcl 40 ref 23 56 last parameter fixed bin(17,0) dcl 68 ref 64 73 85 98 n_subscripts parameter fixed bin(17,0) dcl 46 ref 23 56 59 subscript parameter fixed bin(24,0) array dcl 42 set ref 23 80* 80 81 83* 91* 91 99 NAMES DECLARED BY EXPLICIT CONTEXT. increment 000052 constant entry internal dcl 64 ref 56 59 probe_increment_indices_ 000023 constant entry external dcl 23 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 310 320 260 320 Length 472 260 10 135 30 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME probe_increment_indices_ 81 external procedure is an external procedure. increment internal procedure shares stack frame of external procedure probe_increment_indices_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME probe_increment_indices_ 000106 idx increment 000107 direction increment THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac ext_entry_desc 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 23 000015 56 000030 59 000043 60 000051 64 000052 73 000054 76 000062 78 000064 80 000066 81 000100 83 000134 85 000141 86 000145 87 000147 90 000150 91 000152 93 000157 95 000160 97 000161 98 000163 99 000204 102 000237 103 000242 ----------------------------------------------------------- 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