COMPILATION LISTING OF SEGMENT get_to_cl_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 01/16/85 1239.3 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 /* format: style2 */ 12 get_to_cl_: 13 procedure (flags); 14 15 /* Procedure invoked before calls to the command listener. 16* Called by standard system default error handler when 17* a quit occurs. 18**/ 19 20 /* Completely re-written 1 December 1980 Richard Mark Soley */ 21 /* Changed to move_attach architecture 3 December 1980 RMSoley */ 22 /* munged for new iox BIM June 1981 */ 23 /* Modified 1984-10-26 BIM to not do control orders under the ips mask. */ 24 25 /* System Entries */ 26 dcl unique_chars_ entry (bit (*)) returns (character (15)); 27 dcl listen_$release_stack entry (bit (1) aligned); 28 dcl iox_$init_standard_iocbs 29 entry; 30 dcl ( 31 hcs_$set_ips_mask, 32 hcs_$reset_ips_mask 33 ) entry (bit (36) aligned, bit (36) aligned); 34 dcl terminate_process_ entry (character (*), pointer); 35 dcl continue_to_signal_ entry (fixed bin (35)); 36 dcl error_table_$unable_to_do_io 37 fixed bin (35) external static; 38 39 /* Conditions */ 40 dcl cleanup condition; 41 dcl any_other condition; 42 43 /* Builtin */ 44 dcl null builtin; 45 46 /* Automatic */ 47 48 dcl 1 info aligned automatic, 49 2 iocb_ptrs (3) pointer, 50 2 modes character (512) unaligned; 51 52 dcl ips_mask bit (36) aligned; 53 dcl switch character (32); 54 dcl code fixed bin (35); 55 dcl i fixed bin; 56 dcl temp pointer; 57 dcl 1 flags aligned, 58 2 reset_sw bit (1) unaligned, 59 2 pad bit (35) unaligned; 60 dcl restore_attachments bit (1) aligned initial ("1"b); 61 62 /* Include Files */ 1 1 /* --------------- BEGIN include file iox_dcls.incl.pl1 --------------- */ 1 2 1 3 /* Written 05/04/78 by C. D. Tavares */ 1 4 /* Fixed declaration of iox_$find_iocb_n 05/07/80 by R. Holmstedt */ 1 5 /* Modified 5/83 by S. Krupp to add declarations for: iox_$open_file, 1 6* iox_$close_file, iox_$detach and iox_$attach_loud entries. */ 1 7 1 8 dcl iox_$attach_name entry (char (*), pointer, char (*), pointer, fixed bin (35)), 1 9 iox_$attach_ptr entry (pointer, char (*), pointer, fixed bin (35)), 1 10 iox_$close entry (pointer, fixed bin (35)), 1 11 iox_$control entry (pointer, char (*), pointer, fixed bin (35)), 1 12 iox_$delete_record entry (pointer, fixed bin (35)), 1 13 iox_$destroy_iocb entry (pointer, fixed bin (35)), 1 14 iox_$detach_iocb entry (pointer, fixed bin (35)), 1 15 iox_$err_not_attached entry options (variable), 1 16 iox_$err_not_closed entry options (variable), 1 17 iox_$err_no_operation entry options (variable), 1 18 iox_$err_not_open entry options (variable), 1 19 iox_$find_iocb entry (char (*), pointer, fixed bin (35)), 1 20 iox_$find_iocb_n entry (fixed bin, ptr, fixed bin(35)), 1 21 iox_$get_chars entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 1 22 iox_$get_line entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 1 23 iox_$look_iocb entry (char (*), pointer, fixed bin (35)), 1 24 iox_$modes entry (pointer, char (*), char (*), fixed bin (35)), 1 25 iox_$move_attach entry (pointer, pointer, fixed bin (35)), 1 26 iox_$open entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)), 1 27 iox_$position entry (pointer, fixed bin, fixed bin (21), fixed bin (35)), 1 28 iox_$propagate entry (pointer), 1 29 iox_$put_chars entry (pointer, pointer, fixed bin (21), fixed bin (35)), 1 30 iox_$read_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 1 31 iox_$read_length entry (pointer, fixed bin (21), fixed bin (35)), 1 32 iox_$read_record entry (pointer, pointer, fixed bin (21), fixed bin (21), fixed bin (35)), 1 33 iox_$rewrite_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 1 34 iox_$seek_key entry (pointer, char (256) varying, fixed bin (21), fixed bin (35)), 1 35 iox_$write_record entry (pointer, pointer, fixed bin (21), fixed bin (35)), 1 36 iox_$open_file entry(ptr, fixed bin, char(*), bit(1) aligned, fixed bin(35)), 1 37 iox_$close_file entry(ptr, char(*), fixed bin(35)), 1 38 iox_$detach entry(ptr, char(*), fixed bin(35)), 1 39 iox_$attach_loud entry(ptr, char(*), ptr, fixed bin(35)); 1 40 1 41 dcl (iox_$user_output, 1 42 iox_$user_input, 1 43 iox_$user_io, 1 44 iox_$error_output) external static pointer; 1 45 1 46 /* ---------------- END include file iox_dcls.incl.pl1 ---------------- */ 63 64 65 unclaimed_signal: 66 quit: 67 entry (flags); 68 69 /* Throw away type-ahead if wanted. */ 70 71 if flags.reset_sw 72 then call iox_$control (iox_$user_input, "resetread", null (), code); 73 74 /* Save attachments. */ 75 76 call save_io; 77 78 /* Set up cleanup handler. */ 79 80 on cleanup call free_save_iocbs (); 81 82 /* Now we can call the actual listener. */ 83 84 call listen_$release_stack (restore_attachments); 85 86 /* Control returns here on "start" command. First we 87* avoid lost wakeups, then restore 88* attachments if listen_ wants. */ 89 90 call iox_$control (iox_$user_io, "start", null (), code); 91 if restore_attachments 92 then call restore_io (); 93 else call free_save_iocbs (); /* Return to whatever we're "start"ing. */ 94 95 return; 96 97 save_io: 98 procedure (); 99 100 /* Procedure to push the current switch attachments on the 101* attachment stack */ 102 103 104 ips_mask = ""b; 105 106 on any_other call fault_while_masked; 107 108 info.modes = ""; 109 call iox_$modes (iox_$user_io, "default", info.modes, (0)); 110 111 call hcs_$set_ips_mask (""b, ips_mask); 112 113 /*** This code should be upgraded to save whatever 114* it finds in the iox_ iocb info for standard attachments. 115* for now, saving the usual 3 will do */ 116 117 /* Save current attachments. */ 118 119 i = 0; 120 do temp = iox_$user_input, iox_$user_output, iox_$error_output; 121 122 i = i + 1; 123 switch = "cl_save_" || unique_chars_ (""b); 124 125 call iox_$find_iocb (switch, info.iocb_ptrs (i), code); 126 127 call iox_$move_attach (temp, info.iocb_ptrs (i), code); 128 end; 129 130 /* Restore default attachments. */ 131 132 call iox_$init_standard_iocbs; 133 134 /* Turn on printer. */ 135 136 call hcs_$reset_ips_mask (ips_mask, ""b); 137 revert any_other; 138 139 call iox_$control (iox_$user_io, "printer_on", null (), code); 140 end save_io; 141 142 restore_io: 143 procedure (); 144 145 /* Procedure to re-instate old saved attachments. */ 146 147 ips_mask = ""b; 148 on any_other call fault_while_masked; 149 150 if info.modes ^= "" 151 then call iox_$modes (iox_$user_io, info.modes, (""), (0)); 152 153 call hcs_$set_ips_mask (""b, ips_mask); 154 155 i = 0; 156 do temp = iox_$user_input, iox_$user_output, iox_$error_output; 157 i = i + 1; 158 159 call iox_$close (temp, code); /* will normally fail */ 160 161 call iox_$detach_iocb (temp, code); 162 163 call iox_$move_attach (info.iocb_ptrs (i), temp, code); 164 165 call iox_$destroy_iocb (info.iocb_ptrs (i), code); 166 167 end; 168 169 call hcs_$reset_ips_mask (ips_mask, ""b); 170 revert any_other; 171 172 end restore_io; 173 174 free_save_iocbs: 175 procedure; 176 177 178 /* This is called in the -no_restore case */ 179 180 181 do i = 1 to 3; 182 call iox_$detach_iocb (info.iocb_ptrs (i), (0)); 183 call iox_$destroy_iocb (info.iocb_ptrs (i), (0)); 184 end; 185 186 end free_save_iocbs; 187 188 189 190 fault_while_masked: 191 procedure; 192 193 dcl 1 ti aligned, 194 2 version fixed bin, 195 2 status_code fixed bin (35); 196 197 if substr (ips_mask, 36, 1) = "0"b 198 then call continue_to_signal_ (0); 199 else do; 200 ti.version = 0; 201 ti.status_code = error_table_$unable_to_do_io; 202 call terminate_process_ ("fatal_error", addr (ti)); 203 end; 204 end fault_while_masked; 205 end get_to_cl_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 01/16/85 1239.3 get_to_cl_.pl1 >special_ldd>online>41-4>get_to_cl_.pl1 63 1 05/23/83 0916.6 iox_entries.incl.pl1 >ldd>include>iox_dcls.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. any_other 000000 stack reference condition dcl 41 ref 106 137 148 170 cleanup 000100 stack reference condition dcl 40 ref 80 code 000325 automatic fixed bin(35,0) dcl 54 set ref 71* 90* 125* 127* 139* 159* 161* 163* 165* continue_to_signal_ 000024 constant entry external dcl 35 ref 197 error_table_$unable_to_do_io 000026 external static fixed bin(35,0) dcl 36 ref 201 flags parameter structure level 1 dcl 57 ref 12 65 65 hcs_$reset_ips_mask 000020 constant entry external dcl 30 ref 136 169 hcs_$set_ips_mask 000016 constant entry external dcl 30 ref 111 153 i 000326 automatic fixed bin(17,0) dcl 55 set ref 119* 122* 122 125 127 155* 157* 157 163 165 181* 182 183* info 000106 automatic structure level 1 dcl 48 iocb_ptrs 000106 automatic pointer array level 2 dcl 48 set ref 125* 127* 163* 165* 182* 183* iox_$close 000030 constant entry external dcl 1-8 ref 159 iox_$control 000032 constant entry external dcl 1-8 ref 71 90 139 iox_$destroy_iocb 000034 constant entry external dcl 1-8 ref 165 183 iox_$detach_iocb 000036 constant entry external dcl 1-8 ref 161 182 iox_$error_output 000054 external static pointer dcl 1-41 ref 120 156 iox_$find_iocb 000040 constant entry external dcl 1-8 ref 125 iox_$init_standard_iocbs 000014 constant entry external dcl 28 ref 132 iox_$modes 000042 constant entry external dcl 1-8 ref 109 150 iox_$move_attach 000044 constant entry external dcl 1-8 ref 127 163 iox_$user_input 000050 external static pointer dcl 1-41 set ref 71* 120 156 iox_$user_io 000052 external static pointer dcl 1-41 set ref 90* 109* 139* 150* iox_$user_output 000046 external static pointer dcl 1-41 ref 120 156 ips_mask 000314 automatic bit(36) dcl 52 set ref 104* 111* 136* 147* 153* 169* 197 listen_$release_stack 000012 constant entry external dcl 27 ref 84 modes 6 000106 automatic char(512) level 2 packed unaligned dcl 48 set ref 108* 109* 150 150* null builtin function dcl 44 ref 71 71 90 90 139 139 reset_sw parameter bit(1) level 2 packed unaligned dcl 57 ref 71 restore_attachments 000332 automatic bit(1) initial dcl 60 set ref 60* 84* 91 status_code 1 000100 automatic fixed bin(35,0) level 2 dcl 193 set ref 201* switch 000315 automatic char(32) unaligned dcl 53 set ref 123* 125* temp 000330 automatic pointer dcl 56 set ref 120* 127* 156* 159* 161* 163* terminate_process_ 000022 constant entry external dcl 34 ref 202 ti 000100 automatic structure level 1 dcl 193 set ref 202 202 unique_chars_ 000010 constant entry external dcl 26 ref 123 version 000100 automatic fixed bin(17,0) level 2 dcl 193 set ref 200* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$attach_loud 000000 constant entry external dcl 1-8 iox_$attach_name 000000 constant entry external dcl 1-8 iox_$attach_ptr 000000 constant entry external dcl 1-8 iox_$close_file 000000 constant entry external dcl 1-8 iox_$delete_record 000000 constant entry external dcl 1-8 iox_$detach 000000 constant entry external dcl 1-8 iox_$err_no_operation 000000 constant entry external dcl 1-8 iox_$err_not_attached 000000 constant entry external dcl 1-8 iox_$err_not_closed 000000 constant entry external dcl 1-8 iox_$err_not_open 000000 constant entry external dcl 1-8 iox_$find_iocb_n 000000 constant entry external dcl 1-8 iox_$get_chars 000000 constant entry external dcl 1-8 iox_$get_line 000000 constant entry external dcl 1-8 iox_$look_iocb 000000 constant entry external dcl 1-8 iox_$open 000000 constant entry external dcl 1-8 iox_$open_file 000000 constant entry external dcl 1-8 iox_$position 000000 constant entry external dcl 1-8 iox_$propagate 000000 constant entry external dcl 1-8 iox_$put_chars 000000 constant entry external dcl 1-8 iox_$read_key 000000 constant entry external dcl 1-8 iox_$read_length 000000 constant entry external dcl 1-8 iox_$read_record 000000 constant entry external dcl 1-8 iox_$rewrite_record 000000 constant entry external dcl 1-8 iox_$seek_key 000000 constant entry external dcl 1-8 iox_$write_record 000000 constant entry external dcl 1-8 NAMES DECLARED BY EXPLICIT CONTEXT. fault_while_masked 001055 constant entry internal dcl 190 ref 106 148 free_save_iocbs 001004 constant entry internal dcl 174 ref 80 93 get_to_cl_ 000055 constant entry external dcl 12 quit 000066 constant entry external dcl 65 restore_io 000555 constant entry internal dcl 142 ref 91 save_io 000246 constant entry internal dcl 97 ref 76 unclaimed_signal 000077 constant entry external dcl 65 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 202 202 substr builtin function ref 197 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1446 1524 1124 1456 Length 1762 1124 56 222 322 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_to_cl_ 246 external procedure is an external procedure. on unit on line 80 64 on unit save_io 104 internal procedure enables or reverts conditions. on unit on line 106 64 on unit restore_io 92 internal procedure enables or reverts conditions. on unit on line 148 64 on unit free_save_iocbs 72 internal procedure is called by several nonquick procedures. fault_while_masked 84 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME fault_while_masked 000100 ti fault_while_masked get_to_cl_ 000106 info get_to_cl_ 000314 ips_mask get_to_cl_ 000315 switch get_to_cl_ 000325 code get_to_cl_ 000326 i get_to_cl_ 000330 temp get_to_cl_ 000332 restore_attachments get_to_cl_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out call_int_this call_int_other return enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. continue_to_signal_ hcs_$reset_ips_mask hcs_$set_ips_mask iox_$close iox_$control iox_$destroy_iocb iox_$detach_iocb iox_$find_iocb iox_$init_standard_iocbs iox_$modes iox_$move_attach listen_$release_stack terminate_process_ unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$unable_to_do_io 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 60 000046 12 000052 65 000063 71 000105 76 000143 80 000147 84 000171 90 000200 91 000230 93 000240 95 000244 97 000245 104 000253 106 000255 108 000277 109 000303 111 000333 119 000347 120 000351 122 000357 123 000361 125 000412 127 000436 128 000454 132 000475 136 000502 137 000516 139 000517 140 000553 142 000554 147 000562 148 000564 150 000606 153 000641 155 000655 156 000657 157 000665 159 000667 161 000700 163 000712 165 000730 167 000744 169 000765 170 001001 172 001002 174 001003 181 001011 182 001020 183 001033 184 001050 186 001053 190 001054 197 001062 200 001076 201 001077 202 001101 204 001123 ----------------------------------------------------------- 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