COMPILATION LISTING OF SEGMENT l6_tran_util_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 08/08/88 1510.1 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /*****************************************************************************/ 7 /* */ 8 /* DESCRIPTION: */ 9 /* */ 10 /* This subroutine handles utility functions for Level 6 file */ 11 /* transfer. Basically these are reading and writing to or from the Level */ 12 /* 6. */ 13 /* */ 14 /* */ 15 /* JOURNALIZATION: */ 16 /* */ 17 /* 1) Written 5/82 by R.J.C. Kissel. */ 18 /* 2) Modified 7/83 by R.J.C. Kissel to add an entry to do a read_status, */ 19 /* used to check for L6 error messages. */ 20 /* */ 21 /*****************************************************************************/ 22 23 /* format: style3,linecom,ifthenstmt,indthenelse,^indnoniterdo,indnoniterend,initcol3,dclind5,idind32 */ 24 25 l6_tran_util_: 26 proc (); 27 return; 28 29 /* Parameters */ 30 31 dcl P_iocbp ptr parameter; 32 dcl P_input_chars_ptr ptr parameter; 33 dcl P_input_buffer_len fixed bin (21) parameter; 34 dcl P_input_chars_len fixed bin (21) parameter; 35 36 dcl P_output_chars_ptr ptr parameter; 37 dcl P_output_chars_len fixed bin (21) parameter; 38 39 dcl P_code fixed bin (35) parameter; 40 41 /* Automatic */ 42 43 dcl code fixed bin (35); 44 45 dcl input_chars_ptr ptr; 46 dcl input_buffer_len fixed bin (21); 47 dcl input_chars_len fixed bin (21); 48 dcl input_chars char (input_chars_len) based (input_chars_ptr); 49 50 dcl iocbp ptr; 51 dcl line_status bit (72); 52 53 dcl output_chars_ptr ptr; 54 dcl output_chars_len fixed bin (21); 55 dcl output_chars char (output_chars_len) based (output_chars_ptr); 56 57 dcl 1 read_status_info aligned like tty_read_status_info; 58 59 /* Internal Static */ 60 61 dcl debug bit (1) internal static init ("0"b); 62 dcl debug_iocbp ptr internal static init (null ()); 63 64 /* External Constants */ 65 66 dcl error_table_$line_status_pending 67 fixed bin (35) ext static; 68 69 /* External Entries */ 70 71 dcl ioa_$ioa_switch entry () options (variable); 72 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 73 dcl iox_$get_chars entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); 74 dcl iox_$get_line entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); 75 dcl iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin (35)); 76 dcl ipc_$drain_chn entry (fixed bin (71), fixed bin (35)); 77 78 /* Builtin Functions and Conditions */ 79 80 dcl addr builtin; 81 82 /*****************************************************************************/ 83 /* */ 84 /* ENTRY: get_chars */ 85 /* */ 86 /* This entry gets characters from the Level 6 and handles debugging */ 87 /* and line status. */ 88 /* */ 89 /*****************************************************************************/ 90 91 get_chars: 92 entry (P_iocbp, P_input_chars_ptr, P_input_buffer_len, P_input_chars_len, P_code); 93 94 iocbp = P_iocbp; 95 input_chars_ptr = P_input_chars_ptr; 96 input_buffer_len = P_input_buffer_len; 97 98 call iox_$get_chars (iocbp, input_chars_ptr, input_buffer_len, input_chars_len, code); 99 100 do while (code = error_table_$line_status_pending); 101 call iox_$control (iocbp, "line_status", addr (line_status), code); 102 103 if debug then call ioa_$ioa_switch (debug_iocbp, "Line status from L6: ^.3b", line_status); 104 105 call iox_$get_chars (iocbp, input_chars_ptr, input_buffer_len, input_chars_len, code); 106 end; 107 108 if debug 109 then call ioa_$ioa_switch (debug_iocbp, "From L6: ^d characters^/""^a""", input_chars_len, input_chars); 110 111 P_input_chars_len = input_chars_len; 112 P_code = code; 113 114 return; 115 116 /*****************************************************************************/ 117 /* */ 118 /* ENTRY: get_line */ 119 /* */ 120 /* This entry gets a line from the Level 6 and handles debugging */ 121 /* and line status. */ 122 /* */ 123 /*****************************************************************************/ 124 125 get_line: 126 entry (P_iocbp, P_input_chars_ptr, P_input_buffer_len, P_input_chars_len, P_code); 127 128 iocbp = P_iocbp; 129 input_chars_ptr = P_input_chars_ptr; 130 input_buffer_len = P_input_buffer_len; 131 132 call iox_$get_line (iocbp, input_chars_ptr, input_buffer_len, input_chars_len, code); 133 134 do while (code = error_table_$line_status_pending); 135 call iox_$control (iocbp, "line_status", addr (line_status), code); 136 137 if debug then call ioa_$ioa_switch (debug_iocbp, "Line status from L6: ^.3b", line_status); 138 139 call iox_$get_line (iocbp, input_chars_ptr, input_buffer_len, input_chars_len, code); 140 end; 141 142 if debug 143 then call ioa_$ioa_switch (debug_iocbp, "From L6: ^d characters^/""^a""", input_chars_len, input_chars); 144 145 P_input_chars_len = input_chars_len; 146 P_code = code; 147 148 return; 149 150 151 /*****************************************************************************/ 152 /* */ 153 /* ENTRY: put_chars */ 154 /* */ 155 /* This entry sends characters to the Level 6 and handles debugging */ 156 /* and line status. */ 157 /* */ 158 /*****************************************************************************/ 159 160 put_chars: 161 entry (P_iocbp, P_output_chars_ptr, P_output_chars_len, P_code); 162 163 iocbp = P_iocbp; 164 output_chars_ptr = P_output_chars_ptr; 165 output_chars_len = P_output_chars_len; 166 167 if debug 168 then call ioa_$ioa_switch (debug_iocbp, "To L6: ^d characters^/""^a""", output_chars_len, output_chars); 169 170 call iox_$put_chars (iocbp, output_chars_ptr, output_chars_len, code); 171 172 do while (code = error_table_$line_status_pending); 173 call iox_$control (iocbp, "line_status", addr (line_status), code); 174 175 if debug then call ioa_$ioa_switch (debug_iocbp, "Line status from L6: ^.3b", line_status); 176 177 call iox_$put_chars (iocbp, output_chars_ptr, output_chars_len, code); 178 end; 179 180 P_code = code; 181 182 return; 183 184 /*****************************************************************************/ 185 /* */ 186 /* ENTRY: read_status */ 187 /* */ 188 /* This entry returns true if there is input pending and false */ 189 /* otherwise. It handles line_status_pending and any error codes. Since */ 190 /* we don't care about wakeups, it also drains the event channel on every */ 191 /* call. */ 192 /* */ 193 /*****************************************************************************/ 194 195 read_status: 196 entry (P_iocbp) returns (bit (1)); 197 198 iocbp = P_iocbp; 199 200 call iox_$control (iocbp, "read_status", addr (read_status_info), code); 201 202 do while (code = error_table_$line_status_pending); 203 call iox_$control (iocbp, "line_status", addr (line_status), code); 204 205 if debug then call ioa_$ioa_switch (debug_iocbp, "Line status from L6: ^.3b", line_status); 206 207 call iox_$control (iocbp, "read_status", addr (read_status_info), code); 208 end; 209 210 call ipc_$drain_chn (read_status_info.event_channel, code); 211 212 if debug 213 then call ioa_$ioa_switch (debug_iocbp, 214 "Called read_status, ev_chn = ^o, input_pending = ^b, code = ^d.", 215 read_status_info.event_channel, read_status_info.input_pending, code); 216 217 return (read_status_info.input_pending); 218 219 debug_on: 220 entry (); 221 debug = "1"b; 222 return; 223 224 225 226 227 debug_off: 228 entry (); 229 debug = "0"b; 230 return; 231 232 233 234 235 set_debug_iocb: 236 entry (diocbp); 237 238 dcl diocbp ptr; 239 dcl iox_$user_output ptr ext static; 240 dcl null builtin; 241 242 if diocbp = null () 243 then debug_iocbp = iox_$user_output; 244 else debug_iocbp = diocbp; 245 246 return; 247 248 /* Include Files */ 249 1 1 /* BEGIN INCLUDE FILE ... tty_read_status_info.incl.pl1 1 2* 1 3* control structure for the read_status and write_status orders to tty_ 1 4* 1 5* Modified 2/1/83 by Olin Sibert to add tty_write_status_info structure in 1 6* support of lap_simplex_ MPX. 1 7**/ 1 8 1 9 1 10 /****^ HISTORY COMMENTS: 1 11* 1) change(88-07-07,Beattie), approve(88-06-27,MCR7926), 1 12* audit(88-07-22,Brunelle), install(88-08-08,MR12.2-1082): 1 13* Prepared for installation. 1 14* END HISTORY COMMENTS */ 1 15 1 16 1 17 dcl 1 tty_read_status_info aligned based (tty_read_status_info_ptr), 1 18 2 event_channel fixed bin (71), 1 19 2 input_pending bit (1); 1 20 1 21 dcl tty_read_status_info_ptr ptr; 1 22 1 23 dcl 1 tty_write_status_info aligned based (tty_write_status_info_ptr), 1 24 2 event_channel fixed bin (71), 1 25 2 output_pending bit (1); 1 26 1 27 dcl tty_write_status_info_ptr ptr; 1 28 1 29 /* END INCLUDE FILE ... tty_read_status_info.incl.pl1 */ 250 251 252 end l6_tran_util_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/08/88 1410.7 l6_tran_util_.pl1 >special_ldd>install>MR12.2-1082>l6_tran_util_.pl1 250 1 08/08/88 1400.0 tty_read_status_info.incl.pl1 >special_ldd>install>MR12.2-1082>tty_read_status_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. P_code parameter fixed bin(35,0) dcl 39 set ref 91 112* 125 146* 160 180* P_input_buffer_len parameter fixed bin(21,0) dcl 33 ref 91 96 125 130 P_input_chars_len parameter fixed bin(21,0) dcl 34 set ref 91 111* 125 145* P_input_chars_ptr parameter pointer dcl 32 ref 91 95 125 129 P_iocbp parameter pointer dcl 31 ref 91 94 125 128 160 163 195 198 P_output_chars_len parameter fixed bin(21,0) dcl 37 ref 160 165 P_output_chars_ptr parameter pointer dcl 36 ref 160 164 addr builtin function dcl 80 ref 101 101 135 135 173 173 200 200 203 203 207 207 code 000100 automatic fixed bin(35,0) dcl 43 set ref 98* 100 101* 105* 112 132* 134 135* 139* 146 170* 172 173* 177* 180 200* 202 203* 207* 210* 212* debug 000010 internal static bit(1) initial packed unaligned dcl 61 set ref 103 108 137 142 167 175 205 212 221* 229* debug_iocbp 000012 internal static pointer initial dcl 62 set ref 103* 108* 137* 142* 167* 175* 205* 212* 242* 244* diocbp parameter pointer dcl 238 ref 235 242 244 error_table_$line_status_pending 000014 external static fixed bin(35,0) dcl 66 ref 100 134 172 202 event_channel 000116 automatic fixed bin(71,0) level 2 dcl 57 set ref 210* 212* input_buffer_len 000104 automatic fixed bin(21,0) dcl 46 set ref 96* 98* 105* 130* 132* 139* input_chars based char packed unaligned dcl 48 set ref 108* 142* input_chars_len 000105 automatic fixed bin(21,0) dcl 47 set ref 98* 105* 108* 108 108 111 132* 139* 142* 142 142 145 input_chars_ptr 000102 automatic pointer dcl 45 set ref 95* 98* 105* 108 129* 132* 139* 142 input_pending 2 000116 automatic bit(1) level 2 dcl 57 set ref 212* 217 ioa_$ioa_switch 000016 constant entry external dcl 71 ref 103 108 137 142 167 175 205 212 iocbp 000106 automatic pointer dcl 50 set ref 94* 98* 101* 105* 128* 132* 135* 139* 163* 170* 173* 177* 198* 200* 203* 207* iox_$control 000020 constant entry external dcl 72 ref 101 135 173 200 203 207 iox_$get_chars 000022 constant entry external dcl 73 ref 98 105 iox_$get_line 000024 constant entry external dcl 74 ref 132 139 iox_$put_chars 000026 constant entry external dcl 75 ref 170 177 iox_$user_output 000032 external static pointer dcl 239 ref 242 ipc_$drain_chn 000030 constant entry external dcl 76 ref 210 line_status 000110 automatic bit(72) packed unaligned dcl 51 set ref 101 101 103* 135 135 137* 173 173 175* 203 203 205* null builtin function dcl 240 ref 242 output_chars based char packed unaligned dcl 55 set ref 167* output_chars_len 000114 automatic fixed bin(21,0) dcl 54 set ref 165* 167* 167 167 170* 177* output_chars_ptr 000112 automatic pointer dcl 53 set ref 164* 167 170* 177* read_status_info 000116 automatic structure level 1 dcl 57 set ref 200 200 207 207 tty_read_status_info based structure level 1 dcl 1-17 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. tty_read_status_info_ptr automatic pointer dcl 1-21 tty_write_status_info based structure level 1 dcl 1-23 tty_write_status_info_ptr automatic pointer dcl 1-27 NAMES DECLARED BY EXPLICIT CONTEXT. debug_off 001272 constant entry external dcl 227 debug_on 001250 constant entry external dcl 219 get_chars 000124 constant entry external dcl 91 get_line 000344 constant entry external dcl 125 l6_tran_util_ 000102 constant entry external dcl 25 put_chars 000567 constant entry external dcl 160 read_status 001002 constant entry external dcl 195 set_debug_iocb 001315 constant entry external dcl 235 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1534 1570 1351 1544 Length 2032 1351 34 226 162 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME l6_tran_util_ 140 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 debug l6_tran_util_ 000012 debug_iocbp l6_tran_util_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME l6_tran_util_ 000100 code l6_tran_util_ 000102 input_chars_ptr l6_tran_util_ 000104 input_buffer_len l6_tran_util_ 000105 input_chars_len l6_tran_util_ 000106 iocbp l6_tran_util_ 000110 line_status l6_tran_util_ 000112 output_chars_ptr l6_tran_util_ 000114 output_chars_len l6_tran_util_ 000116 read_status_info l6_tran_util_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac signal_op ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. ioa_$ioa_switch iox_$control iox_$get_chars iox_$get_line iox_$put_chars ipc_$drain_chn THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$line_status_pending iox_$user_output LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 25 000101 27 000111 91 000117 94 000136 95 000142 96 000145 98 000147 100 000166 101 000172 103 000224 105 000252 106 000271 108 000272 111 000326 112 000331 114 000333 125 000342 128 000356 129 000362 130 000365 132 000367 134 000406 135 000412 137 000444 139 000472 140 000511 142 000512 145 000546 146 000551 148 000553 160 000562 163 000601 164 000605 165 000610 167 000612 170 000646 172 000663 173 000670 175 000722 177 000750 178 000765 180 000766 182 000767 195 000776 198 001010 200 001014 202 001046 203 001052 205 001104 207 001132 208 001164 210 001165 212 001175 217 001233 219 001247 221 001257 222 001262 227 001271 229 001301 230 001303 235 001312 242 001324 244 001336 246 001342 ----------------------------------------------------------- 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