COMPILATION LISTING OF SEGMENT backup_preattach Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1633.5 mst Mon 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 backup_preattach: bpa: proc (); 12 13 /* Hack to preattach bk_ss_$data_iocb */ 14 15 /* 11/18/80, WOS */ 16 17 dcl ap pointer; 18 dcl al fixed bin (21); 19 dcl arg char (al) based (ap); 20 dcl (nargs, argno) fixed bin; 21 dcl code fixed bin (35); 22 dcl open_mode fixed bin; 23 dcl attach_desc char (512) varying; 24 dcl iocbp pointer; 25 dcl stream_name char (32); 26 27 dcl com_err_ entry options (variable); 28 dcl cu_$arg_count entry (fixed bin, fixed bin (35)); 29 dcl cu_$arg_ptr entry (fixed bin, pointer, fixed bin (21), fixed bin (35)); 30 dcl iox_$attach_name entry (char (*), pointer, char (*), pointer, fixed bin (35)); 31 dcl iox_$open entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)); 32 dcl iox_$close entry (pointer, fixed bin (35)); 33 dcl iox_$detach_iocb entry (pointer, fixed bin (35)); 34 dcl iox_$destroy_iocb entry (pointer, fixed bin (35)); 35 dcl unique_chars_ entry (bit (*)) returns (char (15)); 36 37 dcl bk_ss_$data_iocb pointer external static; 38 dcl bk_ss_$preattached bit (1) aligned external static; 39 40 dcl (error_table_$badopt, 41 error_table_$noarg) fixed bin (35) external static; 42 43 dcl WHOAMI char (32) internal static options (constant) init ("backup_preattach"); 44 45 dcl (addr, substr, null) builtin; 46 47 /* */ 48 49 call cu_$arg_count (nargs, code); 50 if code ^= 0 then do; 51 call com_err_ (code, WHOAMI); 52 MAIN_RETURN: return; 53 end; 54 55 if nargs = 0 then do; 56 call com_err_ (error_table_$noarg, WHOAMI, 57 "^/Usage:^-^a open_mode attach_desc^/^2x(or)^-^a -detach", 58 WHOAMI, WHOAMI); 59 goto MAIN_RETURN; 60 end; 61 62 if nargs = 1 then do; /* Close, or something like that */ 63 call cu_$arg_ptr (1, ap, al, (0)); 64 if (arg = "-close") | (arg = "-detach") then do; 65 if bk_ss_$preattached = "0"b then do; 66 NOT_PREATTACHED: call com_err_ (0, WHOAMI, "Backup I/O is not preattached."); 67 goto MAIN_RETURN; 68 end; 69 70 bk_ss_$preattached = "0"b; 71 if bk_ss_$data_iocb = null () then 72 goto NOT_PREATTACHED; 73 74 call iox_$close (bk_ss_$data_iocb, (0)); 75 call iox_$detach_iocb (bk_ss_$data_iocb, (0)); 76 call iox_$destroy_iocb (bk_ss_$data_iocb, (0)); 77 goto MAIN_RETURN; 78 end; 79 80 else do; 81 call com_err_ (0, WHOAMI, "Unknown control function ^a.", arg); 82 goto MAIN_RETURN; 83 end; 84 end; 85 86 call cu_$arg_ptr (1, ap, al, (0)); /* Get the opening mode */ 87 88 if bk_ss_$preattached then do; 89 ALREADY_PREATTACHED: 90 call com_err_ (0, WHOAMI, "Backup I/O is already preattached. Use ^a -detach first.", WHOAMI); 91 goto MAIN_RETURN; 92 end; 93 94 if arg = "input" then 95 open_mode = Stream_input; 96 else if arg = "output" then 97 open_mode = Stream_output; 98 else do; 99 call com_err_ (0, WHOAMI, "Invalid opening mode ^a. Must be either ""input"" or ""output"".", arg); 100 goto MAIN_RETURN; 101 end; 102 103 attach_desc = ""; 104 do argno = 2 to nargs; 105 call cu_$arg_ptr (argno, ap, al, (0)); 106 if length (attach_desc) > 0 then 107 attach_desc = attach_desc || " "; 108 attach_desc = attach_desc || arg; 109 end; 110 111 stream_name = "backup." || unique_chars_ (""b); 112 113 call iox_$attach_name (stream_name, iocbp, (attach_desc), codeptr (backup_preattach), code); 114 if code ^= 0 then do; 115 call com_err_ (code, WHOAMI, "Cannot attach stream."); 116 goto MAIN_RETURN; 117 end; 118 119 call iox_$open (iocbp, open_mode, "0"b, code); 120 if code ^= 0 then do; 121 call com_err_ (code, WHOAMI, "Cannot open stream."); 122 return; 123 end; 124 125 bk_ss_$preattached = "1"b; 126 bk_ss_$data_iocb = iocbp; 127 128 return; 129 130 1 1 /* Begin include file ..... iox_modes.incl.pl1 */ 1 2 1 3 /* Written by C. D. Tavares, 03/17/75 */ 1 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 1 5 1 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 1 7 ("stream_input", "stream_output", "stream_input_output", 1 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 1 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 1 10 "direct_input", "direct_output", "direct_update"); 1 11 1 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 1 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 1 14 1 15 dcl (Stream_input initial (1), 1 16 Stream_output initial (2), 1 17 Stream_input_output initial (3), 1 18 Sequential_input initial (4), 1 19 Sequential_output initial (5), 1 20 Sequential_input_output initial (6), 1 21 Sequential_update initial (7), 1 22 Keyed_sequential_input initial (8), 1 23 Keyed_sequential_output initial (9), 1 24 Keyed_sequential_update initial (10), 1 25 Direct_input initial (11), 1 26 Direct_output initial (12), 1 27 Direct_update initial (13)) fixed bin int static options (constant); 1 28 1 29 /* End include file ..... iox_modes.incl.pl1 */ 131 132 133 end backup_preattach; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1505.1 backup_preattach.pl1 >dumps>old>recomp>backup_preattach.pl1 131 1 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.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. Stream_input constant fixed bin(17,0) initial dcl 1-15 ref 94 Stream_output constant fixed bin(17,0) initial dcl 1-15 ref 96 WHOAMI 000000 constant char(32) initial unaligned dcl 43 set ref 51* 56* 56* 56* 66* 81* 89* 89* 99* 115* 121* al 000102 automatic fixed bin(21,0) dcl 18 set ref 63* 64 64 81 81 86* 94 96 99 99 105* 108 ap 000100 automatic pointer dcl 17 set ref 63* 64 64 81 86* 94 96 99 105* 108 arg based char unaligned dcl 19 set ref 64 64 81* 94 96 99* 108 argno 000104 automatic fixed bin(17,0) dcl 20 set ref 104* 105* attach_desc 000107 automatic varying char(512) dcl 23 set ref 103* 106 106* 106 108* 108 113 bk_ss_$data_iocb 000032 external static pointer dcl 37 set ref 71 74* 75* 76* 126* bk_ss_$preattached 000034 external static bit(1) dcl 38 set ref 65 70* 88 125* code 000105 automatic fixed bin(35,0) dcl 21 set ref 49* 50 51* 113* 114 115* 119* 120 121* com_err_ 000010 constant entry external dcl 27 ref 51 56 66 81 89 99 115 121 cu_$arg_count 000012 constant entry external dcl 28 ref 49 cu_$arg_ptr 000014 constant entry external dcl 29 ref 63 86 105 error_table_$noarg 000036 external static fixed bin(35,0) dcl 40 set ref 56* iocbp 000310 automatic pointer dcl 24 set ref 113* 119* 126 iox_$attach_name 000016 constant entry external dcl 30 ref 113 iox_$close 000022 constant entry external dcl 32 ref 74 iox_$destroy_iocb 000026 constant entry external dcl 34 ref 76 iox_$detach_iocb 000024 constant entry external dcl 33 ref 75 iox_$open 000020 constant entry external dcl 31 ref 119 nargs 000103 automatic fixed bin(17,0) dcl 20 set ref 49* 55 62 104 null builtin function dcl 45 ref 71 open_mode 000106 automatic fixed bin(17,0) dcl 22 set ref 94* 96* 119* stream_name 000312 automatic char(32) unaligned dcl 25 set ref 111* 113* unique_chars_ 000030 constant entry external dcl 35 ref 111 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Direct_input internal static fixed bin(17,0) initial dcl 1-15 Direct_output internal static fixed bin(17,0) initial dcl 1-15 Direct_update internal static fixed bin(17,0) initial dcl 1-15 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 1-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 1-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 1-15 Sequential_input internal static fixed bin(17,0) initial dcl 1-15 Sequential_input_output internal static fixed bin(17,0) initial dcl 1-15 Sequential_output internal static fixed bin(17,0) initial dcl 1-15 Sequential_update internal static fixed bin(17,0) initial dcl 1-15 Stream_input_output internal static fixed bin(17,0) initial dcl 1-15 addr builtin function dcl 45 error_table_$badopt external static fixed bin(35,0) dcl 40 iox_modes internal static char(24) initial array dcl 1-6 short_iox_modes internal static char(4) initial array dcl 1-12 substr builtin function dcl 45 NAMES DECLARED BY EXPLICIT CONTEXT. ALREADY_PREATTACHED 000462 constant label dcl 89 MAIN_RETURN 000215 constant label dcl 52 ref 59 67 77 82 91 100 116 NOT_PREATTACHED 000311 constant label dcl 66 ref 71 backup_preattach 000161 constant entry external dcl 11 ref 113 113 bpa 000152 constant entry external dcl 11 NAMES DECLARED BY CONTEXT OR IMPLICATION. codeptr builtin function ref 113 113 length builtin function ref 106 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1216 1256 1044 1226 Length 1466 1044 40 174 151 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME bpa 288 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME bpa 000100 ap bpa 000102 al bpa 000103 nargs bpa 000104 argno bpa 000105 code bpa 000106 open_mode bpa 000107 attach_desc bpa 000310 iocbp bpa 000312 stream_name bpa THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr iox_$attach_name iox_$close iox_$destroy_iocb iox_$detach_iocb iox_$open unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. bk_ss_$data_iocb bk_ss_$preattached error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000151 49 000166 50 000176 51 000200 52 000215 55 000216 56 000220 59 000251 62 000252 63 000254 64 000274 65 000306 66 000311 67 000336 70 000337 71 000340 74 000344 75 000355 76 000367 77 000401 81 000402 82 000436 86 000437 88 000457 89 000462 91 000511 94 000512 96 000523 99 000532 100 000564 103 000565 104 000566 105 000575 106 000613 108 000624 109 000637 111 000641 113 000671 114 000734 115 000737 116 000763 119 000764 120 001003 121 001005 122 001034 125 001035 126 001040 128 001042 ----------------------------------------------------------- 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