COMPILATION LISTING OF SEGMENT attach_mpc_ Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/18/86 1356.5 mst Fri 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 12 13 /****^ HISTORY COMMENTS: 14* 1) change(86-06-04,Hartogs), approve(86-06-04,MCR7383), 15* audit(86-06-05,Coppola), install(86-07-18,MR12.0-1098): 16* Changed to use version constants in rcp_printer_info.incl.pl1 and 17* rcp_device_info.incl.pl1 18* END HISTORY COMMENTS */ 19 20 21 /* ATTACH_MPC_ - Subroutine interface for attaching an MPC. */ 22 /* Written January 1980 by Larry Johnson */ 23 /* Modified October 1982 by C. Hornig for new PRPH TAP card. */ 24 /* Modified June 1984 by Paul Farley to correct attaching by channel 25* when it is required to be on a primary channel. Also now use 26* hcs_$get_user_effmode to check access to rcp_priv_. 27**/ 28 29 /* format: style4,indattr,insnl,delnl */ 30 31 attach_mpc_: 32 proc (arg_attach_mpc_datap, arg_code); 33 34 /* Parameters */ 35 36 dcl arg_attach_mpc_datap ptr; 37 dcl arg_code fixed bin (35); 38 39 /* Automatic */ 40 41 dcl mpc_type char (3); 42 dcl (i, j) fixed bin; 43 dcl rs_mode fixed bin (5); 44 dcl execute bit (5) init ("00100"b); 45 dcl code fixed bin (35); 46 dcl n_tried fixed bin; 47 dcl dev_tried (4) char (32); 48 dcl rcp_info_ptr ptr; 49 dcl 1 auto_printer_info like printer_info aligned automatic; 50 dcl 1 auto_device_info like device_info aligned automatic; 51 52 /* External */ 53 54 dcl com_err_ entry options (variable); 55 dcl config_$find_2 entry (char (4) aligned, char (4) aligned, ptr); 56 dcl find_config_card_$mpc_for_channel 57 entry (fixed bin (3), fixed bin (6), ptr); 58 dcl find_config_card_$prph_for_channel 59 entry (fixed bin (3), fixed bin (6), ptr); 60 dcl ioa_$rsnnl entry options (variable); 61 dcl ipc_$create_ev_chn entry (fixed bin (71), fixed bin (35)); 62 dcl convert_ipc_code_ entry (fixed bin (35)); 63 dcl rcp_priv_$attach entry (char (*), ptr, fixed bin (71), char (*), bit (36) aligned, fixed bin (35)); 64 dcl rcp_$check_attach entry (bit (36) aligned, ptr, char (*), fixed bin, fixed bin (19), fixed bin (71), fixed bin, 65 fixed bin (35)); 66 dcl rcp_$detach entry (bit (36) aligned, bit (*), fixed bin, char (*), fixed bin (35)); 67 dcl ipc_$delete_ev_chn entry (fixed bin (71), fixed bin (35)); 68 dcl ioi_$set_channel_required 69 entry (fixed bin, fixed bin (3), fixed bin (6), fixed bin (35)); 70 dcl hcs_$get_user_effmode entry (char (*), char (*), char (*), fixed bin, fixed bin (5), fixed bin (35)); 71 72 dcl error_table_$unimplemented_version 73 fixed bin (35) ext static; 74 dcl error_table_$invalid_device 75 fixed bin (35) ext static; 76 dcl error_table_$bad_channel 77 fixed bin (35) ext static; 78 dcl error_table_$no_connection 79 fixed bin (35) ext static; 80 dcl error_table_$device_busy 81 fixed bin (35) ext static; 82 83 dcl disk_status_table_$disk_status_table_ 84 ext; 85 86 dcl (addr, bit, hbound, null, rtrim, substr) 87 builtin; 88 89 /* Attach entry */ 90 91 attach_mpc_datap = arg_attach_mpc_datap; 92 if attach_mpc_data.version ^= attach_mpc_data_version_1 then do; 93 code = error_table_$unimplemented_version; 94 if attach_mpc_data.report 95 then call com_err_ (code, attach_mpc_data.caller_name); 96 go to error_return; 97 end; 98 attach_mpc_data.ioi_index = 0; 99 attach_mpc_data.ioi_channel = 0; 100 attach_mpc_data.rcp_id = "0"b; 101 attach_mpc_data.max_workspace_size = 0; 102 attach_mpc_data.max_time_limit = 0; 103 attach_mpc_data.mpc_cardp = null (); 104 attach_mpc_data.prph_cardp = null (); 105 attach_mpc_data.device_name = ""; 106 attach_mpc_data.status_tablep = addr (disk_status_table_$disk_status_table_); 107 /* Any table should work ok */ 108 109 /* Check for no mpc name given. If so, attach mpc on channel specified */ 110 111 if attach_mpc_data.mpc_name = "" then do; 112 if ^attach_mpc_data.channel_required then do; 113 no_mpc_for_chan: 114 code = error_table_$bad_channel; 115 if attach_mpc_data.report 116 then call com_err_ (code, attach_mpc_data.caller_name, "No MPC found for channel specified."); 117 go to error_return; 118 end; 119 call find_config_card_$mpc_for_channel (attach_mpc_data.iom, (attach_mpc_data.channel), mpc_cardp); 120 attach_mpc_data.mpc_name = mpc_card.name; /* This is what to attach */ 121 end; 122 123 /* Check mpc name */ 124 125 mpc_type = substr (attach_mpc_data.mpc_name, 1, 3); 126 if ^(mpc_type = "msp" | mpc_type = "mtp" | mpc_type = "urp") then do; 127 code = error_table_$invalid_device; 128 if attach_mpc_data.report 129 then call com_err_ (code, attach_mpc_data.caller_name, "^a", attach_mpc_data.mpc_name); 130 go to error_return; 131 end; 132 133 /* Locate mpc card for this mpc */ 134 135 call config_$find_2 ("mpc", substr (attach_mpc_data.mpc_name, 1, 4), mpc_cardp); 136 if mpc_cardp = null () then do; 137 code = error_table_$invalid_device; 138 if attach_mpc_data.report 139 then call com_err_ (code, attach_mpc_data.caller_name, "MPC ^a not configured.", attach_mpc_data.mpc_name); 140 go to error_return; 141 end; 142 attach_mpc_data.mpc_cardp = mpc_cardp; 143 attach_mpc_data.model = mpc_card.model; 144 attach_mpc_data.type = mpc_type; 145 146 /* Be sure channel requested consistent with this mpc */ 147 148 if attach_mpc_data.channel_required then do; 149 if ^attach_mpc_data.bootload_channel then do; 150 if channel_on_mpc () 151 then go to channel_ok; 152 code = error_table_$bad_channel; 153 if attach_mpc_data.report 154 then call com_err_ (code, attach_mpc_data.caller_name, "Requested channel not on mpc ^a.", 155 attach_mpc_data.mpc_name); 156 go to error_return; 157 end; 158 else do; 159 if attach_mpc_data.channel = 0 then do; /* none specified */ 160 attach_mpc_data.iom = mpc_card.iom (1); 161 /* Use lowest channel */ 162 attach_mpc_data.channel = mpc_card.chan (1); 163 goto channel_ok; 164 end; 165 do i = 1 to hbound (mpc_card.port, 1) while (mpc_card.iom (i) ^= -1); 166 if attach_mpc_data.iom = mpc_card.iom (i) & 167 /* primary channel? */ 168 attach_mpc_data.channel = mpc_card.chan (i) 169 then goto channel_ok; 170 end; 171 code = error_table_$bad_channel; 172 if attach_mpc_data.report 173 then call com_err_ (code, attach_mpc_data.caller_name, 174 "Requested channel, not valid primary on mpc ^a.", attach_mpc_data.mpc_name); 175 go to error_return; 176 end; 177 end; 178 channel_ok: 179 if mpc_type = "urp" 180 then go to unit_record_attach; 181 182 /* Attach disk or tape mpc */ 183 184 if attach_mpc_data.channel_required then do; 185 call find_prph (attach_mpc_data.iom, attach_mpc_data.channel); 186 if attach_mpc_data.prph_cardp = null () then do; 187 code = error_table_$no_connection; 188 if attach_mpc_data.report 189 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to get to mpc ^a thru ^a.", 190 attach_mpc_data.mpc_name, edit_channel ()); 191 go to error_return; 192 end; 193 call attach_special; 194 if code = 0 195 then go to attach_complete; 196 else do; 197 if attach_mpc_data.report 198 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to attach ^a to get to mpc ^a.", 199 attach_mpc_data.device_name, attach_mpc_data.mpc_name); 200 go to error_return; 201 end; 202 end; 203 else do; 204 n_tried = 0; 205 do i = 1 to hbound (mpc_card.port, 1); /* Try all ports */ 206 call find_prph ((mpc_card.iom (i)), (mpc_card.chan (i))); 207 if attach_mpc_data.prph_cardp ^= null () then do; 208 do j = 1 to n_tried; /* Dont try same device twice */ 209 if dev_tried (j) = attach_mpc_data.device_name 210 then go to next_port; 211 end; 212 n_tried = n_tried + 1; 213 dev_tried (n_tried) = attach_mpc_data.device_name; 214 call attach_special; 215 if code = 0 then do; 216 attach_mpc_data.iom = mpc_card.iom (i); 217 attach_mpc_data.channel = mpc_card.chan (i); 218 go to attach_complete; 219 end; 220 end; 221 next_port: 222 end; 223 end; 224 report_failure: 225 if n_tried = 0 then do; 226 code = error_table_$no_connection; 227 if attach_mpc_data.report 228 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to find path to ^a.", 229 attach_mpc_data.mpc_name); 230 go to error_return; 231 end; 232 else do; 233 code = error_table_$device_busy; 234 if attach_mpc_data.report 235 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to attach ^a.", attach_mpc_data.mpc_name); 236 end; 237 go to error_return; 238 239 /* Attach unit record mpc */ 240 241 unit_record_attach: 242 if attach_mpc_data.channel_required then do; 243 call find_prph (attach_mpc_data.iom, attach_mpc_data.channel); 244 if attach_mpc_data.prph_cardp = null () then do; 245 code = error_table_$no_connection; 246 if attach_mpc_data.report 247 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to get to mpc ^a thru channel ^a.", 248 attach_mpc_data.mpc_name, edit_channel ()); 249 go to error_return; 250 end; 251 call attach_unit_record; 252 if code = 0 253 then go to attach_complete; 254 else do; 255 if attach_mpc_data.report 256 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to attach ^a to get to mpc ^a.", 257 attach_mpc_data.device_name, attach_mpc_data.mpc_name); 258 go to error_return; 259 end; 260 end; 261 262 n_tried = 0; 263 do i = 1 to mpc_card.nchan (1); 264 call find_prph ((mpc_card.iom (1)), mpc_card.chan (1) + i - 1); 265 if attach_mpc_data.prph_cardp ^= null () then do; 266 n_tried = n_tried + 1; 267 call attach_unit_record; 268 if code = 0 then do; 269 attach_mpc_data.iom = mpc_card.iom (1); 270 attach_mpc_data.channel = mpc_card.chan (1) + i - 1; 271 go to attach_complete; 272 end; 273 end; 274 end; 275 go to report_failure; 276 277 attach_complete: 278 call ioi_$set_channel_required (attach_mpc_data.ioi_index, attach_mpc_data.iom, attach_mpc_data.channel, code); 279 if code ^= 0 then do; 280 if attach_mpc_data.report 281 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to force use of ^a for ^a.", 282 edit_channel (), attach_mpc_data.mpc_name); 283 go to error_return; 284 end; 285 286 arg_code = 0; 287 return; 288 289 error_return: 290 call detach_mpc_ (attach_mpc_datap, (0)); 291 arg_code = code; 292 return; 293 294 /* Entry to detach an mpc */ 295 296 detach_mpc_: 297 entry (arg_attach_mpc_datap, arg_code); 298 299 attach_mpc_datap = arg_attach_mpc_datap; 300 301 if attach_mpc_data.rcp_id ^= "0"b 302 then call rcp_$detach (attach_mpc_data.rcp_id, "0"b, 0, "", code); 303 attach_mpc_data.rcp_id = "0"b; 304 if attach_mpc_data.ioi_channel ^= 0 305 then call ipc_$delete_ev_chn (attach_mpc_data.ioi_channel, code); 306 attach_mpc_data.ioi_channel = 0; 307 arg_code = 0; 308 return; 309 310 /* Attach a special device to get to a tape or disk mpc */ 311 312 attach_special: 313 proc; 314 315 call fill_device_info; 316 call attach ("special"); 317 318 return; 319 320 end attach_special; 321 322 attach_unit_record: 323 proc; 324 325 dcl dev_type char (32); 326 327 if substr (attach_mpc_data.device_name, 1, 3) = "prt" then do; 328 dev_type = "printer"; 329 rcp_info_ptr, printer_info_ptr = addr (auto_printer_info); 330 printer_info.version_num = PRINTER_INFO_VERSION_1; 331 printer_info.usage_time = 0; 332 printer_info.wait_time = 0; 333 printer_info.system_flag = "0"b; 334 printer_info.device_name = substr (attach_mpc_data.device_name, 1, 8); 335 printer_info.model = 0; 336 printer_info.print_train = 0; 337 printer_info.line_length = -1; 338 end; 339 else do; 340 call fill_device_info; 341 if substr (attach_mpc_data.device_name, 1, 3) = "rdr" 342 then dev_type = "reader"; 343 else if substr (attach_mpc_data.device_name, 1, 3) = "pun" 344 then dev_type = "punch"; 345 else dev_type = "special"; /* Probably wrong, but what else is there? */ 346 end; 347 call attach (dev_type); 348 349 return; 350 351 end attach_unit_record; 352 353 fill_device_info: 354 proc; 355 356 rcp_info_ptr, device_info_ptr = addr (auto_device_info); 357 device_info.version_num = DEVICE_INFO_VERSION_1; 358 device_info.usage_time = 0; 359 device_info.wait_time = 0; 360 device_info.system_flag = "0"b; 361 device_info.device_name = substr (attach_mpc_data.device_name, 1, 8); 362 device_info.model = 0; 363 device_info.qualifiers (*) = 0; 364 return; 365 366 end fill_device_info; 367 368 attach: 369 proc (dev_type); 370 371 dcl dev_type char (*); 372 dcl state fixed bin; 373 dcl rcp_comment char (100); 374 375 if attach_mpc_data.ioi_channel = 0 then do; 376 call ipc_$create_ev_chn (attach_mpc_data.ioi_channel, code); 377 if code ^= 0 then do; 378 call convert_ipc_code_ (code); 379 if attach_mpc_data.report 380 then call com_err_ (code, attach_mpc_data.caller_name, "Unable to create event channel."); 381 go to error_return; 382 end; 383 end; 384 385 /* Check callers access to rcp_priv_ */ 386 387 call hcs_$get_user_effmode (">system_library_1", "rcp_priv_", "", -1, rs_mode, code); 388 389 if code ^= 0 then do; 390 call com_err_ (code, attach_mpc_data.caller_name, "Cannot get effective access to >sl1>rcp_priv_."); 391 return; 392 end; 393 394 if bit (rs_mode) & execute 395 then ; 396 else do; 397 call com_err_ (code, attach_mpc_data.caller_name, "Improper access to gate >sl1>rcp_priv_."); 398 return; 399 end; 400 401 402 call rcp_priv_$attach (dev_type, rcp_info_ptr, attach_mpc_data.ioi_channel, "", attach_mpc_data.rcp_id, code); 403 if code ^= 0 404 then return; 405 406 call rcp_$check_attach (attach_mpc_data.rcp_id, rcp_info_ptr, rcp_comment, attach_mpc_data.ioi_index, 407 attach_mpc_data.max_workspace_size, attach_mpc_data.max_time_limit, state, code); 408 if state ^= 0 409 then if code = 0 410 then code = state; 411 412 return; 413 414 end attach; 415 416 edit_channel: 417 proc returns (char (32) var); 418 419 dcl temp char (32) var; 420 421 call ioa_$rsnnl ("IOM ^[a^;b^;c^;d^;e^;f^;g^;h^], channel ^d", temp, (0), attach_mpc_data.iom, 422 attach_mpc_data.channel); 423 return (temp); 424 425 end edit_channel; 426 427 channel_on_mpc: 428 proc returns (bit (1)); 429 430 dcl i fixed bin; 431 432 do i = 1 to hbound (mpc_card.port, 1) while (mpc_card.iom (i) ^= -1); 433 if mpc_card.iom (i) = attach_mpc_data.iom & mpc_card.chan (i) <= attach_mpc_data.channel 434 & mpc_card.chan (i) + mpc_card.nchan (i) > attach_mpc_data.channel 435 then return ("1"b); 436 end; 437 return ("0"b); 438 439 end channel_on_mpc; 440 441 /* Procedure, that given an iom and channel, will find device necessary to attach to that channel */ 442 443 find_prph: 444 proc (iom, chan); 445 446 dcl iom fixed bin (3); 447 dcl chan fixed bin (6); 448 449 call find_config_card_$prph_for_channel (iom, (chan), prph_cardp); 450 if prph_cardp = null () then do; 451 attach_mpc_data.prph_cardp = null (); 452 attach_mpc_data.device_name = ""; 453 return; 454 end; 455 456 attach_mpc_data.prph_cardp = prph_cardp; 457 attach_mpc_data.device_name = prph_card.name; 458 if substr (attach_mpc_data.device_name, 1, 3) = "dsk" | substr (attach_mpc_data.device_name, 1, 3) = "tap" 459 then attach_mpc_data.device_name = rtrim (attach_mpc_data.device_name) || "_00"; 460 return; 461 462 end find_prph; 463 1 1 /* Begin include file ..... attach_mpc_data.incl.pl1 */ 1 2 1 3 /* Defines the arguments to the attach_mpc_ subroutine */ 1 4 /* Prepared January 1980 by Larry Johnson */ 1 5 1 6 dcl attach_mpc_datap ptr; 1 7 dcl attach_mpc_data_version_1 fixed bin int static options (constant) init (1); 1 8 1 9 dcl 1 attach_mpc_data aligned based (attach_mpc_datap), 1 10 2 version fixed bin, /* Version of this structure (I) */ 1 11 2 mpc_name char (32), /* Name of mpc to attach (I/O) */ 1 12 2 caller_name char (32), /* Name of caller, for error mesages (I) */ 1 13 2 flags unal, 1 14 3 channel_required bit (1), /* Caller has specified IOM and channel (I) */ 1 15 3 bootload_channel bit (1), /* Caller wants bootload channel (I) */ 1 16 3 report bit (1), /* Allow com_err_ cals (I) */ 1 17 3 mbz bit (33), /* (I) */ 1 18 2 iom fixed bin (3), /* Which IOM to use (I/O) */ 1 19 2 channel fixed bin (6), /* Which channel to use (I/O) */ 1 20 2 ioi_index fixed bin, /* Index for caller to talk to ioi (O) */ 1 21 2 rcp_id bit (36), /* ID for calling RCP (O) */ 1 22 2 ioi_channel fixed bin (71), /* Event channel for ioi wakeups (O) */ 1 23 2 max_time_limit fixed bin (71), /* Longest time to wait for I/O to complete (O) */ 1 24 2 max_workspace_size fixed bin (19), /* Largest workspace to use (O) */ 1 25 2 type char (4), /* MPC type, urp, msp, or mtp (O) */ 1 26 2 model fixed bin, /* MPC model number (O) */ 1 27 2 mpc_cardp ptr, /* Pointer to mpc card of mpc attached (O) */ 1 28 2 prph_cardp ptr, /* Pointer to prph card of device attached (O) */ 1 29 2 status_tablep ptr, /* Address of status table for decoding errors (O) */ 1 30 2 device_name char (32); /* Name of device actually attached (O) */ 1 31 1 32 /* End include file ..... attach_mpc_data.incl.pl1 */ 464 2 1 /* BEGIN INCLUDE FILE ... config_mpc_card.incl.pl1 ... 11/27/80 W. Olin Sibert */ 2 2 2 3 dcl mpc_cardp ptr; /* Pointer to an MPC card. */ 2 4 2 5 dcl 1 mpc_card aligned based (mpc_cardp), 2 6 2 word char (4), /* "mpc" */ 2 7 2 name char (4), /* Name of this MPC - e.g., "mspa" */ 2 8 2 model fixed bin, /* Model of this MPC - e.g., 601. */ 2 9 2 port (4), /* Per port information. 12 fields total */ 2 10 3 iom fixed bin (3), /* IOM number */ 2 11 3 chan fixed bin (8), /* Channel number. */ 2 12 3 nchan fixed bin, /* Number of logical channels on this channel. */ 2 13 2 14 2 type_word aligned, 2 15 3 field_type (14) bit (2) unaligned, /* type of each field; see config_deck.incl.pl1 */ 2 16 3 pad1 bit (4) unaligned, 2 17 3 n_fields fixed bin (4) unsigned unaligned; /* number of fields used on card */ 2 18 2 19 dcl 1 mpc_card_array aligned based (mpc_cardp), /* Overlay for MPC port array */ 2 20 2 pad1 (3) bit (36) aligned, 2 21 2 port (divide (max (0, (mpc_card.n_fields - 2)), 3, 17, 0)), 2 22 3 iom fixed bin (3), /* IOM number */ 2 23 3 chan fixed bin (8), /* Channel number. */ 2 24 3 nchan fixed bin; /* Number of logical channels on this channel. */ 2 25 2 26 dcl MPC_CARD_WORD char (4) aligned internal static options (constant) init ("mpc"); 2 27 2 28 /* END INCLUDE FILE ... config_mpc_card.incl.pl1 */ 465 3 1 /* BEGIN INCLUDE FILE ... config_prph_card.incl.pl1 ... 11/27/80 W. Olin Sibert */ 3 2 3 3 dcl prph_cardp ptr; /* Pointer to a PRPH card. */ 3 4 3 5 dcl 1 prph_card based (prph_cardp) aligned, /* PRPH card declaration */ 3 6 2 word char (4), /* "prph" */ 3 7 2 name char (4), /* subsystem name */ 3 8 2 iom fixed bin (3), /* IOM number */ 3 9 2 chan fixed bin (8), /* channel number */ 3 10 2 model fixed bin, /* model number */ 3 11 2 state char (4), /* ON/OFF state */ 3 12 2 pad (9) bit (36) aligned, /* pad to 15 fields */ 3 13 3 14 2 type_word aligned, 3 15 3 field_type (14) bit (2) unaligned, /* type of each field; see config_deck.incl.pl1 */ 3 16 3 pad1 bit (4) unaligned, 3 17 3 n_fields fixed bin (4) unsigned unaligned; /* number of fields used on card */ 3 18 3 19 dcl PRPH_CARD_WORD char (4) aligned internal static options (constant) init ("prph"); 3 20 3 21 /* END INCLUDE FILE ... config_prph_card.incl.pl1 */ 466 4 1 /* Begin include file rcp_device_info.incl.pl1 4 2** 4 3** Created on 01/08/75 by Bill Silver. 4 4** This include file defines the RCP device info structure for a general device. 4 5**/ 4 6 4 7 4 8 /****^ HISTORY COMMENTS: 4 9* 1) change(86-06-04,Hartogs), approve(86-06-04,MCR7383), 4 10* audit(86-06-05,Coppola), install(86-07-18,MR12.0-1098): 4 11* Added DEVICE_INFO_VERSION_1 constant. 4 12* END HISTORY COMMENTS */ 4 13 4 14 4 15 dcl device_info_ptr ptr; /* Pointer to general device info structure. */ 4 16 4 17 dcl 1 device_info based(device_info_ptr) aligned, /* RCP device info structure for any device. */ 4 18 2 version_num fixed bin, /* Version number of this structure. */ 4 19 2 usage_time fixed bin, /* Number of minutes device will/may be used. */ 4 20 2 wait_time fixed bin, /* Number of minutes user will/must wait. */ 4 21 2 system_flag bit(1), /* ON => user wants to be a system process. */ 4 22 2 device_name char(8), /* Device name. */ 4 23 2 model fixed bin, /* Device model number. */ 4 24 2 qualifiers(4) fixed bin(35); /* Qualifying characteristics. */ 4 25 4 26 dcl DEVICE_INFO_VERSION_1 fixed bin int static options (constant) init (1); 4 27 4 28 /* End of include file ... rcp_device_info.incl.pl1 */ 467 5 1 /* Begin include file rcp_printer_info.incl.pl1 5 2** 5 3** Created on 01/08/75 by Bill Silver. 5 4** This include file defines the RCP device info structure for printers. 5 5**/ 5 6 5 7 5 8 /****^ HISTORY COMMENTS: 5 9* 1) change(86-06-04,Hartogs), approve(86-06-04,MCR7383), 5 10* audit(86-06-05,Coppola), install(86-07-18,MR12.0-1098): 5 11* Added version constant PRINTER_INFO_VERSION_1. 5 12* END HISTORY COMMENTS */ 5 13 5 14 5 15 dcl printer_info_ptr ptr; /* Pointer to printer device info structure. */ 5 16 5 17 dcl 1 printer_info based(printer_info_ptr) aligned, /* RCP device info structure for printers. */ 5 18 2 version_num fixed bin, /* Version number of this structure. */ 5 19 2 usage_time fixed bin, /* Number of minutes printer will/may be used. */ 5 20 2 wait_time fixed bin, /* Number of minutes user will/must wait. */ 5 21 2 system_flag bit(1), /* ON => user wants to be a system process. */ 5 22 2 device_name char(8), /* Printer name. */ 5 23 2 model fixed bin, /* Printer model number. */ 5 24 2 print_train fixed bin, /* Print train type. */ 5 25 2 line_length fixed bin; /* Printer line length. -1 => not specified. */ 5 26 5 27 dcl PRINTER_INFO_VERSION_1 fixed bin int static options (constant) init (1); 5 28 5 29 /* End of include file ... rcp_printer_info.incl.pl1 */ 468 469 470 end attach_mpc_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/18/86 1235.1 attach_mpc_.pl1 >spec>install>1098>attach_mpc_.pl1 464 1 08/11/80 1844.3 attach_mpc_data.incl.pl1 >ldd>include>attach_mpc_data.incl.pl1 465 2 05/08/81 1853.6 config_mpc_card.incl.pl1 >ldd>include>config_mpc_card.incl.pl1 466 3 10/31/84 1315.5 config_prph_card.incl.pl1 >ldd>include>config_prph_card.incl.pl1 467 4 07/18/86 1218.3 rcp_device_info.incl.pl1 >spec>install>1098>rcp_device_info.incl.pl1 468 5 07/18/86 1218.3 rcp_printer_info.incl.pl1 >spec>install>1098>rcp_printer_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. DEVICE_INFO_VERSION_1 constant fixed bin(17,0) initial dcl 4-26 ref 357 PRINTER_INFO_VERSION_1 constant fixed bin(17,0) initial dcl 5-27 ref 330 addr builtin function dcl 86 ref 106 329 356 arg_attach_mpc_datap parameter pointer dcl 36 ref 31 91 296 299 arg_code parameter fixed bin(35,0) dcl 37 set ref 31 286* 291* 296 307* attach_mpc_data based structure level 1 dcl 1-9 attach_mpc_data_version_1 constant fixed bin(17,0) initial dcl 1-7 ref 92 attach_mpc_datap 000176 automatic pointer dcl 1-6 set ref 91* 92 94 94 98 99 100 101 102 103 104 105 106 111 112 115 115 119 119 120 125 128 128 128 135 135 138 138 138 142 143 144 148 149 153 153 153 159 160 162 166 166 172 172 172 184 185 185 186 188 188 188 197 197 197 197 207 209 213 216 217 227 227 227 234 234 234 241 243 243 244 246 246 246 255 255 255 255 265 269 270 277 277 277 280 280 280 289* 299* 301 301 303 304 304 306 327 334 341 343 361 375 376 379 379 390 397 402 402 406 406 406 406 421 421 433 433 433 451 452 456 457 458 458 458 458 auto_device_info 000163 automatic structure level 1 dcl 50 set ref 356 auto_printer_info 000152 automatic structure level 1 dcl 49 set ref 329 bit builtin function dcl 86 ref 394 bootload_channel 21(01) based bit(1) level 3 packed unaligned dcl 1-9 ref 149 caller_name 11 based char(32) level 2 dcl 1-9 set ref 94* 115* 128* 138* 153* 172* 188* 197* 227* 234* 246* 255* 280* 379* 390* 397* chan 4 based fixed bin(8,0) array level 3 in structure "mpc_card" dcl 2-5 in procedure "attach_mpc_" ref 162 166 206 217 264 270 433 433 chan parameter fixed bin(6,0) dcl 447 in procedure "find_prph" ref 443 449 channel 23 based fixed bin(6,0) level 2 dcl 1-9 set ref 119 159 162* 166 185* 217* 243* 270* 277* 421* 433 433 channel_required 21 based bit(1) level 3 packed unaligned dcl 1-9 ref 112 148 184 241 code 000105 automatic fixed bin(35,0) dcl 45 set ref 93* 94* 113* 115* 127* 128* 137* 138* 152* 153* 171* 172* 187* 188* 194 197* 215 226* 227* 233* 234* 245* 246* 252 255* 268 277* 279 280* 291 301* 304* 376* 377 378* 379* 387* 389 390* 397* 402* 403 406* 408 408* com_err_ 000010 constant entry external dcl 54 ref 94 115 128 138 153 172 188 197 227 234 246 255 280 379 390 397 config_$find_2 000012 constant entry external dcl 55 ref 135 convert_ipc_code_ 000024 constant entry external dcl 62 ref 378 dev_tried 000107 automatic char(32) array unaligned dcl 47 set ref 209 213* dev_type parameter char unaligned dcl 371 in procedure "attach" set ref 368 402* dev_type 000226 automatic char(32) unaligned dcl 325 in procedure "attach_unit_record" set ref 328* 341* 343* 345* 347* device_info based structure level 1 dcl 4-17 device_info_ptr 000204 automatic pointer dcl 4-15 set ref 356* 357 358 359 360 361 362 363 device_name 4 based char(8) level 2 in structure "device_info" dcl 4-17 in procedure "attach_mpc_" set ref 361* device_name 44 based char(32) level 2 in structure "attach_mpc_data" dcl 1-9 in procedure "attach_mpc_" set ref 105* 197* 209 213 255* 327 334 341 343 361 452* 457* 458 458 458* 458 device_name 4 based char(8) level 2 in structure "printer_info" dcl 5-17 in procedure "attach_mpc_" set ref 334* disk_status_table_$disk_status_table_ 000054 external static fixed bin(17,0) dcl 83 set ref 106 error_table_$bad_channel 000046 external static fixed bin(35,0) dcl 76 ref 113 152 171 error_table_$device_busy 000052 external static fixed bin(35,0) dcl 80 ref 233 error_table_$invalid_device 000044 external static fixed bin(35,0) dcl 74 ref 127 137 error_table_$no_connection 000050 external static fixed bin(35,0) dcl 78 ref 187 226 245 error_table_$unimplemented_version 000042 external static fixed bin(35,0) dcl 72 ref 93 execute 000104 automatic bit(5) initial unaligned dcl 44 set ref 44* 394 find_config_card_$mpc_for_channel 000014 constant entry external dcl 56 ref 119 find_config_card_$prph_for_channel 000016 constant entry external dcl 58 ref 449 flags 21 based structure level 2 packed unaligned dcl 1-9 hbound builtin function dcl 86 ref 165 205 432 hcs_$get_user_effmode 000040 constant entry external dcl 70 ref 387 i 000101 automatic fixed bin(17,0) dcl 42 in procedure "attach_mpc_" set ref 165* 165* 166 166* 205* 206 206 216 217* 263* 264 270* i 000334 automatic fixed bin(17,0) dcl 430 in procedure "channel_on_mpc" set ref 432* 432* 433 433 433 433* ioa_$rsnnl 000020 constant entry external dcl 60 ref 421 ioi_$set_channel_required 000036 constant entry external dcl 68 ref 277 ioi_channel 26 based fixed bin(71,0) level 2 dcl 1-9 set ref 99* 304 304* 306* 375 376* 402* ioi_index 24 based fixed bin(17,0) level 2 dcl 1-9 set ref 98* 277* 406* iom 3 based fixed bin(3,0) array level 3 in structure "mpc_card" dcl 2-5 in procedure "attach_mpc_" ref 160 165 166 206 216 264 269 432 433 iom 22 based fixed bin(3,0) level 2 in structure "attach_mpc_data" dcl 1-9 in procedure "attach_mpc_" set ref 119* 160* 166 185* 216* 243* 269* 277* 421* 433 iom parameter fixed bin(3,0) dcl 446 in procedure "find_prph" set ref 443 449* ipc_$create_ev_chn 000022 constant entry external dcl 61 ref 376 ipc_$delete_ev_chn 000034 constant entry external dcl 67 ref 304 j 000102 automatic fixed bin(17,0) dcl 42 set ref 208* 209* line_length 10 based fixed bin(17,0) level 2 dcl 5-17 set ref 337* max_time_limit 30 based fixed bin(71,0) level 2 dcl 1-9 set ref 102* 406* max_workspace_size 32 based fixed bin(19,0) level 2 dcl 1-9 set ref 101* 406* model 2 based fixed bin(17,0) level 2 in structure "mpc_card" dcl 2-5 in procedure "attach_mpc_" ref 143 model 6 based fixed bin(17,0) level 2 in structure "printer_info" dcl 5-17 in procedure "attach_mpc_" set ref 335* model 34 based fixed bin(17,0) level 2 in structure "attach_mpc_data" dcl 1-9 in procedure "attach_mpc_" set ref 143* model 6 based fixed bin(17,0) level 2 in structure "device_info" dcl 4-17 in procedure "attach_mpc_" set ref 362* mpc_card based structure level 1 dcl 2-5 mpc_cardp 000200 automatic pointer dcl 2-3 in procedure "attach_mpc_" set ref 119* 120 135* 136 142 143 160 162 165 165 166 166 205 206 206 216 217 263 264 264 269 270 432 432 433 433 433 433 mpc_cardp 36 based pointer level 2 in structure "attach_mpc_data" dcl 1-9 in procedure "attach_mpc_" set ref 103* 142* mpc_name 1 based char(32) level 2 dcl 1-9 set ref 111 120* 125 128* 135 135 138* 153* 172* 188* 197* 227* 234* 246* 255* 280* mpc_type 000100 automatic char(3) unaligned dcl 41 set ref 125* 126 126 126 144 178 n_tried 000106 automatic fixed bin(17,0) dcl 46 set ref 204* 208 212* 212 213 224 262* 266* 266 name 1 based char(4) level 2 in structure "prph_card" dcl 3-5 in procedure "attach_mpc_" ref 457 name 1 based char(4) level 2 in structure "mpc_card" dcl 2-5 in procedure "attach_mpc_" ref 120 nchan 5 based fixed bin(17,0) array level 3 dcl 2-5 ref 263 433 null builtin function dcl 86 ref 103 104 136 186 207 244 265 450 451 port 3 based structure array level 2 dcl 2-5 ref 165 205 432 print_train 7 based fixed bin(17,0) level 2 dcl 5-17 set ref 336* printer_info based structure level 1 dcl 5-17 printer_info_ptr 000206 automatic pointer dcl 5-15 set ref 329* 330 331 332 333 334 335 336 337 prph_card based structure level 1 dcl 3-5 prph_cardp 000202 automatic pointer dcl 3-3 in procedure "attach_mpc_" set ref 449* 450 456 457 prph_cardp 40 based pointer level 2 in structure "attach_mpc_data" dcl 1-9 in procedure "attach_mpc_" set ref 104* 186 207 244 265 451* 456* qualifiers 7 based fixed bin(35,0) array level 2 dcl 4-17 set ref 363* rcp_$check_attach 000030 constant entry external dcl 64 ref 406 rcp_$detach 000032 constant entry external dcl 66 ref 301 rcp_comment 000255 automatic char(100) unaligned dcl 373 set ref 406* rcp_id 25 based bit(36) level 2 dcl 1-9 set ref 100* 301 301* 303* 402* 406* rcp_info_ptr 000150 automatic pointer dcl 48 set ref 329* 356* 402* 406* rcp_priv_$attach 000026 constant entry external dcl 63 ref 402 report 21(02) based bit(1) level 3 packed unaligned dcl 1-9 ref 94 115 128 138 153 172 188 197 227 234 246 255 280 379 rs_mode 000103 automatic fixed bin(5,0) dcl 43 set ref 387* 394 rtrim builtin function dcl 86 ref 458 state 000254 automatic fixed bin(17,0) dcl 372 set ref 406* 408 408 status_tablep 42 based pointer level 2 dcl 1-9 set ref 106* substr builtin function dcl 86 ref 125 135 135 327 334 341 343 361 458 458 system_flag 3 based bit(1) level 2 in structure "device_info" dcl 4-17 in procedure "attach_mpc_" set ref 360* system_flag 3 based bit(1) level 2 in structure "printer_info" dcl 5-17 in procedure "attach_mpc_" set ref 333* temp 000314 automatic varying char(32) dcl 419 set ref 421* 423 type 33 based char(4) level 2 dcl 1-9 set ref 144* usage_time 1 based fixed bin(17,0) level 2 in structure "device_info" dcl 4-17 in procedure "attach_mpc_" set ref 358* usage_time 1 based fixed bin(17,0) level 2 in structure "printer_info" dcl 5-17 in procedure "attach_mpc_" set ref 331* version based fixed bin(17,0) level 2 dcl 1-9 ref 92 version_num based fixed bin(17,0) level 2 in structure "printer_info" dcl 5-17 in procedure "attach_mpc_" set ref 330* version_num based fixed bin(17,0) level 2 in structure "device_info" dcl 4-17 in procedure "attach_mpc_" set ref 357* wait_time 2 based fixed bin(17,0) level 2 in structure "device_info" dcl 4-17 in procedure "attach_mpc_" set ref 359* wait_time 2 based fixed bin(17,0) level 2 in structure "printer_info" dcl 5-17 in procedure "attach_mpc_" set ref 332* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. MPC_CARD_WORD internal static char(4) initial dcl 2-26 PRPH_CARD_WORD internal static char(4) initial dcl 3-19 mpc_card_array based structure level 1 dcl 2-19 NAMES DECLARED BY EXPLICIT CONTEXT. attach 002024 constant entry internal dcl 368 ref 316 347 attach_complete 001475 constant label dcl 277 ref 194 218 252 271 attach_mpc_ 000306 constant entry external dcl 31 attach_special 001675 constant entry internal dcl 312 ref 193 214 attach_unit_record 001705 constant entry internal dcl 322 ref 251 267 channel_ok 000746 constant label dcl 178 ref 150 163 166 channel_on_mpc 002435 constant entry internal dcl 427 ref 150 detach_mpc_ 001602 constant entry external dcl 296 ref 289 edit_channel 002365 constant entry internal dcl 416 ref 188 246 280 error_return 001563 constant label dcl 289 ref 96 117 130 140 156 175 191 200 230 237 249 258 283 381 fill_device_info 001771 constant entry internal dcl 353 ref 315 340 find_prph 002503 constant entry internal dcl 443 ref 185 206 243 264 next_port 001173 constant label dcl 221 ref 209 no_mpc_for_chan 000374 constant label dcl 113 report_failure 001175 constant label dcl 224 ref 275 unit_record_attach 001276 constant label dcl 241 ref 178 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3134 3212 2647 3144 Length 3536 2647 56 310 264 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME attach_mpc_ 440 external procedure is an external procedure. attach_special internal procedure shares stack frame of external procedure attach_mpc_. attach_unit_record internal procedure shares stack frame of external procedure attach_mpc_. fill_device_info internal procedure shares stack frame of external procedure attach_mpc_. attach internal procedure shares stack frame of external procedure attach_mpc_. edit_channel internal procedure shares stack frame of external procedure attach_mpc_. channel_on_mpc internal procedure shares stack frame of external procedure attach_mpc_. find_prph internal procedure shares stack frame of external procedure attach_mpc_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME attach_mpc_ 000100 mpc_type attach_mpc_ 000101 i attach_mpc_ 000102 j attach_mpc_ 000103 rs_mode attach_mpc_ 000104 execute attach_mpc_ 000105 code attach_mpc_ 000106 n_tried attach_mpc_ 000107 dev_tried attach_mpc_ 000150 rcp_info_ptr attach_mpc_ 000152 auto_printer_info attach_mpc_ 000163 auto_device_info attach_mpc_ 000176 attach_mpc_datap attach_mpc_ 000200 mpc_cardp attach_mpc_ 000202 prph_cardp attach_mpc_ 000204 device_info_ptr attach_mpc_ 000206 printer_info_ptr attach_mpc_ 000226 dev_type attach_unit_record 000254 state attach 000255 rcp_comment attach 000314 temp edit_channel 000334 i channel_on_mpc THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_in call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ config_$find_2 convert_ipc_code_ find_config_card_$mpc_for_channel find_config_card_$prph_for_channel hcs_$get_user_effmode ioa_$rsnnl ioi_$set_channel_required ipc_$create_ev_chn ipc_$delete_ev_chn rcp_$check_attach rcp_$detach rcp_priv_$attach THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. disk_status_table_$disk_status_table_ error_table_$bad_channel error_table_$device_busy error_table_$invalid_device error_table_$no_connection error_table_$unimplemented_version LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 44 000276 31 000302 91 000314 92 000320 93 000323 94 000326 96 000345 98 000346 99 000347 100 000351 101 000352 102 000353 103 000354 104 000356 105 000357 106 000362 111 000365 112 000371 113 000374 115 000376 117 000424 119 000425 120 000441 125 000446 126 000452 127 000460 128 000463 130 000513 135 000514 136 000533 137 000537 138 000542 140 000574 142 000575 143 000600 144 000602 148 000605 149 000610 150 000613 152 000620 153 000623 156 000654 159 000655 160 000657 162 000661 163 000663 165 000664 166 000676 170 000706 171 000710 172 000713 175 000745 178 000746 184 000751 185 000755 186 000765 187 000772 188 000775 191 001035 193 001036 194 001037 197 001041 200 001077 204 001100 205 001101 206 001107 207 001120 208 001125 209 001135 211 001144 212 001146 213 001147 214 001156 215 001157 216 001161 217 001167 218 001172 221 001173 224 001175 226 001177 227 001202 230 001234 233 001235 234 001240 237 001275 241 001276 243 001302 244 001312 245 001317 246 001322 249 001363 251 001364 252 001365 255 001367 258 001425 262 001426 263 001427 264 001437 265 001450 266 001455 267 001456 268 001457 269 001461 270 001465 271 001471 274 001472 275 001474 277 001475 279 001513 280 001515 283 001557 286 001560 287 001562 289 001563 291 001574 292 001577 296 001600 299 001610 301 001614 303 001652 304 001654 306 001667 307 001672 308 001674 312 001675 315 001676 316 001677 318 001704 322 001705 327 001706 328 001713 329 001716 330 001722 331 001724 332 001725 333 001726 334 001727 335 001734 336 001735 337 001736 338 001740 340 001741 341 001742 343 001754 345 001762 347 001765 349 001770 353 001771 356 001772 357 001776 358 002000 359 002001 360 002002 361 002003 362 002010 363 002011 364 002023 368 002024 375 002035 376 002040 377 002051 378 002053 379 002062 381 002112 387 002113 389 002161 390 002163 391 002210 394 002211 397 002220 398 002245 402 002246 403 002306 406 002311 408 002356 412 002364 416 002365 421 002367 423 002425 427 002435 432 002437 433 002452 436 002473 437 002475 443 002503 449 002505 450 002522 451 002526 452 002531 453 002535 456 002536 457 002541 458 002546 460 002603 ----------------------------------------------------------- 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