COMPILATION LISTING OF SEGMENT get_display_steps Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 11/02/83 1430.9 mst Wed 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 get_display_steps: proc (P_start, P_goal) returns (fixed bin); 11 12 /* given ptrs to runtime_block nodes P_start and P_goal, where P_start is contained in P_goal, 13* calculate the number of display frames that will exist between them. 14* 15* Created: 23 Feb 79 James R. Davis 16* Modified: June 83 JMAthane to know PASCAL with blocks 17**/ 18 19 dcl P_start ptr parameter; 20 dcl P_goal ptr parameter; 21 22 dcl steps fixed bin; 23 dcl op ptr; 24 25 steps = 0; 26 do op = owner_of (P_start) 27 repeat (prev_frame_owner (op)) 28 while (op ^= owner_of (P_goal)); 29 steps = steps + 1; 30 end; 31 return (steps); 32 33 prev_frame_owner: proc (qp) returns (ptr); 34 35 /* qp pts to a runtime block node that is a frame owner - return ptr to the 36* block node that owns the frame that the display ptr of this frame must pt to. 37* The lexical father of this block - which, if non-quick, is the desired block, 38* but if quick - its owner is the one we want. */ 39 dcl qp ptr parameter; 40 41 return (owner_of (father_of (qp))); 42 43 end; 44 45 46 47 father_of: proc (qp) returns (ptr); 48 dcl qp ptr parameter; 49 return (addrel (qp, qp -> symbol_block.father)); 50 end father_of; 51 52 53 54 owner_of: proc (qp) returns (ptr); 55 56 /* return ptr to runtime_block of block that owns the frame we use - if non-quick this is 57* ourself - if quick, use the owner field. Older segs don't have this, so must assume that 58* father is owner but this need not be true. Old segs must be recompiled so this info will 59* be available */ 60 dcl qp ptr parameter; 61 62 if qp -> symbol_block.type = PASCAL_WITH_BLOCK 63 then return (addrel (qp, qp -> symbol_block.owner)); 64 else if qp -> symbol_block.quick 65 then if qp -> symbol_block.owner_flag 66 then return (addrel (qp, qp -> symbol_block.owner)); 67 else return (father_of (qp)); 68 else return (qp); /* non-quicks own their own frame */ 69 end owner_of; 70 1 1 /* BEGIN INCLUDE FILE ... runtime_symbol_block.incl.pl1 */ 1 2 1 3 /* copied from runtime_symbol.incl.pl1 and updated January 1983 by Melanie Weaver */ 1 4 1 5 dcl 1 symbol_block aligned based, 1 6 2 flag unal bit (1), /* always "1"b for Version II */ 1 7 2 quick unal bit (1), /* "1"b if quick block */ 1 8 2 fortran unal bit (1), /* "1"b if fortran program */ 1 9 2 standard unal bit (1), /* "1"b if program has std obj segment */ 1 10 2 owner_flag unal bit (1), /* "1"b if block has valid owner field */ 1 11 2 skip unal bit (1), 1 12 2 type unal fixed bin (6) unsigned, /* = 0 for a block node */ 1 13 2 number unal fixed bin (6) unsigned, /* begin block number */ 1 14 2 start unal fixed bin (18) unsigned, /* rel ptr to start of symbols */ 1 15 2 name unal fixed bin (18) unsigned, /* rel ptr to name of proc */ 1 16 2 brother unal fixed bin (18) unsigned, /* rel ptr to brother block */ 1 17 2 father unal fixed bin (18) unsigned, /* rel ptr to father block */ 1 18 2 son unal fixed bin (18) unsigned, /* rel ptr to son block */ 1 19 2 map unal, 1 20 3 first fixed bin (18) unsigned,/* rel ptr to first word of map */ 1 21 3 last fixed bin (18) unsigned,/* rel ptr to last word of map */ 1 22 2 entry_info unal fixed bin (18) unsigned, /* info about entry of quick block */ 1 23 2 header unal fixed bin (18) unsigned, /* rel ptr to symbol header */ 1 24 2 chain (4) unal fixed bin (18) unsigned, /* chain(i) is rel ptr to first symbol 1 25* on start list with length >= 2**i */ 1 26 2 token (0:5) unal fixed bin (18) unsigned, /* token(i) is rel ptr to first token 1 27* on list with length >= 2 ** i */ 1 28 2 owner unal fixed bin (18) unsigned; /* rel ptr to owner block */ 1 29 1 30 dcl 1 with_symbol_block aligned based, /* version for PASCAL with blocks (type = 5) */ 1 31 2 common_block_info aligned like symbol_block, 1 32 2 with_string unal fixed bin (18) unsigned, 1 33 /* rel ptr to string used in with statement */ 1 34 2 real_level_1 unal fixed bin (18) unsigned; 1 35 /* rel ptr to original level 1 record node */ 1 36 1 37 dcl 1 symbol_token aligned based, 1 38 2 next unal fixed bin (18) unsigned, /* rel ptr to next token */ 1 39 2 dcl unal fixed bin (18) unsigned, /* rel ptr to first dcl of this token */ 1 40 2 name, /* ACC */ 1 41 3 size unal unsigned fixed bin (9), /* number of chars in token */ 1 42 3 string unal char (name_size refer (symbol_token.size)); 1 43 1 44 dcl name_size fixed bin (9) unsigned; /* number of chars in token */ 1 45 1 46 /* END INCLUDE FILE ... runtime_symbol_block.incl.pl1 */ 71 2 1 2 2 /* BEGIN INCLUDE FILE runtime_block_type.incl.pl1 */ 2 3 2 4 /* Created 1983 by JMAthane */ 2 5 /* modified October 1983 by M. Weaver */ 2 6 /* This include file contains the defined values for symbol_block.type. 2 7* As of 10/83, these values are used only by Pascal */ 2 8 2 9 dcl (EXTERNAL_ENTRY init (1), 2 10 NON_QUICK_INTERNAL_PROCEDURE init (2), 2 11 QUICK_INTERNAL_PROCEDURE init (3), 2 12 BEGIN_BLOCK init (4), 2 13 PASCAL_WITH_BLOCK init (5)) fixed bin int static options (constant); 2 14 2 15 /* END INCLUDE FILE runtime_block_type.incl.pl1 */ 2 16 72 73 end get_display_steps; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/02/83 1430.9 get_display_steps.pl1 >special_ldd>on>pascal>get_display_steps.pl1 71 1 11/02/83 1225.9 runtime_symbol_block.incl.pl1 >special_ldd>on>pascal>runtime_symbol_block.incl.pl1 72 2 11/02/83 1225.9 runtime_block_type.incl.pl1 >special_ldd>on>pascal>runtime_block_type.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. PASCAL_WITH_BLOCK constant fixed bin(17,0) initial dcl 2-9 ref 62 P_goal parameter pointer dcl 20 set ref 10 26* P_start parameter pointer dcl 19 set ref 10 26* father 2 based fixed bin(18,0) level 2 packed unsigned unaligned dcl 1-5 ref 49 op 000102 automatic pointer dcl 23 set ref 26* 26* 30* owner 12 based fixed bin(18,0) level 2 packed unsigned unaligned dcl 1-5 ref 62 64 owner_flag 0(04) based bit(1) level 2 packed unaligned dcl 1-5 ref 64 qp parameter pointer dcl 48 in procedure "father_of" ref 47 49 49 qp parameter pointer dcl 60 in procedure "owner_of" set ref 54 62 62 62 64 64 64 64 67* 68 qp parameter pointer dcl 39 in procedure "prev_frame_owner" set ref 33 41* 41* quick 0(01) based bit(1) level 2 packed unaligned dcl 1-5 ref 64 steps 000100 automatic fixed bin(17,0) dcl 22 set ref 25* 29* 29 31 symbol_block based structure level 1 dcl 1-5 type 0(06) based fixed bin(6,0) level 2 packed unsigned unaligned dcl 1-5 ref 62 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. BEGIN_BLOCK internal static fixed bin(17,0) initial dcl 2-9 EXTERNAL_ENTRY internal static fixed bin(17,0) initial dcl 2-9 NON_QUICK_INTERNAL_PROCEDURE internal static fixed bin(17,0) initial dcl 2-9 QUICK_INTERNAL_PROCEDURE internal static fixed bin(17,0) initial dcl 2-9 name_size automatic fixed bin(9,0) unsigned dcl 1-44 symbol_token based structure level 1 dcl 1-37 with_symbol_block based structure level 1 dcl 1-30 NAMES DECLARED BY EXPLICIT CONTEXT. father_of 000073 constant entry internal dcl 47 ref 41 41 67 get_display_steps 000006 constant entry external dcl 10 owner_of 000104 constant entry internal dcl 54 ref 26 26 41 prev_frame_owner 000053 constant entry internal dcl 33 ref 30 NAME DECLARED BY CONTEXT OR IMPLICATION. addrel builtin function ref 49 62 64 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 222 232 174 232 Length 440 174 10 171 26 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_display_steps 118 external procedure is an external procedure. prev_frame_owner internal procedure shares stack frame of external procedure get_display_steps. father_of internal procedure shares stack frame of external procedure get_display_steps. owner_of internal procedure shares stack frame of external procedure get_display_steps. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_display_steps 000100 steps get_display_steps 000102 op get_display_steps 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. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000002 25 000013 26 000014 29 000043 30 000044 31 000047 33 000053 41 000055 47 000073 49 000075 54 000104 62 000106 64 000123 67 000140 68 000154 ----------------------------------------------------------- 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