COMPILATION LISTING OF SEGMENT program_interrupt Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 09/15/88 1340.4 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(88-08-29,TLNguyen), approve(88-08-29,MCR7961), 17* audit(88-09-13,Parisek), install(88-09-15,MR12.2-1110): 18* Call the cu_$af_return_arg to report error when users attempt to run the 19* program_interrupt as an active function. 20* END HISTORY COMMENTS */ 21 22 23 /* format: style2 */ 24 program_interrupt: 25 pi: 26 procedure; 27 28 /* initially coded in February 1970 by V. Voydock */ 29 /* modified on February 8, 1970 at 3:50 P. M. by V. Voydock */ 30 /* Modified 761026 by PG to convert to Version 2 PL/I */ 31 /* Changed to use info structure by B. Margulies, July, 1981 */ 32 33 /* the purpose of this program is to allow users of editors, subsystems and 34* other complicated programs to "interrupt" that program and re-enter it 35* at a known place. To make use of program_interrupt, a program must establish a 36* condition handler for the condition "program_interrupt". When the user wishes to 37* "interrupt" a program he presses the "quit" button and types "program_interrupt" or 38* "pi". For example, suppose qedx had a handler for "program_interrupt" 39* which when it was entered, stopped whatever the editor was doing and 40* looked for a request from the console. Then a user of qedx who inadvertantly 41* typed "1,$p" could kill this printout by hitting "quit" and then typing "pi" */ 42 1 1 /* BEGIN INCLUDE FILE condition_info_header.incl.pl1 BIM 1981 */ 1 2 /* format: style2 */ 1 3 1 4 declare condition_info_header_ptr 1 5 pointer; 1 6 declare 1 condition_info_header 1 7 aligned based (condition_info_header_ptr), 1 8 2 length fixed bin, /* length in words of this structure */ 1 9 2 version fixed bin, /* version number of this structure */ 1 10 2 action_flags aligned, /* tell handler how to proceed */ 1 11 3 cant_restart bit (1) unaligned, /* caller doesn't ever want to be returned to */ 1 12 3 default_restart bit (1) unaligned, /* caller can be returned to with no further action */ 1 13 3 quiet_restart bit (1) unaligned, /* return, and print no message */ 1 14 3 support_signal bit (1) unaligned, /* treat this signal as if the signalling procedure had the support bit set */ 1 15 /* if the signalling procedure had the support bit set, do the same for its caller */ 1 16 3 pad bit (32) unaligned, 1 17 2 info_string char (256) varying, /* may contain printable message */ 1 18 2 status_code fixed bin (35); /* if^=0, code interpretable by com_err_ */ 1 19 1 20 /* END INCLUDE FILE condition_info_header.incl.pl1 */ 43 2 1 /* begin include file program_interrupt_info.incl.pl1 BIM 1981 */ 2 2 /* format: style2 */ 2 3 2 4 /* condition_info_header.info.pl1 must be %included with this file */ 2 5 2 6 declare program_interrupt_info_ptr 2 7 pointer; 2 8 2 9 declare 1 program_interrupt_info 2 10 aligned based (program_interrupt_info_ptr), 2 11 2 header aligned like condition_info_header, 2 12 2 default_handler_restarted_this_signal 2 13 bit (1) aligned; 2 14 2 15 declare program_interrupt_info_version_1 2 16 fixed bin init (1) internal static options (constant); 2 17 2 18 declare program_interrupt_condition_name 2 19 character (17) init ("program_interrupt") internal static options (constant); 2 20 2 21 declare program_interrupt condition; 2 22 2 23 /* end include file program_interrupt_info.incl.pl1 */ 44 45 46 /* entries */ 47 48 dcl (active_fnc_err_, com_err_) 49 entry () options (variable); 50 dcl cu_$af_return_arg entry (fixed bin, pointer, fixed bin (21), fixed bin (35)); 51 dcl signal_ entry () options (variable); 52 dcl start entry options (variable); 53 54 /* automatic */ 55 56 dcl code fixed bin (35); 57 58 declare 1 pi_info aligned like program_interrupt_info automatic; 59 60 /* builtin */ 61 declare (addr, currentsize, null,string) 62 builtin; 63 64 65 pi_info.version = program_interrupt_info_version_1; 66 pi_info.length = currentsize (pi_info); 67 string (pi_info.action_flags) = ""b; 68 69 /* We expect the default handler to have a special case for this 70* condition, that sets the "default_handler_restarted" bit and 71* then returns. just in case this gets signalled under a handler 72* that does not grok this protocol, we set neither default restart 73* nor quiet restart, so that the user gets up to level 2, as today. */ 74 75 pi_info.info_string = ""; /* avoid spurious messages */ 76 pi_info.status_code = 0; 77 pi_info.default_handler_restarted_this_signal = "0"b; 78 79 code = 0; 80 81 call cu_$af_return_arg ((0), null (), (0), code); /* report an error when the pi command is invoked as an active function */ 82 if code = 0 then do; 83 call active_fnc_err_ (code, program_interrupt_condition_name, "This command cannot be invoked as an active function."); 84 return; 85 end; 86 87 call signal_ (program_interrupt_condition_name, null () /* no mc */, addr (pi_info)); 88 89 90 /* the program_interrupt protocol allowed programs to restart the signal, 91* after noting that it had gone by, rather than doing a nonlocal go to 92* from the handler. To compatably support this, we depend on the 93* default handler to set a bit saying that no user program caught and 94* restarted the signal. If one did, then we call the start command, 95* to kick things off again. */ 96 97 if ^pi_info.default_handler_restarted_this_signal 98 then call start; /* this does not return! */ 99 100 call com_err_ (0, "program_interrupt", "There is no suspended invocation of a subsystem that supports the use of this command."); 101 return; 102 103 end program_interrupt; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/15/88 1340.4 program_interrupt.pl1 >spec>install>1110>program_interrupt.pl1 43 1 03/24/82 1347.2 condition_info_header.incl.pl1 >ldd>include>condition_info_header.incl.pl1 44 2 03/27/82 0435.1 program_interrupt_info.incl.pl1 >ldd>include>program_interrupt_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. action_flags 2 000101 automatic structure level 3 dcl 58 set ref 67* active_fnc_err_ 000010 constant entry external dcl 48 ref 83 addr builtin function dcl 61 ref 87 87 code 000100 automatic fixed bin(35,0) dcl 56 set ref 79* 81* 82 83* com_err_ 000012 constant entry external dcl 48 ref 100 condition_info_header based structure level 1 dcl 1-6 cu_$af_return_arg 000014 constant entry external dcl 50 ref 81 currentsize builtin function dcl 61 ref 66 default_handler_restarted_this_signal 105 000101 automatic bit(1) level 2 dcl 58 set ref 77* 97 header 000101 automatic structure level 2 dcl 58 info_string 3 000101 automatic varying char(256) level 3 dcl 58 set ref 75* length 000101 automatic fixed bin(17,0) level 3 dcl 58 set ref 66* null builtin function dcl 61 ref 81 81 87 87 pi_info 000101 automatic structure level 1 dcl 58 set ref 66 87 87 program_interrupt_condition_name 000000 constant char(17) initial packed unaligned dcl 2-18 set ref 83* 87* program_interrupt_info based structure level 1 dcl 2-9 program_interrupt_info_version_1 constant fixed bin(17,0) initial dcl 2-15 ref 65 signal_ 000016 constant entry external dcl 51 ref 87 start 000020 constant entry external dcl 52 ref 97 status_code 104 000101 automatic fixed bin(35,0) level 3 dcl 58 set ref 76* string builtin function dcl 61 set ref 67* version 1 000101 automatic fixed bin(17,0) level 3 dcl 58 set ref 65* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. condition_info_header_ptr automatic pointer dcl 1-4 program_interrupt 000000 stack reference condition dcl 2-21 program_interrupt_info_ptr automatic pointer dcl 2-6 NAMES DECLARED BY EXPLICIT CONTEXT. pi 000070 constant entry external dcl 24 program_interrupt 000077 constant entry external dcl 24 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 344 366 253 354 Length 600 253 22 175 71 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME pi 202 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME pi 000100 code pi 000101 pi_info pi THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. active_fnc_err_ com_err_ cu_$af_return_arg signal_ start NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 24 000067 65 000104 66 000106 67 000110 75 000111 76 000112 77 000113 79 000114 81 000115 82 000135 83 000137 84 000163 87 000164 97 000210 100 000217 101 000252 ----------------------------------------------------------- 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