COMPILATION LISTING OF SEGMENT io_call_print_iocb_ Compiled by: Multics PL/I Compiler, Release 28b, of April 11, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 05/18/83 0900.3 mst Wed 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 /* Procedure use by the io_call command to print the IOCB in a readable form */ 11 12 /* Extracted from the main command May 1977 by Larry Johnson */ 13 /* Modified 1/83 by S. Krupp to print version 2 iocb. */ 14 15 io_call_print_iocb_: proc (iocb_ptr); 16 17 /* Parameters */ 18 19 dcl iocb_ptr ptr; 20 21 /* Automatic */ 22 23 dcl i fixed bin; 24 dcl code fixed bin (35); 25 dcl dir char (168); 26 dcl ename char (32); 27 dcl p ptr; /* Pointer with short name to point to IOCB */ 28 dcl ptr1 ptr; /* Temporary pointer used for various things */ 29 dcl ptr2 ptr; /* Second temp pointer */ 30 dcl temp_name char (32) var; /* Temp name used for various things */ 31 dcl int char (32); /* Internal entry name */ 32 dcl path char (232) var; 33 dcl inh bit (37); /* Syn_ inhibit bits */ 34 dcl ev_ptr ptr; /* Pointer to entry variable array */ 35 dcl last_ptr ptr; /* Temp pointer to last entry variable */ 36 dcl dir_len fixed bin; /* Length of directory in question */ 37 38 /* Based */ 39 40 dcl 1 descrip aligned based (ptr2), /* Open or attach description */ 41 2 msg_len fixed bin, /* Length of text */ 42 2 msg char (0 refer (descrip.msg_len)); /* The actual message */ 43 44 dcl ev (N_ENTRY_VARS) entry based (ev_ptr); /* Entry variable array in IOCB */ 45 46 47 /* External stuff */ 48 49 dcl (ioa_, ioa_$nnl, ioa_$rsnnl) entry options (variable); 50 dcl cu_$decode_entry_value entry (entry, ptr, ptr); 51 dcl get_entry_name_ entry (ptr, char (*), fixed bin, char (8), fixed bin (35)); 52 dcl hcs_$fs_get_path_name entry (ptr, char (*), fixed bin, char (*), fixed bin (35)); 53 54 dcl (addr, baseno, null, ptr, rtrim, substr) builtin; 55 56 /* Constants */ 57 58 dcl N_ENTRY_VARS fixed bin init(19) int static options(constant); 59 60 dcl opt_name (19) char (14) int static options (constant) init 61 ("detach_iocb", /* 1 */ 62 "open", /* 2 */ 63 "close", /* 3 */ 64 "get_line", /* 4 */ 65 "get_chars", /* 5 */ 66 "put_chars", /* 6 */ 67 "modes", /* 7 */ 68 "position", /* 8 */ 69 "control", /* 9 */ 70 "read_record", /* 10 */ 71 "write_record", /* 11 */ 72 "rewrite_record", /* 12 */ 73 "delete_record", /* 13 */ 74 "seek_key", /* 14 */ 75 "read_key", /* 15 */ 76 "read_length", /* 16 */ 77 "open_file", /* 17 */ 78 "close_file", /* 18 */ 79 "detach"); /* 19 */ 80 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 */ 81 82 83 /* Print header line */ 84 85 p = iocb_ptr; /* Copy IOCB pointer to thing with shorter name */ 86 call ioa_$nnl ("IOCB ""^a"" @ ^p", p -> iocb.name, iocb_ptr); /* Print name and addr */ 87 if p -> iocb.actual_iocb_ptr = iocb_ptr then call ioa_ (""); /* If not syned to something, end line */ 88 else call ioa_ (" (actual IOCB is ""^a"" @ ^p)", 89 p -> iocb.actual_iocb_ptr -> iocb.name, 90 p -> iocb.actual_iocb_ptr); /* Otherwise say what real IOCB is */ 91 92 /* Print data on syn_ attachments */ 93 94 ptr1 = p -> iocb.syn_father; 95 temp_name = "father"; 96 call print_syn; 97 ptr1 = p -> iocb.syn_brother; 98 temp_name = "brother"; 99 call print_syn; 100 ptr1 = p -> iocb.syn_son; 101 temp_name = "son"; 102 call print_syn; 103 104 /* Print attach data */ 105 106 temp_name = "attach"; 107 ptr1 = p -> iocb.attach_data_ptr; 108 ptr2 = p -> iocb.attach_descrip_ptr; 109 call print_dat; 110 111 /* Print open data */ 112 113 temp_name = "open"; 114 ptr1 = p -> iocb.open_data_ptr; 115 ptr2 = p -> iocb.open_descrip_ptr; 116 call print_dat; 117 118 119 /* Print event channel */ 120 121 if p -> iocb.event_channel ^= "0"b then 122 call ioa_ ("event channel is ^24.3b", p -> iocb.event_channel); 123 124 /* IOS compatability pointer */ 125 126 if p -> iocb.ios_compatibility ^= null then 127 call ioa_ ("IOS transfer vector @ ^p", p -> iocb.ios_compatibility); 128 129 /* Print entry variables */ 130 131 ev_ptr = addr (p -> iocb.detach_iocb); /* Pointer to entry variable list */ 132 if iocb_ptr = p -> iocb.actual_iocb_ptr then inh = "0"b; /* If not syned, then no inhibits in effect */ 133 else inh = "0"b || p -> iocb.syn_inhibits; /* Otherwise copy inhibit array, supplying a "0"b 134* for detach, which is never inhibited */ 135 last_ptr = null; 136 137 do i = 1 to N_ENTRY_VARS; /* Scan all variables */ 138 call cu_$decode_entry_value (ev (i), ptr1, ptr2); /* Turn entry variable into pointers */ 139 if (i > 1) & (ptr1 = last_ptr) then do; /* If two identical pointers in a row */ 140 path = " """; /* Path name is a ditto mark */ 141 end; 142 else do; /* A real path must be determined */ 143 call get_entry_name_ (ptr1, int, (0), (""), code); /* Get entry point name */ 144 if code ^= 0 then int = ""; /* If not found */ 145 if (i = 1) | (baseno (ptr1) ^= baseno (last_ptr)) then do; /* If 1st time or different seg */ 146 call hcs_$fs_get_path_name (ptr (ptr1, 0), dir, dir_len, ename, code); /* Get path name */ 147 if code ^= 0 then dir, ename = ""; /* If it failed */ 148 end; 149 path = substr (dir, 1, dir_len); /* Build pathname */ 150 if path ^= ">" then path = path || ">"; /* Only add > if seg not in root */ 151 path = path || rtrim (ename); 152 if (int ^= ename) & (int ^= "") then path = path || "$" || rtrim (int); 153 call ioa_$rsnnl (" (^p)", temp_name, (0), ptr1); /* Edit pointer value */ 154 path = path || temp_name; 155 end; 156 last_ptr = ptr1; /* Save previous pointer */ 157 if substr (inh, i, 1) then temp_name = " (inh)"; /* If inhibited */ 158 else temp_name = ""; 159 call ioa_ ("^15a ^a^a", opt_name (i), path, temp_name); 160 end; 161 return; 162 163 /* Subroutines used by print_iocb */ 164 165 /* Procedure to print syn_ attachments */ 166 167 print_syn: proc; 168 169 if ptr1 = null then return; /* If no attachment */ 170 call ioa_ ("SYN ^a is ""^a"" @ ^p", temp_name, ptr1 -> iocb.name, ptr1); 171 return; 172 173 end print_syn; 174 175 176 /* Procedure to print attach and open data */ 177 178 print_dat: proc; 179 180 if ptr2 = null then call ioa_$nnl ("not ^aed,", temp_name); 181 else call ioa_$nnl ("^a description: ""^a"",", temp_name, descrip.msg); 182 183 if ptr1 = null then call ioa_ (" ^a data is null", temp_name); 184 else call ioa_ (" ^a data at ^p", temp_name, ptr1); 185 186 return; 187 188 end print_dat; 189 190 191 end io_call_print_iocb_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 05/18/83 0853.3 io_call_print_iocb_.pl1 >special_ldd>on>05/18/83>io_call_print_iocb_.pl1 81 1 05/18/83 0852.4 iocbx.incl.pl1 >special_ldd>on>05/18/83>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. N_ENTRY_VARS constant fixed bin(17,0) initial dcl 58 ref 137 actual_iocb_ptr 12 based pointer level 2 dcl 1-9 set ref 87 88 88* 132 addr builtin function dcl 54 ref 131 attach_data_ptr 16 based pointer level 2 dcl 1-9 ref 107 attach_descrip_ptr 14 based pointer level 2 dcl 1-9 ref 108 baseno builtin function dcl 54 ref 145 145 code 000101 automatic fixed bin(35,0) dcl 24 set ref 143* 144 146* 147 cu_$decode_entry_value 000016 constant entry external dcl 50 ref 138 descrip based structure level 1 dcl 40 detach_iocb 26 based entry variable level 2 dcl 1-9 set ref 131 dir 000102 automatic char(168) unaligned dcl 25 set ref 146* 147* 149 dir_len 000314 automatic fixed bin(17,0) dcl 36 set ref 146* 149 ename 000154 automatic char(32) unaligned dcl 26 set ref 146* 147* 151 152 ev based entry variable array dcl 44 set ref 138* ev_ptr 000310 automatic pointer dcl 34 set ref 131* 138 event_channel 24 based bit(72) level 2 dcl 1-9 set ref 121 121* get_entry_name_ 000020 constant entry external dcl 51 ref 143 hcs_$fs_get_path_name 000022 constant entry external dcl 52 ref 146 i 000100 automatic fixed bin(17,0) dcl 23 set ref 137* 138 139 145 157 159* inh 000306 automatic bit(37) unaligned dcl 33 set ref 132* 133* 157 int 000203 automatic char(32) unaligned dcl 31 set ref 143* 144* 152 152 152 ioa_ 000010 constant entry external dcl 49 ref 87 88 121 126 159 170 183 184 ioa_$nnl 000012 constant entry external dcl 49 ref 86 180 181 ioa_$rsnnl 000014 constant entry external dcl 49 ref 153 iocb based structure level 1 dcl 1-9 iocb_ptr parameter pointer dcl 19 set ref 15 85 86* 87 132 ios_compatibility 142 based pointer level 2 dcl 1-9 set ref 126 126* last_ptr 000312 automatic pointer dcl 35 set ref 135* 139 145 156* msg 1 based char level 2 dcl 40 set ref 181* msg_len based fixed bin(17,0) level 2 dcl 40 ref 181 181 name 1 based char(32) level 2 dcl 1-9 set ref 86* 88* 170* null builtin function dcl 54 ref 126 135 169 180 183 open_data_ptr 22 based pointer level 2 dcl 1-9 ref 114 open_descrip_ptr 20 based pointer level 2 dcl 1-9 ref 115 opt_name 000000 constant char(14) initial array unaligned dcl 60 set ref 159* p 000164 automatic pointer dcl 27 set ref 85* 86 87 88 88 94 97 100 107 108 114 115 121 121 126 126 131 132 133 path 000213 automatic varying char(232) dcl 32 set ref 140* 149* 150 150* 150 151* 151 152* 152 154* 154 159* ptr builtin function dcl 54 ref 146 146 ptr1 000166 automatic pointer dcl 28 set ref 94* 97* 100* 107* 114* 138* 139 143* 145 146 146 153* 156 169 170 170* 183 184* ptr2 000170 automatic pointer dcl 29 set ref 108* 115* 138* 180 181 rtrim builtin function dcl 54 ref 151 152 substr builtin function dcl 54 ref 149 157 syn_brother 150 based pointer level 2 dcl 1-9 ref 97 syn_father 146 based pointer level 2 dcl 1-9 ref 94 syn_inhibits 144 based bit(36) level 2 dcl 1-9 ref 133 syn_son 152 based pointer level 2 dcl 1-9 ref 100 temp_name 000172 automatic varying char(32) dcl 30 set ref 95* 98* 101* 106* 113* 153* 154 157* 158* 159* 170* 180* 181* 183* 184* NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$iocb_version_sentinel external static char(4) dcl 1-64 NAMES DECLARED BY EXPLICIT CONTEXT. io_call_print_iocb_ 000237 constant entry external dcl 15 print_dat 001207 constant entry internal dcl 178 ref 109 116 print_syn 001144 constant entry internal dcl 167 ref 96 99 102 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1442 1466 1344 1452 Length 1670 1344 24 165 76 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME io_call_print_iocb_ 330 external procedure is an external procedure. print_syn internal procedure shares stack frame of external procedure io_call_print_iocb_. print_dat internal procedure shares stack frame of external procedure io_call_print_iocb_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME io_call_print_iocb_ 000100 i io_call_print_iocb_ 000101 code io_call_print_iocb_ 000102 dir io_call_print_iocb_ 000154 ename io_call_print_iocb_ 000164 p io_call_print_iocb_ 000166 ptr1 io_call_print_iocb_ 000170 ptr2 io_call_print_iocb_ 000172 temp_name io_call_print_iocb_ 000203 int io_call_print_iocb_ 000213 path io_call_print_iocb_ 000306 inh io_call_print_iocb_ 000310 ev_ptr io_call_print_iocb_ 000312 last_ptr io_call_print_iocb_ 000314 dir_len io_call_print_iocb_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$decode_entry_value get_entry_name_ hcs_$fs_get_path_name ioa_ ioa_$nnl ioa_$rsnnl NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 15 000234 85 000244 86 000250 87 000274 88 000314 94 000341 95 000344 96 000351 97 000352 98 000355 99 000362 100 000363 101 000366 102 000372 106 000373 107 000400 108 000403 109 000406 113 000407 114 000413 115 000416 116 000421 121 000422 126 000447 131 000474 132 000477 133 000507 135 000513 137 000515 138 000525 139 000542 140 000551 141 000555 143 000556 144 000612 145 000617 146 000631 147 000664 149 000674 150 000704 151 000720 152 000744 153 001022 154 001053 156 001065 157 001067 158 001102 159 001103 160 001141 161 001143 167 001144 169 001145 170 001152 171 001206 178 001207 180 001210 181 001236 183 001266 184 001314 186 001341 ----------------------------------------------------------- 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