COMPILATION LISTING OF SEGMENT gcos_xio_ Compiled by: Multics PL/I Compiler, Release 28b, of April 11, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 09/09/83 1102.8 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1983 * 4* * * 5* *********************************************************** */ 6 gcos_xio_: proc; 7 /* 8* Open or close an IO stream with iox__ 9* 10* Created: Ron Barstad 83-03-04 based on XIO 11**/ 12 13 /* P R O C E D U R E */ 14 dcl ( cl, sn, mv, pn ) char(*) parm; 15 dcl cp ptr parm; 16 17 call com_err_ (error_table_$badcall, "gcos_xio_", 18 "Valid gcos_xio_ entries are open and close."); 19 return; 20 21 open: entry (cl, sn, mv, cp, pn) returns (bit (1)); 22 /** Execute iox routines to "open" the file: 23* 1. For caller "cl". 24* 2. for stream "sn". 25* 3. Mode "mv" = { "1" | "input", "2" | "output" }. 26* 4. Caller supplied pointer "cp" for i/o control block. 27* 5. To segment "pn". 28* 29* Return "1"b if failure. 30* **/ 31 32 if (mv = "1") | (mv = "input") then mode = 1; 33 else 34 if (mv = "2") | (mv = "output") then mode = 2; 35 else do; 36 call com_err_ (error_table_$bad_subr_arg, cl, 37 "Mode, ""^a"", not 1 or input nor 2 or output.", mv); 38 return ("1"b); 39 end; 40 41 call iox_$attach_ioname (sn, tp, "vfile_ "||pn, ec); 42 if ec>0 then do; 43 call iox_$close (tp, ec); 44 call iox_$detach_iocb (tp, ec); 45 if ec = 0 then 46 call iox_$attach_ioname (sn, tp, "vfile_ "||pn, ec); 47 end; 48 if ec>0 then do; 49 call com_err_ (ec, cl, "(attach) stream ""^a"", segment ""^a""", sn, pn); 50 cp = null (); 51 return ("1"b); 52 end; 53 54 call iox_$open (tp, mode, "0"b, ec); 55 if ec>0 then do; 56 call iox_$close (tp, ec); 57 call iox_$open (tp, mode, "0"b, ec); 58 end; 59 if ec>0 then do; 60 call com_err_ (ec, cl, "(open) mode ""^a"", stream ""^a"", segment ""^a""", mv, sn, pn); 61 call iox_$detach_iocb (tp, ec); 62 cp = null (); 63 return ("1"b); 64 end; 65 cp = tp; 66 return ("0"b); 67 68 close: entry (cl, cp) returns (bit (1)); 69 /** Execute iox routines to "close" the file: 70* 1. For caller "cl". 71* 2. With i/o control block pointer "cp". 72* 73* Return "1"b if failure. 74* 75* **/ 76 call iox_$close (cp, ec); 77 if ec>0 then 78 call com_err_ (ec, cl, "(close)."); 79 call iox_$detach_iocb (cp, ec); 80 if ec>0 then 81 call com_err_ (ec, cl, "(detach)."); 82 if ec>0 then return ("1"b); 83 return ("0"b); 84 85 /* D A T A */ 86 dcl tp ptr; 87 dcl mode fixed bin; 88 dcl ec fixed bin(35); 89 dcl com_err_ entry options(variable); 90 dcl error_table_$bad_subr_arg fixed bin(35) ext static; 91 dcl error_table_$badcall fixed bin(35) ext static; 92 dcl iox_$attach_ioname entry( char(*), ptr, char(*), fixed bin(35)); 93 dcl iox_$close entry(ptr,fixed bin(35)); 94 dcl iox_$detach_iocb entry(ptr,fixed bin(35)); 95 dcl iox_$open entry(ptr, fixed bin, bit(1) aligned, fixed bin(35)); 96 dcl null builtin; 97 end gcos_xio_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 09/09/83 1006.7 gcos_xio_.pl1 >spec>on>09/07/83-gcos>gcos_xio_.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. cl parameter char unaligned dcl 14 set ref 21 36* 49* 60* 68 77* 80* com_err_ 000010 constant entry external dcl 89 ref 17 36 49 60 77 80 cp parameter pointer dcl 15 set ref 21 50* 62* 65* 68 76* 79* ec 000103 automatic fixed bin(35,0) dcl 88 set ref 41* 42 43* 44* 45 45* 48 49* 54* 55 56* 57* 59 60* 61* 76* 77 77* 79* 80 80* 82 error_table_$bad_subr_arg 000012 external static fixed bin(35,0) dcl 90 set ref 36* error_table_$badcall 000014 external static fixed bin(35,0) dcl 91 set ref 17* iox_$attach_ioname 000016 constant entry external dcl 92 ref 41 45 iox_$close 000020 constant entry external dcl 93 ref 43 56 76 iox_$detach_iocb 000022 constant entry external dcl 94 ref 44 61 79 iox_$open 000024 constant entry external dcl 95 ref 54 57 mode 000102 automatic fixed bin(17,0) dcl 87 set ref 32* 33* 54* 57* mv parameter char unaligned dcl 14 set ref 21 32 32 33 33 36* 60* null builtin function dcl 96 ref 50 62 pn parameter char unaligned dcl 14 set ref 21 41 45 49* 60* sn parameter char unaligned dcl 14 set ref 21 41* 45* 49* 60* tp 000100 automatic pointer dcl 86 set ref 41* 43* 44* 45* 54* 56* 57* 61* 65 NAMES DECLARED BY EXPLICIT CONTEXT. close 000724 constant entry external dcl 68 gcos_xio_ 000113 constant entry external dcl 6 open 000167 constant entry external dcl 21 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1212 1240 1101 1222 Length 1424 1101 26 150 111 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME gcos_xio_ 176 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME gcos_xio_ 000100 tp gcos_xio_ 000102 mode gcos_xio_ 000103 ec gcos_xio_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return signal shorten_stack ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ iox_$attach_ioname iox_$close iox_$detach_iocb iox_$open THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_subr_arg error_table_$badcall LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 6 000112 17 000122 19 000152 21 000161 32 000227 33 000245 36 000260 38 000311 41 000324 42 000370 43 000373 44 000404 45 000415 47 000462 48 000463 49 000465 50 000523 51 000525 54 000540 55 000557 56 000561 57 000572 59 000611 60 000613 61 000655 62 000666 63 000670 65 000703 66 000705 68 000720 76 000745 77 000756 79 001005 80 001016 82 001047 83 001064 ----------------------------------------------------------- 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