COMPILATION LISTING OF SEGMENT apl_display_symbol Compiled by: Experimental PL/I Compiler of Friday, July 31, 1981 at 13:16 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 08/08/81 1948.2 mst Sat 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_display_symbol: 11 ads: 12 procedure options (variable); 13 14 call cu_$arg_ptr (1, arg_ptr, arg_length, code); 15 if code ^= 0 16 then do; 17 call com_err_ (code, "apl_display_symbol", "Usage: ads symbol_name"); 18 return; 19 end; 20 21 call apl_get_symbol_ (arg_string, symbol_bead_ptr, hash_link); 22 23 /* In order to be transparent, we must decrement the reference count....since 24* apl_get_symbol_ auto-increments it for us! */ 25 26 symbol_bead_ptr -> symbol_bead.reference_count = symbol_bead_ptr -> symbol_bead.reference_count - 1; 27 28 brief = "0"b; 29 call cu_$arg_ptr (2, arg_ptr, arg_length, code); 30 if code = 0 31 then if arg_string = "-bf" | arg_string = "-brief" 32 then brief = "1"b; 33 else do; 34 call com_err_ (error_table_$badopt, "apl_display_symbol", "Only control arg is -brief(-bf)"); 35 return; 36 end; 37 38 call apl_display_bead_ ((symbol_bead_ptr), brief); 39 40 if symbol_bead_ptr -> symbol_bead.meaning_pointer ^= null () 41 then do; 42 call ioa_ ("Meaning:"); 43 call apl_display_bead_ ((symbol_bead_ptr -> symbol_bead.meaning_pointer), brief); 44 end; 45 46 return; 47 48 /* entries */ 49 50 declare com_err_ entry options (variable); 51 declare ioa_ entry options (variable); 52 declare apl_get_symbol_ entry (char (*), pointer unaligned, fixed bin); 53 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); 54 declare apl_display_bead_ entry (pointer, bit (1) aligned); 55 56 /* external static */ 57 58 declare error_table_$badopt fixed bin (35) external static; 59 60 /* builtin */ 61 62 declare (hbound, lbound, null) 63 builtin; 64 65 /* automatic */ 66 67 declare arg_length fixed bin (21), 68 arg_ptr ptr, 69 brief bit (1) aligned, 70 bucket_index fixed bin, 71 code fixed bin (35), 72 hash_link fixed bin, 73 symbol_bead_ptr pointer unaligned; 74 75 /* based */ 76 77 declare arg_string char (arg_length) based (arg_ptr); 78 79 /* include files */ 80 1 1 /* ====== BEGIN INCLUDE SEGMENT apl_number_data.incl.pl1 ================================== */ 1 2 1 3 /* 1 4* This include file contains information about the machine representation of numbers. 1 5* In all programs numbers should simply be declared 'float'. 1 6* All default statements should be in this include file. 1 7* 1 8* This is the binary version. The manifest constant Binary should be used by programs 1 9* that need to know whether we are using binary or decimal. 1 10* */ 1 11 1 12 /* format: style3,initlm0,idind30 */ 1 13 1 14 default (float & ^decimal & ^binary & ^precision & ^constant) float binary (63); 1 15 1 16 declare ( 1 17 TheBiggestNumberWeveGot float initial (0.1701411834604692317e+39), 1 18 TheSmallestNumberWeveGot float initial (.1469367938527859385e-38), 1 19 Binary bit (1) aligned initial ("1"b) 1 20 ) internal static options (constant); 1 21 1 22 /* Number of characters in a number datum entry; used for copying float number arrays as strings. 1 23* (Obsolete! use array copies!) */ 1 24 1 25 declare NumberSize fixed binary precision (4) internal static initial (8); 1 26 1 27 /* ------ END INCLUDE SEGMENT apl_number_data.incl.pl1 ---------------------------------- */ 81 2 1 /* ====== BEGIN INCLUDE SEGMENT apl_ws_info.incl.pl1 ====================================== */ 2 2 2 3 /* This structure contains all of the global data (or pointers to it) for the APL subsystem */ 2 4 2 5 /* automatic */ 2 6 2 7 declare ws_info_ptr ptr initial (apl_static_$ws_info_ptr.static_ws_info_ptr); 2 8 2 9 /* external static */ 2 10 2 11 declare 1 apl_static_$ws_info_ptr external static aligned structure, 2 12 2 static_ws_info_ptr unaligned pointer; 2 13 2 14 /* based */ 2 15 2 16 declare 1 ws_info aligned based (ws_info_ptr), 2 17 2 version_number fixed bin, /* version of this structure (3) */ 2 18 2 switches unaligned, /* mainly ws parameters */ 2 19 3 long_error_mode bit, /* if 1, long Multics format, else APL/360 format */ 2 20 3 debug_mode bit, /* if 1, system error causes escape to command level */ 2 21 3 canonicalize_mode bit, /* if 1, the editor canonicalizes user input */ 2 22 3 restrict_exec_command bit, /* if 1, the )EXEC command may not be used */ 2 23 3 restrict_debug_command bit, /* if 1, the )DEBUG command may not be used */ 2 24 3 restrict_external_functions 2 25 bit, /* if 1, the )ZFN, )MFN, and )DFN commands may not be used */ 2 26 3 restrict_load bit, /* if 1, the )LOAD and )COPY commands may not be used */ 2 27 3 restrict_load_directory bit, /* if 1, no directory allowed in )LOAD or )COPY pathnames */ 2 28 3 restrict_save bit, /* if 1, the )SAVE command may not be used */ 2 29 3 restrict_save_directory bit, /* if 1, no directory allowed in )SAVE pathnames */ 2 30 3 off_hold bit, /* if 1, )OFF HOLD was typed, else just )OFF */ 2 31 3 transparent_to_signals bit, /* if 1, any conditions slip right past APL */ 2 32 3 meter_mode bit, /* if 1, metering may be done, else speed is all-important */ 2 33 3 restrict_msg_command bit, /* if 1, the )MSG command may not be used. */ 2 34 3 compatibility_check_mode 2 35 bit, /* if 1, check for incompatible operators */ 2 36 3 no_quit_handler bit, /* if 1, do not trap QUITs. */ 2 37 /* remaining 20 bits not presently used */ 2 38 2 39 2 values, /* attributes of the workspace */ 2 40 3 digits fixed bin, /* number of digits of precision printed on output */ 2 41 3 width fixed bin, /* line length for formatted output */ 2 42 3 index_origin fixed bin, /* the index origin (0 or 1) */ 2 43 3 random_link fixed bin(35), /* seed for random number generator */ 2 44 3 fuzz float, /* comparison tolerance (relative fuzz) */ 2 45 3 float_index_origin float, /* the index origin in floating point */ 2 46 3 number_of_symbols fixed bin, /* the number of symbol_beads currently in existence */ 2 47 3 maximum_value_stack_size 2 48 fixed bin (18), /* maximum number of words in one segment of value stack */ 2 49 2 50 2 pointers, /* pointers to various internal tables */ 2 51 3 symbol_table_ptr unaligned pointer, /* -> symbol_table (apl_symbol_table.incl.pl1) */ 2 52 3 current_parse_frame_ptr unaligned pointer, /* -> topmost parse frame */ 2 53 3 value_stack_ptr unaligned pointer, /* -> next free location on value stack */ 2 54 3 alloc_free_info_ptr unaligned pointer, /* -> apl_storage_mngr_ data (apl_storage_system_data.incl.pl1) */ 2 55 2 56 2 time_invoked fixed bin(71), /* clock time that APL was entered */ 2 57 2 integer_fuzz float, /* the absolute fuzz used in checking for integers */ 2 58 2 user_number fixed bin(35), /* number under which the user is signed on */ 2 59 2 latent_expression unaligned pointer, /* -> value_bead for QuadLX */ 2 60 2 lock char(32), /* the lock currently set on this workspace (password) */ 2 61 2 wsid char(100), /* the workspace identification: name, number name, or clear ws */ 2 62 2 last_error_code fixed bin(35), /* last code passed to apl_error_ */ 2 63 2 signoff_lock character (32), 2 64 2 65 2 interrupt_info aligned, /* bits used by apl_interpreter_ to tell when to abort */ 2 66 3 dont_interrupt_parse bit, /* if 1, don't do a dirty stop because the parser is running */ 2 67 3 dont_interrupt_operator bit, /* if 1, don't do a dirty stop because an operator is running */ 2 68 3 dont_interrupt_storage_manager /* if 1, don't stop because apl_storage_mngr_ is */ 2 69 bit, /* munging his tables */ 2 70 3 unused_interrupt_bit bit, /* not presently used */ 2 71 3 dont_interrupt_command bit, 2 72 3 can_be_interrupted bit, /* if 1, OK to do a clean stop (we are between lines, reading) */ 2 73 3 clean_interrupt_pending bit, /* interrupt occured, break cleanly (between lines) */ 2 74 3 dirty_interrupt_pending bit, /* interrupt occured, break as soon as not inhibited */ 2 75 2 76 2 user_name char (32), /* process group id of user */ 2 77 2 immediate_input_prompt char (32) varying, /* normal input */ 2 78 2 evaluated_input_prompt char (32) varying, /* quad input */ 2 79 2 character_input_prompt char (32) varying, /* quad-quote input */ 2 80 2 vcpu_time aligned, 2 81 3 total fixed bin (71), 2 82 3 setup fixed bin (71), 2 83 3 parse fixed bin (71), 2 84 3 lex fixed bin (71), 2 85 3 operator fixed bin (71), 2 86 3 storage_manager fixed bin (71), 2 87 2 output_info aligned, /* data pertaining to output buffer */ 2 88 3 output_buffer_ptr unal ptr, /* ptr to output buffer */ 2 89 3 output_buffer_len fixed bin (21), /* length (bytes) of output buffer */ 2 90 3 output_buffer_pos fixed bin (21), /* index of next byte to write in */ 2 91 3 output_buffer_ll fixed bin (21), /* print positions used up so far */ 2 92 2 tab_width fixed bin (21); /* number of columns a tabs moves cursor */ 2 93 2 94 declare output_buffer char (ws_info.output_buffer_len) based (ws_info.output_buffer_ptr); 2 95 2 96 /* internal static */ 2 97 2 98 declare max_parse_stack_depth fixed bin int static init(64536); 2 99 2 100 /* ------ END INCLUDE SEGMENT apl_ws_info.incl.pl1 -------------------------------------- */ 82 3 1 /* ====== BEGIN INCLUDE SEGMENT apl_bead_format.incl.pl1 ================================== */ 3 2 3 3 declare 1 general_bead aligned based, /* The Venerable Bead */ 3 4 2 type unaligned, 3 5 3 bead_type unaligned, 3 6 4 operator bit (1), /* ON if operator bead */ 3 7 4 symbol bit (1), /* ON if symbol bead */ 3 8 4 value bit (1), /* ON if value bead */ 3 9 4 function bit (1), /* ON if function bead */ 3 10 4 group bit (1), /* ON if group bead */ 3 11 4 label bit (1), /* ON if label bead */ 3 12 4 shared_variable bit (1), /* ON if shared variable bead */ 3 13 4 lexed_function bit (1), /* ON if lexed function bead */ 3 14 3 data_type unaligned, 3 15 4 list_value bit (1), /* ON if a list value bead */ 3 16 4 character_value bit (1), /* ON if a character value bead */ 3 17 4 numeric_value bit (1), /* ON if a numeric value bead */ 3 18 4 integral_value bit (1), /* ON if an integral value bead */ 3 19 4 zero_or_one_value bit (1), /* ON if a boolean value bead */ 3 20 4 complex_value bit (1), /* ON if a complex, numeric value bead */ 3 21 3 unused_bits bit (4) unaligned, /* pad to 18 bits (for future use) */ 3 22 2 size bit (18) unaligned, /* Number of words this bead occupies 3 23* (used by bead storage manager) */ 3 24 2 reference_count fixed binary (29); /* Number of pointers which point 3 25* to this bead (used by bead manager) */ 3 26 3 27 3 28 /* constant strings for initing type field in various beads */ 3 29 3 30 declare ( 3 31 operator_type init("100000000000000000"b), 3 32 symbol_type init("010000000000000000"b), 3 33 value_type init("001000000000000000"b), 3 34 function_type init("000100000000000000"b), 3 35 group_type init("000010000000000000"b), 3 36 label_type init("001001000011000000"b), 3 37 shared_variable_type init("001000100000000000"b), 3 38 lexed_function_type init("000000010000000000"b), 3 39 3 40 list_value_type init("000000001000000000"b), 3 41 character_value_type init("001000000100000000"b), 3 42 numeric_value_type init("001000000010000000"b), 3 43 integral_value_type init("001000000011000000"b), 3 44 zero_or_one_value_type init("001000000011100000"b), 3 45 complex_value_type init("001000000000010000"b), 3 46 3 47 not_integer_mask init("111111111110011111"b), /* to clear integral, zero_or_one bits */ 3 48 not_zero_or_one_mask init("111111111111011111"b) /* to clear zero_or_one bit */ 3 49 ) bit(18) internal static; 3 50 3 51 /* ------ END INCLUDE SEGMENT apl_bead_format.incl.pl1 ---------------------------------- */ 83 4 1 /* BEGIN INCLUDE FILE apl_symbol_table.incl.pl1 4 2* 4 3* initially written 20 June 1973 by Dan Bricklin */ 4 4 4 5 declare 4 6 initial_size fixed bin int static init(17), /* initial size of hash table */ 4 7 4 8 1 symbol_table aligned based(ws_info.symbol_table_ptr), 4 9 2 table_size fixed bin, /* how many buckets */ 4 10 2 hash_bucket_ptr(initial_size refer(table_size)) ptr unaligned; /* the buckets */ 4 11 4 12 /* END INCLUDE FILE apl_symbol_table.incl.pl1 */ 84 5 1 /* ====== BEGIN INCLUDE SEGMENT apl_symbol_bead.incl.pl1 ================================== */ 5 2 5 3 /* Explanation of fields: 5 4* symbol_bead.hash_link_pointer points to next symbol in same hash bucket in the symbol table. 5 5* symbol_bead.meaning_pointer points to current "value" of this name: 5 6* = null => unused (e.g. undefined variable) 5 7* -> group bead => group name 5 8* -> value bead => variable with a value 5 9* -> function bead => function name 5 10* -> label bead => localized label value 5 11* -> shared var bead => shared variable */ 5 12 5 13 declare 1 symbol_bead aligned based, 5 14 2 header aligned like general_bead, 5 15 2 hash_link_pointer pointer unaligned, 5 16 2 meaning_pointer pointer unaligned, 5 17 2 name_length fixed binary, 5 18 2 name character (0 refer (symbol_bead.name_length)) unaligned; 5 19 5 20 /* ------ END INCLUDE SEGMENT apl_symbol_bead.incl.pl1 ---------------------------------- */ 85 86 end /* apl_display_symbol */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/08/81 1558.8 apl_display_symbol.pl1 >dumps>old_dumps>on>MIB-073181>apl_display_symbol.pl1 81 1 08/08/81 1935.2 apl_number_data.incl.pl1 >dumps>old_dumps>on>MIB-073181>apl_number_data.incl.pl1 82 2 08/08/81 1935.4 apl_ws_info.incl.pl1 >dumps>old_dumps>on>MIB-073181>apl_ws_info.incl.pl1 83 3 08/08/81 1934.9 apl_bead_format.incl.pl1 >dumps>old_dumps>on>MIB-073181>apl_bead_format.incl.pl1 84 4 08/08/81 1935.4 apl_symbol_table.incl.pl1 >dumps>old_dumps>on>MIB-073181>apl_symbol_table.incl.pl1 85 5 08/08/81 1935.4 apl_symbol_bead.incl.pl1 >dumps>old_dumps>on>MIB-073181>apl_symbol_bead.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_display_bead_ 000020 constant entry external dcl 54 ref 38 43 apl_get_symbol_ 000014 constant entry external dcl 52 ref 21 apl_static_$ws_info_ptr 000024 external static structure level 1 dcl 2-11 arg_length 000100 automatic fixed bin(21,0) dcl 67 set ref 14* 21 21 29* 30 30 arg_ptr 000102 automatic pointer dcl 67 set ref 14* 21 29* 30 30 arg_string based char unaligned dcl 77 set ref 21* 30 30 brief 000104 automatic bit(1) dcl 67 set ref 28* 30* 38* 43* code 000105 automatic fixed bin(35,0) dcl 67 set ref 14* 15 17* 29* 30 com_err_ 000010 constant entry external dcl 50 ref 17 34 cu_$arg_ptr 000016 constant entry external dcl 53 ref 14 29 error_table_$badopt 000022 external static fixed bin(35,0) dcl 58 set ref 34* general_bead based structure level 1 dcl 3-3 hash_link 000106 automatic fixed bin(17,0) dcl 67 set ref 21* header based structure level 2 dcl 5-13 ioa_ 000012 constant entry external dcl 51 ref 42 meaning_pointer 3 based pointer level 2 packed unaligned dcl 5-13 ref 40 43 null builtin function dcl 62 ref 40 reference_count 1 based fixed bin(29,0) level 3 dcl 5-13 set ref 26* 26 static_ws_info_ptr 000024 external static pointer level 2 packed unaligned dcl 2-11 ref 2-7 symbol_bead based structure level 1 dcl 5-13 symbol_bead_ptr 000107 automatic pointer unaligned dcl 67 set ref 21* 26 26 38 40 43 ws_info_ptr 000110 automatic pointer initial dcl 2-7 set ref 2-7* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Binary internal static bit(1) initial dcl 1-16 NumberSize internal static fixed bin(4,0) initial dcl 1-25 TheBiggestNumberWeveGot internal static float bin(63) initial dcl 1-16 TheSmallestNumberWeveGot internal static float bin(63) initial dcl 1-16 bucket_index automatic fixed bin(17,0) dcl 67 character_value_type internal static bit(18) initial unaligned dcl 3-30 complex_value_type internal static bit(18) initial unaligned dcl 3-30 function_type internal static bit(18) initial unaligned dcl 3-30 group_type internal static bit(18) initial unaligned dcl 3-30 hbound builtin function dcl 62 initial_size internal static fixed bin(17,0) initial dcl 4-5 integral_value_type internal static bit(18) initial unaligned dcl 3-30 label_type internal static bit(18) initial unaligned dcl 3-30 lbound builtin function dcl 62 lexed_function_type internal static bit(18) initial unaligned dcl 3-30 list_value_type internal static bit(18) initial unaligned dcl 3-30 max_parse_stack_depth internal static fixed bin(17,0) initial dcl 2-98 not_integer_mask internal static bit(18) initial unaligned dcl 3-30 not_zero_or_one_mask internal static bit(18) initial unaligned dcl 3-30 numeric_value_type internal static bit(18) initial unaligned dcl 3-30 operator_type internal static bit(18) initial unaligned dcl 3-30 output_buffer based char unaligned dcl 2-94 shared_variable_type internal static bit(18) initial unaligned dcl 3-30 symbol_table based structure level 1 dcl 4-5 symbol_type internal static bit(18) initial unaligned dcl 3-30 value_type internal static bit(18) initial unaligned dcl 3-30 ws_info based structure level 1 dcl 2-16 zero_or_one_value_type internal static bit(18) initial unaligned dcl 3-30 NAMES DECLARED BY EXPLICIT CONTEXT. ads 000052 constant entry external dcl 10 apl_display_symbol 000062 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 452 500 336 462 Length 1016 336 26 302 114 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ads 110 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ads 000100 arg_length ads 000102 arg_ptr ads 000104 brief ads 000105 code ads 000106 hash_link ads 000107 symbol_bead_ptr ads 000110 ws_info_ptr ads THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. apl_display_bead_ apl_get_symbol_ com_err_ cu_$arg_ptr ioa_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. apl_static_$ws_info_ptr error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 2 7 000044 10 000051 14 000070 15 000107 17 000111 18 000143 21 000144 26 000170 28 000173 29 000174 30 000214 34 000233 35 000265 38 000266 40 000301 42 000305 43 000320 46 000334 ----------------------------------------------------------- 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