COMPILATION LISTING OF SEGMENT apl_create_workspace_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 11/29/83 1559.8 mst Tue Options: optimize map 1 /* ****************************************************** 2* * * 3* * * 4* * Copyright (c) 1972 by Massachusetts Institute of * 5* * Technology and Honeywell Information Systems, Inc. * 6* * * 7* * * 8* ****************************************************** */ 9 10 apl_create_workspace_: 11 procedure (); 12 13 /* 14* * this routine is called when apl is invoked to set up and clear the workspace 15* * 16* * written 73.7.31 by DAM 17* * modified 8/25/73 by DAM for version 3 workspace format 18* * modified 9/15/73 by DAM to remove apl_ws_ptr_ - thus exorcising the curse of compatibility 19* * modified 12/06/73 by PG for apl_segment_manager_ 20* * modified July 1974 by G. Gordon Benedict to remove superfluous declaration of unique_chars_ 21* * and to change names of some subroutines called. 22* * Modified 761006 by PG to cleanup some initialization of variables. 23* Modified 781208 by PG to use clock builtin. 24* */ 25 26 /* automatic */ 27 28 declare parse_stack_ptr ptr; 29 30 /* builtin */ 31 32 declare (clock, string) builtin; 33 34 /* entries */ 35 36 declare apl_segment_manager_$get entry () returns (pointer), 37 hcs_$set_max_length_seg entry (pointer, fixed bin (18), fixed bin (35)), 38 apl_initialize_storage_ entry, 39 apl_clear_workspace_ entry; 40 41 /* program */ 42 43 parse_stack_ptr = apl_segment_manager_$get (); 44 45 /* set a max length on this segment, which will contain the parse stack, 46* to insure that when we have 256K segments an out-of-bounds fault 47* will occur, rather than a wrap-around, in certain depth errors */ 48 49 call hcs_$set_max_length_seg (parse_stack_ptr, 65536, (0)); 50 51 apl_static_$ws_info_ptr.static_ws_info_ptr, ws_info_ptr = parse_stack_ptr; 52 ws_info.time_invoked = clock (); 53 ws_info.version_number = 3; 54 string (ws_info.switches) = ""b; 55 ws_info.signoff_lock = ""; 56 ws_info.vcpu_time = 0; 57 call apl_initialize_storage_ (); 58 call apl_clear_workspace_ (); 59 60 return; 61 62 /* include files */ 63 1 1 /* ====== BEGIN INCLUDE SEGMENT apl_ws_info.incl.pl1 ====================================== */ 1 2 1 3 /* This structure contains all of the global data (or pointers to it) for the APL subsystem */ 1 4 1 5 /* automatic */ 1 6 1 7 declare ws_info_ptr ptr initial (apl_static_$ws_info_ptr.static_ws_info_ptr); 1 8 1 9 /* external static */ 1 10 1 11 declare 1 apl_static_$ws_info_ptr external static aligned structure, 1 12 2 static_ws_info_ptr unaligned pointer; 1 13 1 14 /* based */ 1 15 1 16 declare 1 ws_info aligned based (ws_info_ptr), 1 17 2 version_number fixed bin, /* version of this structure (3) */ 1 18 2 switches unaligned, /* mainly ws parameters */ 1 19 3 long_error_mode bit, /* if 1, long Multics format, else APL/360 format */ 1 20 3 debug_mode bit, /* if 1, system error causes escape to command level */ 1 21 3 canonicalize_mode bit, /* if 1, the editor canonicalizes user input */ 1 22 3 restrict_exec_command bit, /* if 1, the )EXEC command may not be used */ 1 23 3 restrict_debug_command bit, /* if 1, the )DEBUG command may not be used */ 1 24 3 restrict_external_functions 1 25 bit, /* if 1, the )ZFN, )MFN, and )DFN commands may not be used */ 1 26 3 restrict_load bit, /* if 1, the )LOAD and )COPY commands may not be used */ 1 27 3 restrict_load_directory bit, /* if 1, no directory allowed in )LOAD or )COPY pathnames */ 1 28 3 restrict_save bit, /* if 1, the )SAVE command may not be used */ 1 29 3 restrict_save_directory bit, /* if 1, no directory allowed in )SAVE pathnames */ 1 30 3 off_hold bit, /* if 1, )OFF HOLD was typed, else just )OFF */ 1 31 3 transparent_to_signals bit, /* if 1, any conditions slip right past APL */ 1 32 3 meter_mode bit, /* if 1, metering may be done, else speed is all-important */ 1 33 3 restrict_msg_command bit, /* if 1, the )MSG command may not be used. */ 1 34 3 compatibility_check_mode 1 35 bit, /* if 1, check for incompatible operators */ 1 36 3 no_quit_handler bit, /* if 1, do not trap QUITs. */ 1 37 /* remaining 20 bits not presently used */ 1 38 1 39 2 values, /* attributes of the workspace */ 1 40 3 digits fixed bin, /* number of digits of precision printed on output */ 1 41 3 width fixed bin, /* line length for formatted output */ 1 42 3 index_origin fixed bin, /* the index origin (0 or 1) */ 1 43 3 random_link fixed bin(35), /* seed for random number generator */ 1 44 3 fuzz float, /* comparison tolerance (relative fuzz) */ 1 45 3 float_index_origin float, /* the index origin in floating point */ 1 46 3 number_of_symbols fixed bin, /* the number of symbol_beads currently in existence */ 1 47 3 maximum_value_stack_size 1 48 fixed bin (18), /* maximum number of words in one segment of value stack */ 1 49 1 50 2 pointers, /* pointers to various internal tables */ 1 51 3 symbol_table_ptr unaligned pointer, /* -> symbol_table (apl_symbol_table.incl.pl1) */ 1 52 3 current_parse_frame_ptr unaligned pointer, /* -> topmost parse frame */ 1 53 3 value_stack_ptr unaligned pointer, /* -> next free location on value stack */ 1 54 3 alloc_free_info_ptr unaligned pointer, /* -> apl_storage_mngr_ data (apl_storage_system_data.incl.pl1) */ 1 55 1 56 2 time_invoked fixed bin(71), /* clock time that APL was entered */ 1 57 2 integer_fuzz float, /* the absolute fuzz used in checking for integers */ 1 58 2 user_number fixed bin(35), /* number under which the user is signed on */ 1 59 2 latent_expression unaligned pointer, /* -> value_bead for QuadLX */ 1 60 2 lock char(32), /* the lock currently set on this workspace (password) */ 1 61 2 wsid char(100), /* the workspace identification: name, number name, or clear ws */ 1 62 2 last_error_code fixed bin(35), /* last code passed to apl_error_ */ 1 63 2 signoff_lock character (32), 1 64 1 65 2 interrupt_info aligned, /* bits used by apl_interpreter_ to tell when to abort */ 1 66 3 dont_interrupt_parse bit, /* if 1, don't do a dirty stop because the parser is running */ 1 67 3 dont_interrupt_operator bit, /* if 1, don't do a dirty stop because an operator is running */ 1 68 3 dont_interrupt_storage_manager /* if 1, don't stop because apl_storage_mngr_ is */ 1 69 bit, /* munging his tables */ 1 70 3 unused_interrupt_bit bit, /* not presently used */ 1 71 3 dont_interrupt_command bit, 1 72 3 can_be_interrupted bit, /* if 1, OK to do a clean stop (we are between lines, reading) */ 1 73 3 clean_interrupt_pending bit, /* interrupt occured, break cleanly (between lines) */ 1 74 3 dirty_interrupt_pending bit, /* interrupt occured, break as soon as not inhibited */ 1 75 1 76 2 user_name char (32), /* process group id of user */ 1 77 2 immediate_input_prompt char (32) varying, /* normal input */ 1 78 2 evaluated_input_prompt char (32) varying, /* quad input */ 1 79 2 character_input_prompt char (32) varying, /* quad-quote input */ 1 80 2 vcpu_time aligned, 1 81 3 total fixed bin (71), 1 82 3 setup fixed bin (71), 1 83 3 parse fixed bin (71), 1 84 3 lex fixed bin (71), 1 85 3 operator fixed bin (71), 1 86 3 storage_manager fixed bin (71), 1 87 2 output_info aligned, /* data pertaining to output buffer */ 1 88 3 output_buffer_ptr unal ptr, /* ptr to output buffer */ 1 89 3 output_buffer_len fixed bin (21), /* length (bytes) of output buffer */ 1 90 3 output_buffer_pos fixed bin (21), /* index of next byte to write in */ 1 91 3 output_buffer_ll fixed bin (21), /* print positions used up so far */ 1 92 2 tab_width fixed bin (21); /* number of columns a tabs moves cursor */ 1 93 1 94 declare output_buffer char (ws_info.output_buffer_len) based (ws_info.output_buffer_ptr); 1 95 1 96 /* internal static */ 1 97 1 98 declare max_parse_stack_depth fixed bin int static init(64536); 1 99 1 100 /* ------ END INCLUDE SEGMENT apl_ws_info.incl.pl1 -------------------------------------- */ 64 2 1 /* ====== BEGIN INCLUDE SEGMENT apl_number_data.incl.pl1 ================================== */ 2 2 2 3 /* 2 4* This include file contains information about the machine representation of numbers. 2 5* In all programs numbers should simply be declared 'float'. 2 6* All default statements should be in this include file. 2 7* 2 8* This is the binary version. The manifest constant Binary should be used by programs 2 9* that need to know whether we are using binary or decimal. 2 10* */ 2 11 2 12 /* format: style3,initlm0,idind30 */ 2 13 2 14 default (float & ^decimal & ^binary & ^precision & ^constant) float binary (63); 2 15 2 16 declare ( 2 17 TheBiggestNumberWeveGot float initial (0.1701411834604692317e+39), 2 18 TheSmallestNumberWeveGot float initial (.1469367938527859385e-38), 2 19 Binary bit (1) aligned initial ("1"b) 2 20 ) internal static options (constant); 2 21 2 22 /* Number of characters in a number datum entry; used for copying float number arrays as strings. 2 23* (Obsolete! use array copies!) */ 2 24 2 25 declare NumberSize fixed binary precision (4) internal static initial (8); 2 26 2 27 /* ------ END INCLUDE SEGMENT apl_number_data.incl.pl1 ---------------------------------- */ 65 66 end /* apl_create_workspace_ */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/29/83 1346.2 apl_create_workspace_.pl1 >special_ldd>on>apl.1129>apl_create_workspace_.pl1 64 1 03/27/82 0439.2 apl_ws_info.incl.pl1 >ldd>include>apl_ws_info.incl.pl1 65 2 03/27/82 0429.8 apl_number_data.incl.pl1 >ldd>include>apl_number_data.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. apl_clear_workspace_ 000016 constant entry external dcl 36 ref 58 apl_initialize_storage_ 000014 constant entry external dcl 36 ref 57 apl_segment_manager_$get 000010 constant entry external dcl 36 ref 43 apl_static_$ws_info_ptr 000020 external static structure level 1 dcl 1-11 clock builtin function dcl 32 ref 52 hcs_$set_max_length_seg 000012 constant entry external dcl 36 ref 49 parse_stack_ptr 000100 automatic pointer dcl 28 set ref 43* 49* 51 signoff_lock 70 based char(32) level 2 dcl 1-16 set ref 55* static_ws_info_ptr 000020 external static pointer level 2 packed unaligned dcl 1-11 set ref 51* 1-7 string builtin function dcl 32 set ref 54* switches 1 based structure level 2 packed unaligned dcl 1-16 set ref 54* time_invoked 20 based fixed bin(71,0) level 2 dcl 1-16 set ref 52* vcpu_time 154 based structure level 2 dcl 1-16 set ref 56* version_number based fixed bin(17,0) level 2 dcl 1-16 set ref 53* ws_info based structure level 1 dcl 1-16 ws_info_ptr 000102 automatic pointer initial dcl 1-7 set ref 51* 52 53 54 55 56 1-7* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Binary internal static bit(1) initial dcl 2-16 NumberSize internal static fixed bin(4,0) initial dcl 2-25 TheBiggestNumberWeveGot internal static float bin(63) initial dcl 2-16 TheSmallestNumberWeveGot internal static float bin(63) initial dcl 2-16 max_parse_stack_depth internal static fixed bin(17,0) initial dcl 1-98 output_buffer based char unaligned dcl 1-94 NAME DECLARED BY EXPLICIT CONTEXT. apl_create_workspace_ 000005 constant entry external dcl 10 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 210 232 101 220 Length 444 101 22 176 106 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME apl_create_workspace_ 84 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME apl_create_workspace_ 000100 parse_stack_ptr apl_create_workspace_ 000102 ws_info_ptr apl_create_workspace_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry clock THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. apl_clear_workspace_ apl_initialize_storage_ apl_segment_manager_$get hcs_$set_max_length_seg THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. apl_static_$ws_info_ptr LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000004 1 7 000012 43 000014 49 000022 51 000040 52 000044 53 000047 54 000051 55 000053 56 000056 57 000065 58 000072 60 000077 ----------------------------------------------------------- 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