COMPILATION LISTING OF SEGMENT get_external_variable_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/20/86 1222.5 mst Thu Options: optimize list 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 get_external_variable_: proc (vname, vptr, vsize, vdesc_ptr, code); 12 13 14 /* 15* 16*This procedure will locate the specified external variable and return 17*information about the variable. The information returned includes the 18*location and size (in words) of the data and an optional descriptor pointer. 19* 20*Note: At present the descriptor is not available for external variables 21*and the vdesc_ptr will always be null (). 22* 23*Written 5/6/80 by Michael R. Jordan 24* 25*Modified: 82-11-19, T Oke to change vsize from fb (19) to fb (24) for VLA. 26**/ 27 28 /* PARAMETERS */ 29 30 31 dcl vname char (*); /* the variable name (Input) */ 32 dcl vptr ptr; /* pointer to the data (Output) */ 33 dcl vsize fixed bin (24); /* size (in words) of the data (Output) */ 34 dcl vdesc_ptr ptr; /* location of descriptor (Output) */ 35 dcl code fixed bin (35); /* a standard error code */ 36 37 38 /* CONSTANTS */ 39 40 41 /* AUTOMATIC */ 42 43 44 dcl node_ptr ptr; /* pointer to variable node */ 45 46 47 /* BASED */ 48 49 50 /* EXTERNAL ENTRIES */ 51 52 53 dcl set_ext_variable_$locate entry (char (*), ptr, ptr, fixed bin (35)); 54 55 /* ERROR CODES */ 56 57 58 /* BUILTINS */ 59 60 dcl null builtin; 61 dcl stackbaseptr builtin; 62 63 vptr = null (); /* initialize vptr */ 64 vsize = 0; /* and vsize */ 65 vdesc_ptr = null (); /* oh, and don't forget the descriptor ptr */ 66 code = 0; /* no error yet */ 67 68 call set_ext_variable_$locate (vname, stackbaseptr (), node_ptr, code); 69 if code ^= 0 70 then return; 71 72 vptr = node_ptr -> variable_node.vbl_ptr; /* return location */ 73 vsize = node_ptr -> variable_node.vbl_size; /* and size */ 74 75 return; /* and thats all we can do */ 76 1 1 /* BEGIN INCLUDE FILE ... system_link_names.incl.pl1 */ 1 2 1 3 1 4 /****^ HISTORY COMMENTS: 1 5* 1) change(86-06-24,DGHowe), approve(86-06-24,MCR7396), audit(86-11-12,Zwick), 1 6* install(86-11-20,MR12.0-1222): 1 7* added the declaration of the heap_header. 1 8* 2) change(86-10-20,DGHowe), approve(86-10-20,MCR7420), audit(86-11-12,Zwick), 1 9* install(86-11-20,MR12.0-1222): 1 10* add the seg ptr to the variable node structure. 1 11* END HISTORY COMMENTS */ 1 12 1 13 1 14 /* created by M. Weaver 7/28/76 */ 1 15 /* Modified: 82-11-19 by T. Oke to add LIST_TEMPLATE_INIT. */ 1 16 /* Modified 02/11/83 by M. Weaver to add have_vla_variables flag */ 1 17 1 18 1 19 dcl 1 variable_table_header aligned based, /* header for name table */ 1 20 2 hash_table (0:63) ptr unaligned, /* hash table for variable nodes */ 1 21 2 total_search_time fixed bin (71), /* total time to search for variables */ 1 22 2 total_allocation_time fixed bin (71), /* total time spent allocating and initializing nodes and variables */ 1 23 2 number_of_searches fixed bin, /* number of times names were looked up */ 1 24 2 number_of_variables fixed bin (35), /* number of variables allocated by the linker, incl deletions */ 1 25 2 flags unaligned, 1 26 3 have_vla_variables bit (1) unaligned, /* on if some variables are > sys_info$max_seg_size */ 1 27 3 pad bit (11) unaligned, 1 28 2 cur_num_of_variables fixed bin (24) unal, /* current number of variables allocated */ 1 29 2 number_of_steps fixed bin, /* total number of nodes looked at */ 1 30 2 total_allocated_size fixed bin (35); /* current amount of storage in user area */ 1 31 1 32 1 33 dcl 1 variable_node aligned based, /* individual variable information */ 1 34 2 forward_thread ptr unaligned, /* thread to next node off same hash bucket */ 1 35 2 vbl_size fixed bin (24) unsigned unaligned, /* length in words of variable */ 1 36 2 init_type fixed bin (11) unaligned, /* 0=not init; 3=init template; 4=area 5=list_template*/ 1 37 2 time_allocated fixed bin (71), /* time when variable was allocated */ 1 38 2 vbl_ptr ptr, /* pointer to variable's storage */ 1 39 2 init_ptr ptr, /* pointer to original init info in object seg */ 1 40 2 name_size fixed bin(21) aligned, /* length of name in characters */ 1 41 2 name char (nchars refer (variable_node.name_size)), /* name of variable */ 1 42 2 seg_ptr pointer; 1 43 1 44 /* variable_node.seg_ptr 1 45* Is a pointer to the segment containing the initialization information 1 46* for this variable. It is used as a segment base pointer for external 1 47* pointer initialization via list_init_. 1 48* 1 49* The init_ptr can not be used as a reference to the defining segment 1 50* due to the possibility of set_fortran_common being used to initialize 1 51* the external variables. sfc will generate an initialization information 1 52* structure if multiple intialization sizes are found in the specified 1 53* segments. sfc stores the address of this structure in the init_ptr field. 1 54* This is one reason why sfc does not perform external pointer 1 55* initialization. 1 56* 1 57* The seg_ptr is set to point at the segment used to define the 1 58* initialization information. term_ sets this field to null on termination 1 59* due to the possiblity of executing a different segment which defines 1 60* initialization information. In this way the seg_ptr field will either 1 61* be valid or null. 1 62**/ 1 63 1 64 dcl 1 heap_header based, 1 65 2 version char(8), /* specifies the verison of the header */ 1 66 2 heap_name_list_ptr pointer, /* points to the variable_table_header for this heap */ 1 67 2 previous_heap_ptr pointer, /* points to the previous heap or is null */ 1 68 2 area_ptr pointer, /* points to the heap area */ 1 69 2 execution_level fixed bin (17); /* specifies the execution level this header deals with */ 1 70 1 71 dcl heap_header_version_1 char(8) static options (constant) 1 72 init ("Heap_v01"); 1 73 1 74 1 75 /* END INCLUDE FILE ... system_link_names.incl.pl1 */ 77 78 79 80 end get_external_variable_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/20/86 1145.0 get_external_variable_.pl1 >special_ldd>install>MR12.0-1222>get_external_variable_.pl1 77 1 11/20/86 1035.4 system_link_names.incl.pl1 >special_ldd>install>MR12.0-1222>system_link_names.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. code parameter fixed bin(35,0) dcl 35 set ref 11 66* 68* 69 node_ptr 000100 automatic pointer dcl 44 set ref 68* 72 73 null builtin function dcl 60 ref 63 65 set_ext_variable_$locate 000010 constant entry external dcl 53 ref 68 stackbaseptr builtin function dcl 61 ref 68 68 variable_node based structure level 1 dcl 1-33 vbl_ptr 4 based pointer level 2 dcl 1-33 ref 72 vbl_size 1 based fixed bin(24,0) level 2 packed unsigned unaligned dcl 1-33 ref 73 vdesc_ptr parameter pointer dcl 34 set ref 11 65* vname parameter char unaligned dcl 31 set ref 11 68* vptr parameter pointer dcl 32 set ref 11 63* 72* vsize parameter fixed bin(24,0) dcl 33 set ref 11 64* 73* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. heap_header based structure level 1 unaligned dcl 1-64 heap_header_version_1 internal static char(8) initial unaligned dcl 1-71 variable_table_header based structure level 1 dcl 1-19 NAME DECLARED BY EXPLICIT CONTEXT. get_external_variable_ 000013 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 136 150 74 146 Length 346 74 12 161 41 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_external_variable_ 88 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_external_variable_ 000100 node_ptr get_external_variable_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return_mac ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. set_ext_variable_$locate NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. CONSTANTS 000000 aa 404000000043 000001 aa 404000000030 000002 aa 464000000000 000003 aa 526077777777 000004 aa 077777000043 000005 aa 000001000000 BEGIN PROCEDURE get_external_variable_ ENTRY TO get_external_variable_ STATEMENT 1 ON LINE 11 get_external_variable_: proc (vname, vptr, vsize, vdesc_ptr, code); 000006 at 000005000003 000007 tt 000002000001 000010 tt 000002000000 000011 ta 000006000000 000012 da 000035300000 000013 aa 000140 6270 00 eax7 96 000014 aa 7 00034 3521 20 epp2 pr7|28,* 000015 aa 2 01046 2721 00 tsp2 pr2|550 ext_entry_desc 000016 aa 000012000000 000017 aa 000000000000 000020 aa 6 00042 3735 20 epp7 pr6|34,* 000021 aa 7 00000 2361 20 ldq pr7|0,* 000022 aa 000002 6040 04 tmi 2,ic 000024 000023 aa 777777 3760 07 anq 262143,dl 000024 aa 0 00250 3761 00 anq pr0|168 = 000077777777 000025 aa 6 00102 7561 00 stq pr6|66 STATEMENT 1 ON LINE 63 vptr = null (); 000026 aa 777756 2370 04 ldaq -18,ic 000004 = 077777000043 000001000000 000027 aa 6 00032 3715 20 epp5 pr6|26,* 000030 aa 5 00004 7571 20 staq pr5|4,* vptr STATEMENT 1 ON LINE 64 vsize = 0; 000031 aa 5 00006 4501 20 stz pr5|6,* vsize STATEMENT 1 ON LINE 65 vdesc_ptr = null (); 000032 aa 5 00010 7571 20 staq pr5|8,* vdesc_ptr STATEMENT 1 ON LINE 66 code = 0; 000033 aa 5 00012 4501 20 stz pr5|10,* code STATEMENT 1 ON LINE 68 call set_ext_variable_$locate (vname, stackbaseptr (), node_ptr, code); 000034 aa 6 00000 3525 00 epbp2 pr6|0 000035 aa 6 00104 2521 00 spri2 pr6|68 000036 aa 5 00002 3521 20 epp2 pr5|2,* vname 000037 aa 6 00110 2521 00 spri2 pr6|72 000040 aa 6 00104 3521 00 epp2 pr6|68 000041 aa 6 00112 2521 00 spri2 pr6|74 000042 aa 6 00100 3521 00 epp2 pr6|64 node_ptr 000043 aa 6 00114 2521 00 spri2 pr6|76 000044 aa 5 00012 3521 20 epp2 pr5|10,* code 000045 aa 6 00116 2521 00 spri2 pr6|78 000046 aa 7 00000 3521 20 epp2 pr7|0,* 000047 aa 6 00120 2521 00 spri2 pr6|80 000050 aa 777732 3520 04 epp2 -38,ic 000002 = 464000000000 000051 aa 6 00122 2521 00 spri2 pr6|82 000052 aa 6 00124 2521 00 spri2 pr6|84 000053 aa 777725 3520 04 epp2 -43,ic 000000 = 404000000043 000054 aa 6 00126 2521 00 spri2 pr6|86 000055 aa 6 00106 6211 00 eax1 pr6|70 000056 aa 020000 4310 07 fld 8192,dl 000057 la 4 00010 3521 20 epp2 pr4|8,* set_ext_variable_$locate 000060 aa 0 00622 7001 00 tsx0 pr0|402 call_ext_out_desc STATEMENT 1 ON LINE 69 if code ^= 0 then return; 000061 aa 6 00032 3735 20 epp7 pr6|26,* 000062 aa 7 00012 2361 20 ldq pr7|10,* code 000063 aa 0 00631 6011 00 tnz pr0|409 return_mac STATEMENT 1 ON LINE 72 vptr = node_ptr -> variable_node.vbl_ptr; 000064 aa 6 00100 3715 20 epp5 pr6|64,* node_ptr 000065 aa 5 00004 3715 20 epp5 pr5|4,* variable_node.vbl_ptr 000066 aa 7 00004 6515 20 spri5 pr7|4,* vptr STATEMENT 1 ON LINE 73 vsize = node_ptr -> variable_node.vbl_size; 000067 aa 6 00100 3535 20 epp3 pr6|64,* node_ptr 000070 aa 3 00001 2351 00 lda pr3|1 variable_node.vbl_size 000071 aa 000060 7730 00 lrl 48 000072 aa 7 00006 7561 20 stq pr7|6,* vsize STATEMENT 1 ON LINE 75 return; 000073 aa 0 00631 7101 00 tra pr0|409 return_mac STATEMENT 1 ON LINE 80 end get_external_variable_; END PROCEDURE get_external_variable_ ----------------------------------------------------------- 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