COMPILATION LISTING OF SEGMENT get_location Compiled by: Multics PL/I Compiler, Version II of 30 August 1973. Compiled on: 03/26/74 1027.6 mst Tue Options: symbols optimize 1 /* ****************************************************** 2 * * 3 * * 4 * Copyright (c) 1972 by Massachusetts Institute of * 5 * Technology and Honeywell Information Systems, Inc. * 6 * * 7 * * 8 ****************************************************** */ 9 10 /* Procedure to obtain starting location of given statement in PL/I or Fortran program 11 12 Modified: 25 September 1972 by BLW for std object segment */ 13 14 get_location: proc(block_pt,line_no) returns(fixed bin(18)); 15 16 dcl block_pt ptr, /* points at symbol block */ 17 line_no fixed bin(18); /* line no whose loc is desired */ 18 19 dcl (p,q) ptr, 20 std bit(1) aligned, 21 (ln,loc,inc) fixed bin; 22 23 dcl (addrel,fixed,null,size) builtin; 24 25 dcl 1 map aligned based, 26 2 location unal bit(18), 27 2 line unal bit(18); 28 1 1 dcl 1 runtime_symbol aligned based, 1 2 2 flag unal bit(1), /* always "1"b for Version II */ 1 3 2 skip unal bit(1), 1 4 2 array_units unal bit(2), 1 5 2 units unal bit(2), /* addressing units */ 1 6 2 type unal bit(6), /* data type */ 1 7 2 level unal bit(6), /* structure level */ 1 8 2 ndims unal bit(6), /* number of dimensions */ 1 9 2 bits unal, 1 10 3 aligned bit(1), 1 11 3 packed bit(1), 1 12 3 simple bit(1), 1 13 3 decimal bit(1), 1 14 2 scale unal bit(8), /* arithmetic scale factor */ 1 15 2 name unal bit(18), /* rel ptr to acc name */ 1 16 2 brother unal bit(18), /* rel ptr to brother entry */ 1 17 2 father unal bit(18), /* rel ptr to father entry */ 1 18 2 son unal bit(18), /* rel ptr to son entry */ 1 19 2 address unal, 1 20 3 location bit(18), /* location in storage class */ 1 21 3 class bit(4), /* storage class */ 1 22 3 next bit(14), /* rel ptr to next of same class */ 1 23 2 size fixed bin(35), /* encoded string|arith size */ 1 24 2 offset fixed bin(35), /* encoded offset from address */ 1 25 2 virtual_org fixed bin(35), 1 26 2 bounds(1), 1 27 3 lower fixed bin(35), /* encoded lower bound */ 1 28 3 upper fixed bin(35), /* encoded upper bound */ 1 29 3 multiplier fixed bin(35); /* encoded multiplier */ 1 30 1 31 dcl 1 runtime_bound based, 1 32 2 lower fixed bin(35), 1 33 2 upper fixed bin(35), 1 34 2 multiplier fixed bin(35); 1 35 1 36 dcl 1 runtime_block aligned based, 1 37 2 flag unal bit(1), /* always "1"b for Version II */ 1 38 2 quick unal bit(1), /* "1"b if quick block */ 1 39 2 fortran unal bit(1), /* "1"b if fortran program */ 1 40 2 standard unal bit(1), /* "1"b if program has std obj segment */ 1 41 2 skip unal bit(2), 1 42 2 type unal bit(6), /* = 0 for a block node */ 1 43 2 number unal bit(6), /* begin block number */ 1 44 2 start unal bit(18), /* rel ptr to start of symbols */ 1 45 2 name unal bit(18), /* rel ptr to name of proc */ 1 46 2 brother unal bit(18), /* rel ptr to brother block */ 1 47 2 father unal bit(18), /* rel ptr to father block */ 1 48 2 son unal bit(18), /* rel ptr to son block */ 1 49 2 map unal, 1 50 3 first bit(18), /* rel ptr to first word of map */ 1 51 3 last bit(18), /* rel ptr to last word of map */ 1 52 2 entry_info unal bit(18), /* info about entry of quick block */ 1 53 2 header unal bit(18), /* rel ptr to symbol header */ 1 54 2 chain(4) unal bit(18), /* chain(i) is rel ptr to first symbol 1 55 on start list with length >= 2**i */ 1 56 2 token(0:5) unal bit(18); /* token(i) is rel ptr to first token 1 57 on list with length >= 2 ** i */ 1 58 1 59 dcl 1 runtime_token aligned based, 1 60 2 next unal bit(18), /* rel ptr to next token */ 1 61 2 dcl unal bit(18), /* rel ptr to first dcl of this token */ 1 62 2 size unal bit(9), /* number of chars in token */ 1 63 2 string unal char(n refer(runtime_token.size)); 29 2 1 dcl 1 statement_map aligned based, 2 2 2 location bit(18) unaligned, 2 3 2 source_id unaligned, 2 4 3 file bit(8), 2 5 3 line bit(14), 2 6 3 statement bit(5), 2 7 2 source_info unaligned, 2 8 3 start bit(18), 2 9 3 length bit(9); 30 31 32 q = block_pt; 33 if q = null then goto no; 34 35 if q -> runtime_block.first = (18)"0"b then goto no; 36 37 std = q -> runtime_block.standard; 38 if std then inc = size(statement_map); else inc = size(map); 39 40 p = addrel(q,q -> runtime_block.first); 41 q = addrel(q,fixed(q -> runtime_block.last,18) + inc); 42 43 do while(p ^= q); 44 45 if std then ln = fixed(p -> statement_map.source_id.line,14); 46 else ln = fixed(p -> map.line,18); 47 48 if ln = line_no 49 then do; 50 if std then loc = fixed(p -> statement_map.location,18); 51 else loc = fixed(p -> map.location,18); 52 return(loc); 53 end; 54 55 p = addrel(p,inc); 56 end; 57 58 no: return(-1); 59 end; INCLUDE FILES USED IN THIS COMPILATION. LINE NUMBER NAME PATHNAME 29 1 runtime_symbol.incl.pl1 >library_dir_dir>include>runtime_symbol.incl.pl1 30 2 statement_map.incl.pl1 >library_dir_dir>include>statement_map.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES NAMES DECLARED BY DECLARE STATEMENT. addrel builtin function internal dcl 23 ref 40 41 55 block_pt parameter pointer dcl 16 ref 14 32 first 3 based bit(18) level 3 packed unaligned dcl 1-36 ref 35 40 fixed builtin function internal dcl 23 ref 41 45 46 50 51 inc 000107 automatic fixed bin(17,0) dcl 19 set ref 38 38 41 55 last 3(18) based bit(18) level 3 packed unaligned dcl 1-36 ref 41 line 0(26) based bit(14) level 3 packed unaligned dcl 2-1 ref 45 line 0(18) based bit(18) level 2 packed unaligned dcl 25 ref 46 line_no parameter fixed bin(18,0) dcl 16 ref 14 48 ln 000105 automatic fixed bin(17,0) dcl 19 set ref 45 46 48 loc 000106 automatic fixed bin(17,0) dcl 19 set ref 50 51 52 location based bit(18) level 2 packed unaligned dcl 2-1 ref 50 location based bit(18) level 2 packed unaligned dcl 25 ref 51 map based structure level 1 packed dcl 25 ref 38 null builtin function internal dcl 23 ref 33 p 000100 automatic pointer dcl 19 set ref 40 43 45 46 50 51 55 55 q 000102 automatic pointer dcl 19 set ref 32 33 35 37 40 40 41 41 41 43 size builtin function internal dcl 23 ref 38 38 standard 0(03) based bit(1) level 2 packed unaligned dcl 1-36 ref 37 statement_map based structure level 1 packed dcl 2-1 ref 38 std 000104 automatic bit(1) dcl 19 set ref 37 38 45 50 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. address 3 based structure level 2 packed unaligned dcl 1-1 aligned 0(24) based bit(1) level 3 packed unaligned dcl 1-1 array_units 0(02) based bit(2) level 2 packed unaligned dcl 1-1 bits 0(24) based structure level 2 packed unaligned dcl 1-1 bounds 7 based structure array level 2 dcl 1-1 brother 1(18) based bit(18) level 2 packed unaligned dcl 1-36 brother 1(18) based bit(18) level 2 packed unaligned dcl 1-1 chain 5 based bit(18) array level 2 packed unaligned dcl 1-36 class 3(18) based bit(4) level 3 packed unaligned dcl 1-1 dcl 0(18) based bit(18) level 2 packed unaligned dcl 1-59 decimal 0(27) based bit(1) level 3 packed unaligned dcl 1-1 entry_info 4 based bit(18) level 2 packed unaligned dcl 1-36 father 2 based bit(18) level 2 packed unaligned dcl 1-36 father 2 based bit(18) level 2 packed unaligned dcl 1-1 file 0(18) based bit(8) level 3 packed unaligned dcl 2-1 flag based bit(1) level 2 packed unaligned dcl 1-1 flag based bit(1) level 2 packed unaligned dcl 1-36 fortran 0(02) based bit(1) level 2 packed unaligned dcl 1-36 header 4(18) based bit(18) level 2 packed unaligned dcl 1-36 length 1(27) based bit(9) level 3 packed unaligned dcl 2-1 level 0(12) based bit(6) level 2 packed unaligned dcl 1-1 location 3 based bit(18) level 3 packed unaligned dcl 1-1 lower 7 based fixed bin(35,0) array level 3 dcl 1-1 lower based fixed bin(35,0) level 2 dcl 1-31 map 3 based structure level 2 packed unaligned dcl 1-36 multiplier 11 based fixed bin(35,0) array level 3 dcl 1-1 multiplier 2 based fixed bin(35,0) level 2 dcl 1-31 name 1 based bit(18) level 2 packed unaligned dcl 1-1 name 1 based bit(18) level 2 packed unaligned dcl 1-36 ndims 0(18) based bit(6) level 2 packed unaligned dcl 1-1 next based bit(18) level 2 packed unaligned dcl 1-59 next 3(22) based bit(14) level 3 packed unaligned dcl 1-1 number 0(12) based bit(6) level 2 packed unaligned dcl 1-36 offset 5 based fixed bin(35,0) level 2 dcl 1-1 packed 0(25) based bit(1) level 3 packed unaligned dcl 1-1 quick 0(01) based bit(1) level 2 packed unaligned dcl 1-36 runtime_block based structure level 1 packed dcl 1-36 runtime_bound based structure level 1 unaligned dcl 1-31 runtime_symbol based structure level 1 dcl 1-1 runtime_token based structure level 1 packed dcl 1-59 scale 0(28) based bit(8) level 2 packed unaligned dcl 1-1 simple 0(26) based bit(1) level 3 packed unaligned dcl 1-1 size 1 based bit(9) level 2 packed unaligned dcl 1-59 size 4 based fixed bin(35,0) level 2 dcl 1-1 skip 0(01) based bit(1) level 2 packed unaligned dcl 1-1 skip 0(04) based bit(2) level 2 packed unaligned dcl 1-36 son 2(18) based bit(18) level 2 packed unaligned dcl 1-1 son 2(18) based bit(18) level 2 packed unaligned dcl 1-36 source_id 0(18) based structure level 2 packed unaligned dcl 2-1 source_info 1(09) based structure level 2 packed unaligned dcl 2-1 start 0(18) based bit(18) level 2 packed unaligned dcl 1-36 start 1(09) based bit(18) level 3 packed unaligned dcl 2-1 statement 1(04) based bit(5) level 3 packed unaligned dcl 2-1 string 1(09) based char level 2 packed unaligned dcl 1-59 token 7 based bit(18) array level 2 packed unaligned dcl 1-36 type 0(06) based bit(6) level 2 packed unaligned dcl 1-36 type 0(06) based bit(6) level 2 packed unaligned dcl 1-1 units 0(04) based bit(2) level 2 packed unaligned dcl 1-1 upper 10 based fixed bin(35,0) array level 3 dcl 1-1 upper 1 based fixed bin(35,0) level 2 dcl 1-31 virtual_org 6 based fixed bin(35,0) level 2 dcl 1-1 NAMES DECLARED BY EXPLICIT CONTEXT. get_location 000005 constant entry external dcl 14 ref 14 no 000117 constant label dcl 58 ref 33 35 58 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 152 164 123 162 Length 362 123 12 164 27 2 External procedure get_location uses 73 words of automatic storage THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. ----------------------------------------------------------- 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