COMPILATION LISTING OF SEGMENT legal_f_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/86 1030.5 mst Wed Options: optimize map 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 legal_f_: proc (arg_stack_frame_ptr, code); 12 13 /* This procedure makes some validity checks on the stack frame pointer. It makes sure the current stack frame 14* and the previous and next frames are at location modulo 16. If the current and next frame are in the same 15* segment, the procedure checks that they are in order. 16**/ 17 18 dcl arg_stack_frame_ptr ptr; /* ptr to stack frame to be checked */ 19 dcl code fixed bin (35); 20 21 dcl (null, baseno, fixed, rel) builtin; 1 1 /* BEGIN INCLUDE FILE ... stack_frame.incl.pl1 ... */ 1 2 1 3 /* format: off */ 1 4 1 5 /* Modified: 16 Dec 1977, D. Levin - to add fio_ps_ptr and pl1_ps_ptr */ 1 6 /* Modified: 3 Feb 1978, P. Krupp - to add run_unit_manager bit & main_proc bit */ 1 7 /* Modified: 21 March 1978, D. Levin - change fio_ps_ptr to support_ptr */ 1 8 /* Modified: 03/01/84, S. Herbst - Added RETURN_PTR_MASK */ 1 9 1 10 1 11 /****^ HISTORY COMMENTS: 1 12* 1) change(86-09-15,Kissel), approve(86-09-15,MCR7473), 1 13* audit(86-10-01,Fawcett), install(86-11-03,MR12.0-1206): 1 14* Modified to add constants for the translator_id field in the stack_frame 1 15* structure. 1 16* END HISTORY COMMENTS */ 1 17 1 18 1 19 dcl RETURN_PTR_MASK bit (72) int static options (constant) /* mask to be AND'd with stack_frame.return_ptr */ 1 20 init ("777777777777777777000000"b3); /* when copying, to ignore bits that a call fills */ 1 21 /* with indicators (nonzero for Fortran hexfp caller) */ 1 22 /* say: unspec(ptr) = unspec(stack_frame.return_ptr) & RETURN_PTR_MASK; */ 1 23 1 24 dcl TRANSLATOR_ID_PL1V2 bit (18) internal static options (constant) init ("000000"b3); 1 25 dcl TRANSLATOR_ID_ALM bit (18) internal static options (constant) init ("000001"b3); 1 26 dcl TRANSLATOR_ID_PL1V1 bit (18) internal static options (constant) init ("000002"b3); 1 27 dcl TRANSLATOR_ID_SIGNAL_CALLER bit (18) internal static options (constant) init ("000003"b3); 1 28 dcl TRANSLATOR_ID_SIGNALLER bit (18) internal static options (constant) init ("000004"b3); 1 29 1 30 1 31 dcl sp pointer; /* pointer to beginning of stack frame */ 1 32 1 33 dcl stack_frame_min_length fixed bin static init(48); 1 34 1 35 1 36 dcl 1 stack_frame based(sp) aligned, 1 37 2 pointer_registers(0 : 7) ptr, 1 38 2 prev_sp pointer, 1 39 2 next_sp pointer, 1 40 2 return_ptr pointer, 1 41 2 entry_ptr pointer, 1 42 2 operator_and_lp_ptr ptr, /* serves as both */ 1 43 2 arg_ptr pointer, 1 44 2 static_ptr ptr unaligned, 1 45 2 support_ptr ptr unal, /* only used by fortran I/O */ 1 46 2 on_unit_relp1 bit(18) unaligned, 1 47 2 on_unit_relp2 bit(18) unaligned, 1 48 2 translator_id bit(18) unaligned, /* Translator ID (see constants above) 1 49* 0 => PL/I version II 1 50* 1 => ALM 1 51* 2 => PL/I version I 1 52* 3 => signal caller frame 1 53* 4 => signaller frame */ 1 54 2 operator_return_offset bit(18) unaligned, 1 55 2 x(0: 7) bit(18) unaligned, /* index registers */ 1 56 2 a bit(36), /* accumulator */ 1 57 2 q bit(36), /* q-register */ 1 58 2 e bit(36), /* exponent */ 1 59 2 timer bit(27) unaligned, /* timer */ 1 60 2 pad bit(6) unaligned, 1 61 2 ring_alarm_reg bit(3) unaligned; 1 62 1 63 1 64 dcl 1 stack_frame_flags based(sp) aligned, 1 65 2 pad(0 : 7) bit(72), /* skip over prs */ 1 66 2 xx0 bit(22) unal, 1 67 2 main_proc bit(1) unal, /* on if frame belongs to a main procedure */ 1 68 2 run_unit_manager bit(1) unal, /* on if frame belongs to run unit manager */ 1 69 2 signal bit(1) unal, /* on if frame belongs to logical signal_ */ 1 70 2 crawl_out bit(1) unal, /* on if this is a signal caller frame */ 1 71 2 signaller bit(1) unal, /* on if next frame is signaller's */ 1 72 2 link_trap bit(1) unal, /* on if this frame was made by the linker */ 1 73 2 support bit(1) unal, /* on if frame belongs to a support proc */ 1 74 2 condition bit(1) unal, /* on if condition established in this frame */ 1 75 2 xx0a bit(6) unal, 1 76 2 xx1 fixed bin, 1 77 2 xx2 fixed bin, 1 78 2 xx3 bit(25) unal, 1 79 2 old_crawl_out bit (1) unal, /* on if this is a signal caller frame */ 1 80 2 old_signaller bit(1) unal, /* on if next frame is signaller's */ 1 81 2 xx3a bit(9) unaligned, 1 82 2 xx4(9) bit(72) aligned, 1 83 2 v2_pl1_op_ret_base ptr, /* When a V2 PL/I program calls an operator the 1 84* * operator puts a pointer to the base of 1 85* * the calling procedure here. (text base ptr) */ 1 86 2 xx5 bit(72) aligned, 1 87 2 pl1_ps_ptr ptr; /* ptr to ps for this frame; also used by fio. */ 1 88 1 89 /* format: on */ 1 90 1 91 /* END INCLUDE FILE ... stack_frame.incl.pl1 */ 22 23 24 /* */ 25 code = 0; 26 sp = arg_stack_frame_ptr; 27 if sp = null then code = 1; 28 else do; 29 call check_ptr (sp); 30 call check_ptr (sp -> stack_frame.prev_sp); 31 call check_ptr (sp -> stack_frame.next_sp); 32 33 call check_frame (sp, sp -> stack_frame.next_sp); 34 call check_frame (sp -> stack_frame.prev_sp, sp); 35 end; 36 37 return; 38 39 /* */ 40 /* If a stack frame pointer is not null, it must be modulo 16. */ 41 42 check_ptr: proc (p); 43 44 dcl p ptr; 45 dcl zero_mod_16_test bit (18) aligned static options (constant) init ("000000000000001111"b); 46 47 if p ^= null then if rel (p) & zero_mod_16_test then code = 1; 48 49 end check_ptr; 50 51 52 /* If two stack frame pointers are in the same segment, a check is made that the second frame follows the first 53* and that the first stack frame is of the minimum length. */ 54 55 check_frame: proc (s1, s2); 56 57 dcl s1 ptr; /* ptr to lower stack frame */ 58 dcl s2 ptr; /* ptr to higher stack frame */ 59 60 if baseno (s1) = baseno (s2) 61 then if fixed (rel (s2), 18) - fixed (rel (s1), 18) < stack_frame_min_length then code = 1; 62 63 return; 64 65 end check_frame; 66 67 end legal_f_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/86 1042.2 legal_f_.pl1 >special_ldd>install>MR12.0-1206>legal_f_.pl1 22 1 11/03/86 1114.7 stack_frame.incl.pl1 >special_ldd>install>MR12.0-1206>stack_frame.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. arg_stack_frame_ptr parameter pointer dcl 18 ref 11 26 baseno builtin function dcl 21 ref 60 60 code parameter fixed bin(35,0) dcl 19 set ref 11 25* 27* 47* 60* fixed builtin function dcl 21 ref 60 60 next_sp 22 based pointer level 2 dcl 1-36 set ref 31* 33* null builtin function dcl 21 ref 27 47 p parameter pointer dcl 44 ref 42 47 47 prev_sp 20 based pointer level 2 dcl 1-36 set ref 30* 34* rel builtin function dcl 21 ref 47 60 60 s1 parameter pointer dcl 57 ref 55 60 60 s2 parameter pointer dcl 58 ref 55 60 60 sp 000100 automatic pointer dcl 1-31 set ref 26* 27 29* 30 31 33* 33 34 34* stack_frame based structure level 1 dcl 1-36 stack_frame_min_length constant fixed bin(17,0) initial dcl 1-33 ref 60 zero_mod_16_test constant bit(18) initial dcl 45 ref 47 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. RETURN_PTR_MASK internal static bit(72) initial unaligned dcl 1-19 TRANSLATOR_ID_ALM internal static bit(18) initial unaligned dcl 1-25 TRANSLATOR_ID_PL1V1 internal static bit(18) initial unaligned dcl 1-26 TRANSLATOR_ID_PL1V2 internal static bit(18) initial unaligned dcl 1-24 TRANSLATOR_ID_SIGNALLER internal static bit(18) initial unaligned dcl 1-28 TRANSLATOR_ID_SIGNAL_CALLER internal static bit(18) initial unaligned dcl 1-27 stack_frame_flags based structure level 1 dcl 1-64 NAMES DECLARED BY EXPLICIT CONTEXT. check_frame 000113 constant entry internal dcl 55 ref 33 34 check_ptr 000074 constant entry internal dcl 42 ref 29 30 31 legal_f_ 000010 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 174 204 150 204 Length 370 150 10 147 24 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME legal_f_ 93 external procedure is an external procedure. check_ptr internal procedure shares stack frame of external procedure legal_f_. check_frame internal procedure shares stack frame of external procedure legal_f_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME legal_f_ 000100 sp legal_f_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac 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 11 000004 25 000015 26 000017 27 000022 29 000031 30 000033 31 000042 33 000051 34 000062 37 000073 42 000074 47 000076 49 000112 55 000113 60 000115 63 000143 ----------------------------------------------------------- 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