COMPILATION LISTING OF SEGMENT pl1_snap_ Compiled by: Multics PL/I Compiler, Release 32e, of September 22, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 10/02/89 1044.3 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) BULL HN Information Systems Inc., 1989 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 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(89-09-27,RWaters), approve(89-09-27,MCR8068), audit(89-09-27,Vu), 17* install(89-10-02,MR12.3-1080): 18* Fixed to remove duplicate declaration attributes. 19* END HISTORY COMMENTS */ 20 21 22 pl1_snap_: proc(conname); 23 24 25 /* This procedure is invoked by the standard system default handler when a quit occurs */ 26 27 /* Last Modified: (Date and reason): 28* 15 July 1977 by SHW to correctly reestablish the standard attachments, use iox_ entries 29* and to change snap routine from debug to probe. 30* 10/82 BIM to compile for 10.1 31**/ 32 33 34 dcl conname char(32); 35 dcl absin_seg char(168) aligned; 36 37 dcl null builtin; 38 39 dcl code fixed bin(35); 40 41 42 dcl ioa_ entry options(variable), 43 user_info_$absin entry(char(*) aligned), 44 (probe, trace_stack) entry(), 45 iox_$modes entry(ptr,char(*),char(*),fixed bin(35)), 46 iox_$attach_iocb entry(ptr,char(*),fixed bin(35)), 47 iox_$control entry(ptr,char(*),ptr,fixed bin(35)), 48 iox_$close entry (ptr,fixed bin (35)), 49 iox_$detach_iocb entry (ptr,fixed bin (35)); 50 /* */ 51 52 dcl default_inhibits (3) int static bit (36) aligned init ( 53 "0"b, 54 "0"b, 55 "0"b 56 ); 57 dcl 1 old_info (3) aligned, 58 /* first structure of information is for user_input; 59* the second is for user_output; 60* the third is for error_output */ 61 2 device ptr, 62 2 mode bit (36) aligned; 63 dcl (new_uio_mode, old_uio_mode) char (256); 64 65 dcl i fixed bin, 66 iox_code fixed bin (35); 67 68 dcl iocbp (4) ptr init ( iox_$user_input, 69 iox_$user_output, 70 iox_$error_output, 71 iox_$user_io); /* MUST be automatic for this init to work */ 72 73 dcl iocbp_names(4) char(12) aligned int static options(constant) init( 74 "user_input", 75 "user_output", 76 "error_output", 77 "user_i/o" ); 78 79 dcl iox_$user_io ext static ptr; 80 dcl iox_$user_input ext static ptr; 81 dcl iox_$user_output ext static ptr; 82 dcl iox_$error_output ext static ptr; 83 /* */ 1 1 /* BEGIN INCLUDE FILE iocbx.incl.pl1 */ 1 2 /* written 27 Dec 1973, M. G. Smith */ 1 3 /* returns attributes removed, hashing support BIM Spring 1981 */ 1 4 /* version made character string June 1981 BIM */ 1 5 /* Modified 11/29/82 by S. Krupp to add new entries and to change 1 6* version number to IOX2. */ 1 7 /* format: style2 */ 1 8 1 9 dcl 1 iocb aligned based, /* I/O control block. */ 1 10 2 version character (4) aligned, /* IOX2 */ 1 11 2 name char (32), /* I/O name of this block. */ 1 12 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 13 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 14 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 15 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 16 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 17 2 event_channel bit (72), /* Event channel for asynchronous I/O. */ 1 18 2 detach_iocb entry (ptr, fixed bin (35)), 1 19 /* detach_iocb(p) */ 1 20 2 open entry (ptr, fixed, bit (1) aligned, fixed bin (35)), 1 21 /* open(p,mode,not_used) */ 1 22 2 close entry (ptr, fixed bin (35)), 1 23 /* close(p) */ 1 24 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed bin (35)), 1 25 /* get_line(p,bufptr,buflen,actlen) */ 1 26 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed bin (35)), 1 27 /* get_chars(p,bufptr,buflen,actlen) */ 1 28 2 put_chars entry (ptr, ptr, fixed (21), fixed bin (35)), 1 29 /* put_chars(p,bufptr,buflen) */ 1 30 2 modes entry (ptr, char (*), char (*), fixed bin (35)), 1 31 /* modes(p,newmode,oldmode) */ 1 32 2 position entry (ptr, fixed, fixed (21), fixed bin (35)), 1 33 /* position(p,u1,u2) */ 1 34 2 control entry (ptr, char (*), ptr, fixed bin (35)), 1 35 /* control(p,order,infptr) */ 1 36 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed bin (35)), 1 37 /* read_record(p,bufptr,buflen,actlen) */ 1 38 2 write_record entry (ptr, ptr, fixed (21), fixed bin (35)), 1 39 /* write_record(p,bufptr,buflen) */ 1 40 2 rewrite_record entry (ptr, ptr, fixed (21), fixed bin (35)), 1 41 /* rewrite_record(p,bufptr,buflen) */ 1 42 2 delete_record entry (ptr, fixed bin (35)), 1 43 /* delete_record(p) */ 1 44 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed bin (35)), 1 45 /* seek_key(p,key,len) */ 1 46 2 read_key entry (ptr, char (256) varying, fixed (21), fixed bin (35)), 1 47 /* read_key(p,key,len) */ 1 48 2 read_length entry (ptr, fixed (21), fixed bin (35)), 1 49 /* read_length(p,len) */ 1 50 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 1 51 /* open_file(p,mode,desc,not_used,s) */ 1 52 2 close_file entry (ptr, char (*), fixed bin (35)), 1 53 /* close_file(p,desc,s) */ 1 54 2 detach entry (ptr, char (*), fixed bin (35)), 1 55 /* detach(p,desc,s) */ 1 56 /* Hidden information, to support SYN attachments. */ 1 57 2 ios_compatibility ptr, /* Ptr to old DIM's IOS transfer vector. */ 1 58 2 syn_inhibits bit (36), /* Operations inhibited by SYN. */ 1 59 2 syn_father ptr, /* IOCB immediately SYNed to. */ 1 60 2 syn_brother ptr, /* Next IOCB SYNed as this one is. */ 1 61 2 syn_son ptr, /* First IOCB SYNed to this one. */ 1 62 2 hash_chain_ptr ptr; /* Next IOCB in hash bucket */ 1 63 1 64 declare iox_$iocb_version_sentinel 1 65 character (4) aligned external static; 1 66 1 67 /* END INCLUDE FILE iocbx.incl.pl1 */ 84 85 86 87 88 89 /* This entry is invoked by signal_ to implement pl1 snap */ 90 /* i/o code is stolen from get_to_cl_ */ 91 92 93 94 /* Save attachments of user_input, user_output and error_output, and restore them 95* to the standard attachments */ 96 call save_io_; 97 98 /* find out whether we are interactive or absentee */ 99 call user_info_$absin(absin_seg); 100 if absin_seg = " " then do; /* no absin seg; interactive */ 101 call iox_$control(iox_$user_io, "resetread", null, code); /* throw away any read ahead data */ 102 call ioa_("PL/I snap for condition ^a; you are entering probe", conname); 103 call probe(); 104 end; 105 else do; /* we are in absentee */ 106 call ioa_("PL/I snap for condition ^a; trace_stack is being called", conname); 107 call trace_stack(); 108 end; 109 110 /* If control returns here, a "start" command has been typed. 111* The first thing we must do is restart any previously stopped io. Then 112* we must restore the attachments of user_input, user_output and error_output to 113* what they were at the time of the quit or unclaimed signal. */ 114 call iox_$control(iox_$user_io, "start", null, code); 115 call restore_io_; 116 117 /* Return to procedure being "started" */ 118 return; 119 /* */ 120 /* Internal procedure to save attachments of user_input, user_output and error_output 121* and restore them to the standard attachment. It is 122* called after a quit or unclaimed signal */ 123 124 125 save_io_: proc; 126 127 128 129 130 131 /* save attachments */ 132 do i = 1 to 3; 133 if iocbp (i) -> iocb.actual_iocb_ptr = iocbp (i) then /* not a syn */ 134 do; 135 old_info (i).device = iocbp (4); /* ptr to iocb for user_i/o */ 136 old_info (i).mode = default_inhibits (i); /* store default inhibits */ 137 end; 138 else do; /* it was syn */ 139 old_info (i).device = iocbp (i) -> iocb.syn_father; 140 old_info (i).mode = iocbp (i) -> iocb.syn_inhibits; /* copy mode */ 141 end; 142 end; 143 144 /* restore user_input, user_output, and error_output to standard attachments */ 145 do i = 1 to 3; 146 if iocbp (i) -> iocb.actual_iocb_ptr = iocbp (i) then 147 call iox_$close (iocbp (i), iox_code); 148 call iox_$detach_iocb (iocbp (i), iox_code); 149 call iox_$attach_iocb(iocbp(i),"syn_ user_i/o", iox_code); 150 end; 151 old_uio_mode = " "; /* init */ 152 new_uio_mode = "default."; 153 call iox_$modes (iox_$user_io, new_uio_mode, old_uio_mode, iox_code); 154 call iox_$control (iox_$user_io, "printer_on", null, iox_code); 155 156 return; 157 end save_io_; 158 159 /* */ 160 161 /* Internal procedure which restores user_input, error_output and user output to the values 162* they had at the time of a quit or unclaimed signal. It is meant 163* to be called in conjunction with save_io_ */ 164 165 restore_io_: proc; 166 167 168 /* Restore attachments */ 169 do i = 1 to 3; 170 call iox_$detach_iocb (iocbp (i), iox_code); 171 call iox_$attach_iocb(iocbp(i),"syn_ "||iocbp_names(i), iox_code); 172 end; 173 174 175 /* Restore mode of user_i/o to what it was at time of quit */ 176 call iox_$modes (iox_$user_io, old_uio_mode, new_uio_mode, iox_code); 177 178 return; 179 180 end restore_io_; 181 182 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/02/89 1044.3 pl1_snap_.pl1 >spec>install>1080>pl1_snap_.pl1 84 1 06/03/83 1008.5 iocbx.incl.pl1 >ldd>include>iocbx.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. absin_seg 000100 automatic char(168) dcl 35 set ref 99* 100 actual_iocb_ptr 12 based pointer level 2 dcl 1-9 ref 133 146 code 000152 automatic fixed bin(35,0) dcl 39 set ref 101* 114* conname parameter char(32) packed unaligned dcl 34 set ref 22 102* 106* default_inhibits 000646 constant bit(36) initial array dcl 52 ref 136 device 000154 automatic pointer array level 2 dcl 57 set ref 135* 139* i 000370 automatic fixed bin(17,0) dcl 65 set ref 132* 133 133 135 136 136 139 139 140 140* 145* 146 146 146 148 149* 169* 170 171 171* ioa_ 000010 constant entry external dcl 42 ref 102 106 iocb based structure level 1 dcl 1-9 iocbp 000372 automatic pointer initial array dcl 68 set ref 68* 68* 68* 68* 133 133 135 139 140 146 146 146* 148* 149* 170* 171* iocbp_names 000000 constant char(12) initial array dcl 73 ref 171 iox_$attach_iocb 000022 constant entry external dcl 42 ref 149 171 iox_$close 000026 constant entry external dcl 42 ref 146 iox_$control 000024 constant entry external dcl 42 ref 101 114 154 iox_$detach_iocb 000030 constant entry external dcl 42 ref 148 170 iox_$error_output 000040 external static pointer dcl 82 ref 68 iox_$modes 000020 constant entry external dcl 42 ref 153 176 iox_$user_input 000034 external static pointer dcl 80 ref 68 iox_$user_io 000032 external static pointer dcl 79 set ref 68 101* 114* 153* 154* 176* iox_$user_output 000036 external static pointer dcl 81 ref 68 iox_code 000371 automatic fixed bin(35,0) dcl 65 set ref 146* 148* 149* 153* 154* 170* 171* 176* mode 2 000154 automatic bit(36) array level 2 dcl 57 set ref 136* 140* new_uio_mode 000170 automatic char(256) packed unaligned dcl 63 set ref 152* 153* 176* null builtin function dcl 37 ref 101 101 114 114 154 154 old_info 000154 automatic structure array level 1 dcl 57 old_uio_mode 000270 automatic char(256) packed unaligned dcl 63 set ref 151* 153* 176* probe 000014 constant entry external dcl 42 ref 103 syn_father 146 based pointer level 2 dcl 1-9 ref 139 syn_inhibits 144 based bit(36) level 2 dcl 1-9 ref 140 trace_stack 000016 constant entry external dcl 42 ref 107 user_info_$absin 000012 constant entry external dcl 42 ref 99 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$iocb_version_sentinel external static char(4) dcl 1-64 NAMES DECLARED BY EXPLICIT CONTEXT. pl1_snap_ 000110 constant entry external dcl 22 restore_io_ 000543 constant entry internal dcl 165 ref 115 save_io_ 000326 constant entry internal dcl 125 ref 96 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1014 1056 652 1024 Length 1264 652 42 171 141 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME pl1_snap_ 392 external procedure is an external procedure. save_io_ internal procedure shares stack frame of external procedure pl1_snap_. restore_io_ internal procedure shares stack frame of external procedure pl1_snap_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME pl1_snap_ 000100 absin_seg pl1_snap_ 000152 code pl1_snap_ 000154 old_info pl1_snap_ 000170 new_uio_mode pl1_snap_ 000270 old_uio_mode pl1_snap_ 000370 i pl1_snap_ 000371 iox_code pl1_snap_ 000372 iocbp pl1_snap_ 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. ioa_ iox_$attach_iocb iox_$close iox_$control iox_$detach_iocb iox_$modes probe trace_stack user_info_$absin THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. iox_$error_output iox_$user_input iox_$user_io iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000105 68 000115 96 000146 99 000147 100 000160 101 000164 102 000217 103 000240 104 000245 106 000246 107 000267 114 000274 115 000324 118 000325 125 000326 132 000327 133 000335 135 000345 136 000351 137 000355 139 000356 140 000362 142 000364 145 000366 146 000373 148 000414 149 000426 150 000454 151 000456 152 000461 153 000464 154 000510 156 000542 165 000543 169 000544 170 000551 171 000564 172 000617 176 000621 178 000645 ----------------------------------------------------------- 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