COMPILATION LISTING OF SEGMENT get_line_no Compiled by: Multics PL/I Compiler, Version II of 30 August 1973. Compiled on: 03/26/74 1031.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 get the line number corresponding to a given location 11 in an object segment compiled by PL/I or Fortran 12 13 Modified: 25 September 1972 by BLW for std obj segment */ 14 15 get_line_no: proc(block_pt,offset,start,num,line_no); 16 17 dcl block_pt ptr, /* points at symbol block */ 18 offset fixed bin(18), /* an offset in text segment (input) */ 19 start fixed bin(18), /* set to start location of statement */ 20 num fixed bin(18), /* set to number of words in statement */ 21 line_no fixed bin(18); /* set to line number of statement */ 22 23 dcl (p,q) ptr, 24 std bit(1) aligned, 25 (ln,loc,inc) fixed bin(18); 26 27 dcl (addrel,fixed,null,size) builtin; 28 29 dcl 1 map aligned based, 30 2 location unal bit(18), 31 2 line unal bit(18); 32 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)); 33 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); 34 35 36 q = block_pt; 37 if q = null then goto no; 38 39 if q -> runtime_block.first = (18)"0"b then goto no; 40 41 std = q -> runtime_block.standard; 42 if std then inc = size(statement_map); else inc = size(map); 43 44 p = addrel(q,q -> runtime_block.first); 45 q = addrel(q,fixed(q -> runtime_block.last,18) + inc); 46 47 line_no = -1; 48 49 do while(p ^= q); 50 51 if std 52 then do; 53 ln = fixed(p -> statement_map.source_id.line,14); 54 loc = fixed(p -> statement_map.location,18); 55 end; 56 else do; 57 ln = fixed(p -> map.line,18); 58 loc = fixed(p -> map.location,18); 59 end; 60 61 if loc <= offset 62 then if line_no ^= ln 63 then do; 64 start = loc; 65 line_no = ln; 66 end; 67 else; 68 else do; 69 if line_no = ln then goto step; 70 if line_no = -1 then goto no; 71 num = loc - start; 72 return; 73 end; 74 75 step: p = addrel(p,inc); 76 end; 77 78 no: start = -1; 79 end; INCLUDE FILES USED IN THIS COMPILATION. LINE NUMBER NAME PATHNAME 33 1 runtime_symbol.incl.pl1 >library_dir_dir>include>runtime_symbol.incl.pl1 34 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 27 ref 44 45 75 block_pt parameter pointer dcl 17 ref 15 36 first 3 based bit(18) level 3 packed unaligned dcl 1-36 ref 39 44 fixed builtin function internal dcl 27 ref 45 53 54 57 58 inc 000107 automatic fixed bin(18,0) dcl 23 set ref 42 42 45 75 last 3(18) based bit(18) level 3 packed unaligned dcl 1-36 ref 45 line 0(26) based bit(14) level 3 packed unaligned dcl 2-1 ref 53 line 0(18) based bit(18) level 2 packed unaligned dcl 29 ref 57 line_no parameter fixed bin(18,0) dcl 17 set ref 15 47 61 65 69 70 ln 000105 automatic fixed bin(18,0) dcl 23 set ref 53 57 61 65 69 loc 000106 automatic fixed bin(18,0) dcl 23 set ref 54 58 61 64 71 location based bit(18) level 2 packed unaligned dcl 29 ref 58 location based bit(18) level 2 packed unaligned dcl 2-1 ref 54 map based structure level 1 packed dcl 29 ref 42 null builtin function internal dcl 27 ref 37 num parameter fixed bin(18,0) dcl 17 set ref 15 71 offset parameter fixed bin(18,0) dcl 17 ref 15 61 p 000100 automatic pointer dcl 23 set ref 44 49 53 54 57 58 75 75 q 000102 automatic pointer dcl 23 set ref 36 37 39 41 44 44 45 45 45 49 size builtin function internal dcl 27 ref 42 42 standard 0(03) based bit(1) level 2 packed unaligned dcl 1-36 ref 41 start parameter fixed bin(18,0) dcl 17 set ref 15 64 71 78 statement_map based structure level 1 packed dcl 2-1 ref 42 std 000104 automatic bit(1) dcl 23 set ref 41 42 51 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-36 flag based bit(1) level 2 packed unaligned dcl 1-1 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-36 name 1 based bit(18) level 2 packed unaligned dcl 1-1 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(04) based bit(2) level 2 packed unaligned dcl 1-36 skip 0(01) based bit(1) level 2 packed unaligned dcl 1-1 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-1 type 0(06) based bit(6) level 2 packed unaligned dcl 1-36 units 0(04) based bit(2) level 2 packed unaligned dcl 1-1 upper 1 based fixed bin(35,0) level 2 dcl 1-31 upper 10 based fixed bin(35,0) array level 3 dcl 1-1 virtual_org 6 based fixed bin(35,0) level 2 dcl 1-1 NAMES DECLARED BY EXPLICIT CONTEXT. get_line_no 000005 constant entry external dcl 15 ref 15 no 000134 constant label dcl 78 ref 37 39 70 78 step 000127 constant label dcl 75 ref 69 75 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 170 202 141 200 Length 400 141 12 164 27 2 External procedure get_line_no 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