COMPILATION LISTING OF SEGMENT get_oncode Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1438.6 mst Mon 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_oncode: proc() returns(fixed bin(35)) options(support); 11 12 /* recoded by M. Weaver 1/14/74 for new pl1 signalling discipline */ 13 /* BIM 10/82 to compile again */ 14 15 dcl code fixed bin(35); 16 dcl err_count fixed bin; 17 dcl (sp, nsp) ptr; 18 dcl (addr, null) builtin; 19 dcl find_condition_frame_ entry(ptr) returns(ptr); 20 dcl find_condition_info_ entry (ptr, ptr, fixed bin(35)); 21 1 1 /* BEGIN INCLUDE FILE ... pl1_info.incl.pl1 */ 1 2 /* This is intended to be used by all procedures raising pl1 conditions and by the default handler */ 1 3 /* Created June 1981 by Benson I. Margulies from pl1_info_struc.incl.pl1 */ 1 4 /* This include file must be used with condition_info_header.incl.pl1. Both must be %included */ 1 5 1 6 declare pl1_info_ptr pointer; 1 7 declare 1 pl1_info aligned based (pl1_info_ptr), 1 8 2 header aligned like condition_info_header, 1 9 2 id char(8) aligned, /* init "pliocond"; indicates pl1 structure */ 1 10 2 content_flags aligned, 1 11 (3 v1_sw, /* on if raised by version 1 */ 1 12 3 oncode_sw, /* "1"b->valid oncode */ 1 13 3 onfile_sw, /* "1"b->file name is in structure */ 1 14 3 file_ptr_sw, /* "1"b->file is associated with this condition */ 1 15 3 onsource_sw, /* "1"b->valid onsource string for this condition */ 1 16 3 onchar_sw, /* "1"b->valid onchar index in this structure */ 1 17 3 onkey_sw, /* "1"b->valid onkey string in this structure */ 1 18 3 onfield_sw) bit(1) unaligned, /* "1"b->valid onfield string in this structure */ 1 19 2 oncode fixed bin(35), /* oncode for condition */ 1 20 2 onfile char(32) aligned, /* onfile string */ 1 21 2 file_ptr ptr, /* pointer to file value */ 1 22 2 onsource char(256) var, /* onsource string */ 1 23 2 oncharindex fixed bin, /* char offset in onsource of offending char */ 1 24 2 onkey_onfield char(256) var; /* either onkey string or onfield string */ 1 25 1 26 /* END INCLUDE FILE ... pl1_info.incl.pl1 */ 22 2 1 /* BEGIN INCLUDE FILE condition_info_header.incl.pl1 BIM 1981 */ 2 2 /* format: style2 */ 2 3 2 4 declare condition_info_header_ptr 2 5 pointer; 2 6 declare 1 condition_info_header 2 7 aligned based (condition_info_header_ptr), 2 8 2 length fixed bin, /* length in words of this structure */ 2 9 2 version fixed bin, /* version number of this structure */ 2 10 2 action_flags aligned, /* tell handler how to proceed */ 2 11 3 cant_restart bit (1) unaligned, /* caller doesn't ever want to be returned to */ 2 12 3 default_restart bit (1) unaligned, /* caller can be returned to with no further action */ 2 13 3 quiet_restart bit (1) unaligned, /* return, and print no message */ 2 14 3 support_signal bit (1) unaligned, /* treat this signal as if the signalling procedure had the support bit set */ 2 15 /* if the signalling procedure had the support bit set, do the same for its caller */ 2 16 3 pad bit (32) unaligned, 2 17 2 info_string char (256) varying, /* may contain printable message */ 2 18 2 status_code fixed bin (35); /* if^=0, code interpretable by com_err_ */ 2 19 2 20 /* END INCLUDE FILE condition_info_header.incl.pl1 */ 23 3 1 /* BEGIN INCLUDE FILE ... condition_info.incl.pl1 */ 3 2 3 3 /* Structure for find_condition_info_. 3 4* 3 5* Written 1-Mar-79 by M. N. Davidoff. 3 6**/ 3 7 3 8 /* automatic */ 3 9 3 10 declare condition_info_ptr pointer; 3 11 3 12 /* based */ 3 13 3 14 declare 1 condition_info aligned based (condition_info_ptr), 3 15 2 mc_ptr pointer, /* pointer to machine conditions at fault time */ 3 16 2 version fixed binary, /* Must be 1 */ 3 17 2 condition_name char (32) varying, /* name of condition */ 3 18 2 info_ptr pointer, /* pointer to the condition data structure */ 3 19 2 wc_ptr pointer, /* pointer to wall crossing machine conditions */ 3 20 2 loc_ptr pointer, /* pointer to location where condition occured */ 3 21 2 flags unaligned, 3 22 3 crawlout bit (1), /* on if condition occured in lower ring */ 3 23 3 pad1 bit (35), 3 24 2 pad2 bit (36), 3 25 2 user_loc_ptr pointer, /* ptr to most recent nonsupport loc before condition occurred */ 3 26 2 pad3 (4) bit (36); 3 27 3 28 /* internal static */ 3 29 3 30 declare condition_info_version_1 3 31 fixed binary internal static options (constant) initial (1); 3 32 3 33 /* END INCLUDE FILE ... condition_info.incl.pl1 */ 24 25 declare 1 CI aligned like condition_info; 26 27 /* */ 28 /* There is a valid oncode for each condition. If the oncode for the most 29* recent condition on the stack has been explicitly set in a pl1 info structure 30* then we return that value. Otherwise we return 0. */ 31 32 sp, nsp = null; /* initialize; start with most recent frame */ 33 err_count = 0; /* count of error frames */ 34 35 find_frame: 36 nsp = find_condition_frame_ (sp); /* get ptr to next condition frame */ 37 if nsp = null then return (0); /* give up */ 38 39 call find_condition_info_ (nsp, addr(CI), code); 40 /* get info for most recent condition */ 41 if code ^= 0 then return (0); /* give up; can't really find anything */ 42 if CI.info_ptr ^= null 43 then if CI.info_ptr -> pl1_info.id = "pliocond" 44 then if CI.info_ptr -> pl1_info.oncode_sw 45 then return (CI.info_ptr -> pl1_info.oncode); 46 47 /* if error was signalled because of some other condition (i.e. has no info structure) 48* return oncode for other condition */ 49 50 if CI.condition_name = "error" then if err_count = 0 then do; /* skip first error frame */ 51 err_count = 1; 52 sp = nsp; 53 go to find_frame; 54 end; 55 56 return (0); /* no explicit oncode set */ 57 58 end get_oncode; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1005.9 get_oncode.pl1 >spec>on>pl128d>get_oncode.pl1 22 1 07/18/81 1100.0 pl1_info.incl.pl1 >ldd>include>pl1_info.incl.pl1 23 2 03/24/82 1347.2 condition_info_header.incl.pl1 >ldd>include>condition_info_header.incl.pl1 24 3 06/28/79 1204.8 condition_info.incl.pl1 >ldd>include>condition_info.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. CI 000106 automatic structure level 1 dcl 25 set ref 39 39 addr builtin function dcl 18 ref 39 39 code 000100 automatic fixed bin(35,0) dcl 15 set ref 39* 41 condition_info based structure level 1 dcl 3-14 condition_info_header based structure level 1 dcl 2-6 condition_name 3 000106 automatic varying char(32) level 2 dcl 25 set ref 50 content_flags 107 based structure level 2 dcl 1-7 err_count 000101 automatic fixed bin(17,0) dcl 16 set ref 33* 50 51* find_condition_frame_ 000010 constant entry external dcl 19 ref 35 find_condition_info_ 000012 constant entry external dcl 20 ref 39 id 105 based char(8) level 2 dcl 1-7 ref 42 info_ptr 14 000106 automatic pointer level 2 dcl 25 set ref 42 42 42 42 nsp 000104 automatic pointer dcl 17 set ref 32* 35* 37 39* 52 null builtin function dcl 18 ref 32 37 42 oncode 110 based fixed bin(35,0) level 2 dcl 1-7 ref 42 oncode_sw 107(01) based bit(1) level 3 packed unaligned dcl 1-7 ref 42 pl1_info based structure level 1 dcl 1-7 sp 000102 automatic pointer dcl 17 set ref 32* 35* 52* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. condition_info_header_ptr automatic pointer dcl 2-4 condition_info_ptr automatic pointer dcl 3-10 condition_info_version_1 internal static fixed bin(17,0) initial dcl 3-30 pl1_info_ptr automatic pointer dcl 1-6 NAMES DECLARED BY EXPLICIT CONTEXT. find_frame 000025 constant label dcl 35 set ref 53 get_oncode 000013 constant entry external dcl 10 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 174 210 126 204 Length 424 126 14 200 46 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_oncode 112 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_oncode 000100 code get_oncode 000101 err_count get_oncode 000102 sp get_oncode 000104 nsp get_oncode 000106 CI get_oncode THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry set_support THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. find_condition_frame_ find_condition_info_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000010 32 000021 33 000024 35 000025 37 000036 39 000045 41 000062 42 000067 50 000107 51 000116 52 000120 53 000122 56 000123 ----------------------------------------------------------- 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