COMPILATION LISTING OF SEGMENT generate_word_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1749.1 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /* This procedure is the subroutine interface to generate random words. 7* It is called when the standard distributi?{n of random units (as returned by 8* random_unit_) is desired. The clock value is used as the starting seed unless 9* generate_word_$init_seed is called. 10**/ 11 generate_word_: procedure (word, hyphenated_word, min, max); 12 dcl word char (*); 13 dcl hyphenated_word char (*); 14 dcl min fixed bin; 15 dcl max fixed bin; 16 dcl (random_unit_, random_unit_$random_vowel) entry (fixed bin); 17 dcl convert_word_ entry ((0:*) fixed bin, (0:*) bit (1) aligned, 18 fixed bin, char (*), char (*)); 19 dcl random_word_ entry ((0:*) fixed bin, (0:*) bit (1) aligned, 20 fixed bin, fixed bin, entry, entry); 21 dcl hyphens (0:20) bit (1) aligned; 22 dcl random_word (0:20) fixed bin; 23 dcl length_in_units fixed bin; 24 dcl random_length fixed bin; 25 dcl unique_bits_ entry returns (bit (70)); 26 dcl encipher_ entry (fixed bin (71), (*) fixed bin (71), (*) fixed bin (71), fixed bin); 27 dcl random_unit_stat_$seed (1) fixed bin (71) external; 28 dcl first_call bit (1) static aligned init ("1"b); 29 30 /* On the very first call to this procedure in a process (if the 31* init_seed entry was not called), use unique_bits to get a 32* random number to initialize the random seed. */ 33 34 if first_call then do; 35 random_unit_stat_$seed (1) = fixed (unique_bits_ ()); 36 first_call = "0"b; 37 end; 38 39 /* Get the length of the word desired. We use the old value 40* of the seed to determine this length so that the length of the word 41* will not in some way be correlated with the word itself. 42* We calculate this to be a uniformly distributed random number between 43* min and max. */ 44 45 random_length = mod (abs (fixed (random_unit_stat_$seed (1), 17)), (max - min + 1)) + min; 46 47 /* encipher the seed to get a random number and the next value of the seed */ 48 49 call encipher_ (random_unit_stat_$seed (1), random_unit_stat_$seed, random_unit_stat_$seed, 1); 50 51 /* Get the random word and convert it to characters */ 52 53 call random_word_ (random_word, hyphens, random_length, length_in_units, random_unit_, random_unit_$random_vowel); 54 call convert_word_ (random_word, hyphens, length_in_units, word, hyphenated_word); 55 return; 56 57 /* This entry allows the user to set the seed. If the seed argument is zero, we 58* go back to using the clock value. 59**/ 60 generate_word_$init_seed: entry (seed); 61 dcl seed fixed bin (35); 62 63 if seed = 0 then first_call = "1"b; 64 else do; 65 random_unit_stat_$seed (1) = seed; 66 first_call = "0"b; 67 end; 68 return; 69 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1529.9 generate_word_.pl1 >dumps>old>recomp>generate_word_.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. convert_word_ 000016 constant entry external dcl 17 ref 54 encipher_ 000024 constant entry external dcl 26 ref 49 first_call 000010 internal static bit(1) initial dcl 28 set ref 34 36* 63* 66* hyphenated_word parameter char unaligned dcl 13 set ref 11 54* hyphens 000100 automatic bit(1) array dcl 21 set ref 53* 54* length_in_units 000152 automatic fixed bin(17,0) dcl 23 set ref 53* 54* max parameter fixed bin(17,0) dcl 15 ref 11 45 min parameter fixed bin(17,0) dcl 14 ref 11 45 45 random_length 000153 automatic fixed bin(17,0) dcl 24 set ref 45* 53* random_unit_ 000012 constant entry external dcl 16 ref 53 53 random_unit_$random_vowel 000014 constant entry external dcl 16 ref 53 53 random_unit_stat_$seed 000026 external static fixed bin(71,0) array dcl 27 set ref 35* 45 49* 49* 49* 65* random_word 000125 automatic fixed bin(17,0) array dcl 22 set ref 53* 54* random_word_ 000020 constant entry external dcl 19 ref 53 seed parameter fixed bin(35,0) dcl 61 ref 60 63 65 unique_bits_ 000022 constant entry external dcl 25 ref 35 word parameter char unaligned dcl 12 set ref 11 54* NAMES DECLARED BY EXPLICIT CONTEXT. generate_word_ 000027 constant entry external dcl 11 generate_word_$init_seed 000226 constant entry external dcl 60 NAMES DECLARED BY CONTEXT OR IMPLICATION. abs builtin function ref 45 fixed builtin function ref 35 45 mod builtin function ref 45 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 402 432 252 412 Length 614 252 30 145 130 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME generate_word_ 162 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 first_call generate_word_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME generate_word_ 000100 hyphens generate_word_ 000125 random_word generate_word_ 000152 length_in_units generate_word_ 000153 random_length generate_word_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return mod_fx1 ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. convert_word_ encipher_ random_unit_ random_unit_$random_vowel random_word_ unique_bits_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. random_unit_stat_$seed LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000022 34 000047 35 000051 36 000063 45 000064 49 000101 53 000125 54 000167 55 000222 60 000223 63 000233 65 000242 66 000246 68 000247 ----------------------------------------------------------- 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