COMPILATION LISTING OF SEGMENT remote_teleprinter_ Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/28/88 1321.9 mst Fri Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 /* format: style4,delnl,insnl,^ifthendo */ 14 15 /* format: off */ 16 17 /* remote_teleprinter_: An I/O module for communicating with the operator console function of a remote device. */ 18 19 /* Created: March 1977 by David Vinograd */ 20 /* Modified: May 1978 by David Vinograd for user TTFs */ 21 /* Modified: November 1978 by J. C. Whitmore to make the attach options consistent among all remote_xxx_ dims */ 22 /* Modified: March 1979 by J. C. Whitmore to initialize so get_line function returns a NL char and cleanup returned modes */ 23 /* Modified: March 1980 by J. C. Whitmore to use the terminal_io_record interface to the terminal IO module */ 24 /* Modified: 13 December 1981 by G. Palter to not use illegal PL/I and provide sufficient extra space for prt_conv_ to 25* output control sequences */ 26 27 28 /****^ HISTORY COMMENTS: 29* 1) change(87-05-10,Gilcrease), approve(87-05-13,MCR7686), 30* audit(88-02-01,Farley), install(88-02-02,MR12.2-1019): 31* Corrected pl1 warning about terminal_io_record_data_chars_varying_max_len 32* being referenced, but never set. 33* END HISTORY COMMENTS */ 34 35 36 /* format: on */ 37 38 39 remote_teleprinter_: 40 procedure (); 41 42 43 /* Parameters */ 44 45 dcl a_iocbp ptr parameter; 46 dcl a_option (*) char (*) var parameter; /* Options for attach */ 47 dcl a_sw bit (1) parameter; /* com_err_ switch for attach */ 48 dcl a_code fixed bin (35) parameter; 49 dcl a_mode fixed bin parameter; /* The open mode */ 50 dcl a_buf_ptr ptr parameter; 51 dcl a_data_ptr ptr parameter; 52 dcl a_buf_chars fixed bin (21) parameter; 53 dcl a_data_chars fixed bin (21) parameter; 54 dcl a_pos_type fixed bin parameter; 55 dcl a_pos_value fixed bin (21) parameter; 56 dcl a_order char (*) parameter; 57 dcl a_infop ptr parameter; 58 dcl a_old_modes char (*) parameter; 59 dcl a_new_modes char (*) parameter; 60 61 62 /* Automatic */ 63 64 dcl (prt_modes, card_modes) char (160); 65 dcl last_char char (1); 66 dcl last_pos fixed bin; 67 68 dcl com_err_sw bit (1); /* Set if com_err_ sould be called on attach error */ 69 dcl charp ptr; 70 dcl device_opt char (32) var; 71 dcl ignore fixed bin (35); 72 dcl (code, ec, prt_code, card_code) fixed bin (35); 73 dcl iocbp ptr; 74 dcl arg char (32); 75 dcl argp ptr; 76 dcl mask bit (36) aligned; /* For setting ips mask */ 77 dcl i fixed bin (21); 78 dcl idx fixed bin; 79 dcl open_mode fixed bin; 80 dcl remaining_chars fixed bin (21); 81 dcl data_chars fixed bin (21); 82 dcl order char (32); 83 dcl prt_conv_outp ptr; /* pointer to output workspace for prt_conv_ */ 84 dcl record_len fixed bin; 85 dcl infop ptr; 86 dcl temp_iocbp ptr; 87 dcl runout_spacing_cnt fixed bin; 88 dcl terminal_switch_name char (32) var; 89 dcl my_options char (256) var; 90 dcl terminal_attach_options char (256) var; 91 dcl terminal_attach_desc char (256) var; 92 dcl nl_string char (32); /* temp string of nl chars */ 93 94 95 /* Based */ 96 97 dcl char_string char (1024) based; 98 dcl info_fixed fixed bin based; 99 dcl my_area area based (get_system_free_area_ ()); 100 101 102 /* Internal Static */ 103 104 dcl put_chars_since_last_runout bit (1) static init ("1"b); 105 dcl attach_count fixed bin int static init (0); 106 dcl static_comerr_sw bit (1) int static init ("0"b); 107 108 109 /* Constants */ 110 111 dcl remote_device_name char (19) int static options (constant) init ("remote_teleprinter_"); 112 dcl teleprinter char (32) int static init ("teleprinter") options (constant); 113 dcl space char (1) static init (" ") int options (constant); 114 dcl Card_Util_Char_Max fixed bin int static init (2000) options (constant); 115 dcl NL char (1) static init (" 116 ") int static options (constant); 117 118 119 /* External stuff */ 120 121 dcl ioa_ entry options (variable); 122 dcl com_err_ entry options (variable); 123 dcl card_util_$modes entry (char (*), bit (36) aligned, char (*), fixed bin (35)); 124 dcl card_util_$translate entry (bit (36) aligned, char (*) var); 125 dcl get_system_free_area_ entry () returns (pointer); 126 dcl hcs_$make_ptr entry (ptr, char (*), char (*), ptr, fixed bin (35)); 127 dcl prt_conv_ entry (ptr, fixed bin (21), ptr, fixed bin, ptr); 128 dcl remote_printer_modes_ entry (ptr, char (*), char (*), fixed bin (35)); 129 dcl remote_printer_control_ entry (ptr, char (*), ptr, fixed bin (35)); 130 dcl continue_to_signal_ entry (fixed bin (35)); 131 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 132 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 133 dcl iox_$propagate entry (ptr); 134 dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); 135 dcl iox_$position entry (ptr, fixed bin, fixed bin (21), fixed bin (35)); 136 dcl iox_$attach_ioname entry (char (*), ptr, char (*), fixed bin (35)); 137 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 138 dcl iox_$close entry (ptr, fixed bin (35)); 139 dcl iox_$open entry (ptr, fixed bin, bit (36), fixed bin (35)); 140 dcl iox_$get_chars entry (ptr, ptr, fixed bin, fixed bin, fixed bin (35)); 141 dcl iox_$read_record entry (ptr, ptr, fixed bin, fixed bin, fixed bin (35)); 142 dcl iox_$put_chars entry (ptr, ptr, fixed bin, fixed bin (35)); 143 dcl iox_$write_record entry (ptr, ptr, fixed bin, fixed bin (35)); 144 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 145 dcl iox_$err_no_operation entry; 146 147 dcl sys_info$max_seg_size fixed bin ext; 148 149 dcl error_table_$bad_conversion fixed bin (35) ext; 150 dcl error_table_$eof_record ext fixed bin (35); 151 dcl error_table_$bad_arg ext fixed bin (35); 152 dcl error_table_$bad_mode ext fixed bin (35); 153 dcl error_table_$not_detached ext fixed bin (35); 154 dcl error_table_$not_attached ext fixed bin (35); 155 dcl error_table_$not_open ext fixed bin (35); 156 dcl error_table_$not_closed ext fixed bin (35); 157 dcl error_table_$data_loss ext fixed bin (35); 158 dcl error_table_$wrong_no_of_args ext fixed bin (35); 159 dcl error_table_$noarg ext fixed bin (35); 160 dcl error_table_$unimplemented_version ext fixed bin (35); 161 162 163 /* Conditions and Builtins */ 164 165 dcl (conversion, any_other, cleanup) condition; 166 167 dcl (addr, bin, hbound, length, min, max, copy, null, substr, ltrim, rtrim, convert, unspec, index, char, currentsize, 168 size) builtin; 169 170 /* */ 171 172 remote_teleprinter_attach: 173 entry (a_iocbp, a_option, a_sw, a_code); 174 175 iocbp = a_iocbp; 176 com_err_sw = a_sw | static_comerr_sw; /* report errors if either is on */ 177 code, a_code = 0; 178 179 adp = null; 180 if iocbp -> iocb.attach_descrip_ptr ^= null 181 then do; 182 code = error_table_$not_detached; 183 call abort_attach (code, "Switch name: ^a", iocbp -> iocb.name); 184 end; 185 186 if hbound (a_option, 1) < 1 187 then do; /* Must be at least one */ 188 code = error_table_$wrong_no_of_args; 189 call abort_attach (code, "Bad attach description.", ""); 190 end; 191 192 on cleanup call clean_up; /* if we abort, be sure to clean up */ 193 194 allocate ad in (my_area) set (adp); /* create the attach data structure for this attachment */ 195 196 /* Initialize the Attach Data Structure variables */ 197 198 ad.bits = "0"b; 199 ad.fixed = 0; 200 ad.ptrs = null; 201 ad.chars = ""; 202 unspec (ad.remote_pci) = "0"b; 203 ad.device_type = TELEPRINTER_DEVICE; /* for the terminal_io_record structure */ 204 ad.sheets_per_page = 1; 205 ad.phys_line_length = 80; 206 ad.phys_page_length = 66; 207 ad.lpi = 6; 208 ad.line = 1; 209 ad.cv_proc = null; /* co-routine is undefined until switch is opened */ 210 211 call card_util_$modes ("lower_case,trim,add_nl.", ad.input_modes, "", code); 212 if code ^= 0 213 then call abort_attach (code, "Unable to set initial modes.", ""); 214 215 /* Process options */ 216 217 my_options = ""; 218 terminal_attach_options = ""; 219 terminal_attach_desc = ""; 220 device_opt = "teleprinter"; /* this is our default */ 221 222 do idx = 1 to hbound (a_option, 1); 223 if a_option (idx) = "-physical_line_length" | a_option (idx) = "-pll" 224 then do; 225 ad.phys_line_length = cv_dec_arg (idx); 226 terminal_attach_options = terminal_attach_options || " -pll " || a_option (idx); 227 end; 228 else if a_option (idx) = "-physical_page_length" | a_option (idx) = "-ppl" 229 then do; 230 ad.phys_page_length = cv_dec_arg (idx); 231 my_options = my_options || " -ppl " || a_option (idx); 232 end; 233 else if a_option (idx) = "-device" 234 then device_opt = get_arg (idx); /* we specify this */ 235 else if a_option (idx) = "-horizontal_tab" | a_option (idx) = "-htab" 236 then do; 237 ad.ht = "1"b; 238 terminal_attach_options = terminal_attach_options || " -htab"; 239 end; 240 else if a_option (idx) = "-runout_spacing" | a_option (idx) = "-runsp" 241 then do; 242 ad.runout_spacing = max (0, min (cv_dec_arg (idx), 32)); 243 /* set the value within the range */ 244 my_options = my_options || " -runsp " || a_option (idx); 245 end; 246 else if a_option (idx) = "-terminal" 247 then do; 248 ad.terminal = get_arg (idx); 249 my_options = my_options || " -terminal " || ad.terminal; 250 end; 251 else terminal_attach_options = terminal_attach_options || space || a_option (idx); 252 end; 253 254 /* Check out the options we were given */ 255 256 if ad.terminal = "" 257 then do; 258 code = error_table_$bad_arg; 259 call abort_attach (code, "No terminal IO module specified.", ""); 260 end; 261 262 if ad.phys_line_length < 1 | ad.phys_line_length > 256 263 then do; 264 code = error_table_$bad_arg; 265 call abort_attach (code, "Invalid line length specified.", ""); 266 end; 267 268 if ad.phys_page_length < 10 | ad.phys_page_length > 128 269 then do; 270 code = error_table_$bad_arg; 271 call abort_attach (code, "Invalid page length specified.", ""); 272 end; 273 274 if device_opt ^= "teleprinter" 275 then do; /* was it changed? */ 276 code = error_table_$bad_arg; 277 call abort_attach (code, "Invalid -device option: ^a", (device_opt)); 278 end; 279 280 /* Attach through terminal dim */ 281 282 attach_count = attach_count + 1; /* new attach name tag number each time */ 283 if attach_count > 999 284 then attach_count = 1; 285 terminal_switch_name = remote_device_name || ltrim (char (attach_count)); 286 /* make the switch name */ 287 288 terminal_attach_options = ltrim (terminal_attach_options) || " -device " || device_opt; 289 terminal_attach_desc = ad.terminal || space || terminal_attach_options; 290 ad.attach_desc = remote_device_name || my_options || space || terminal_attach_options; 291 292 call iox_$attach_ioname ((terminal_switch_name), temp_iocbp, (terminal_attach_desc), code); 293 if code ^= 0 294 then call abort_attach (code, "Unable to attach to terminal ", ""); 295 296 ad.terminal_iocbp = temp_iocbp; 297 298 /* Now mask and complete the iocb */ 299 300 mask = "0"b; 301 302 on any_other call handler; 303 304 call hcs_$set_ips_mask ("0"b, mask); 305 306 iocbp -> iocb.attach_descrip_ptr = addr (ad.attach_desc); 307 iocbp -> iocb.attach_data_ptr = adp; 308 iocbp -> iocb.open = remote_teleprinter_open; 309 iocbp -> iocb.detach_iocb = remote_teleprinter_detach; 310 311 call iox_$propagate (iocbp); 312 313 call hcs_$reset_ips_mask (mask, mask); 314 315 revert any_other; 316 317 call remote_printer_control_ (iocbp, "reset", null, code); 318 if code ^= 0 319 then call abort_attach (code, "Unable to reset printer data", ""); 320 321 call remote_printer_modes_ (iocbp, "noskip.", "", code); 322 if code ^= 0 323 then call abort_attach (code, "Unable to set default modes", ""); 324 325 attach_return: 326 return; 327 328 /* */ 329 330 remote_teleprinter_detach: 331 entry (a_iocbp, a_code); 332 333 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 334 code, a_code = 0; 335 adp = iocbp -> iocb.attach_data_ptr; 336 337 if adp = null 338 then do; 339 a_code = error_table_$not_attached; 340 return; 341 end; 342 343 if iocbp -> iocb.open_descrip_ptr ^= null 344 then do; 345 code = error_table_$not_closed; 346 return; 347 end; 348 349 call clean_up; /* detach terminal, free attach data, clear the iocb */ 350 351 mask = "0"b; 352 353 on any_other call handler; 354 355 call hcs_$set_ips_mask ("0"b, mask); 356 357 call iox_$propagate (iocbp); 358 359 call hcs_$reset_ips_mask (mask, mask); 360 361 revert any_other; 362 363 return; 364 365 /* */ 366 367 remote_teleprinter_open: 368 entry (a_iocbp, a_mode, a_sw, a_code); 369 370 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 371 code, a_code = 0; 372 adp = iocbp -> iocb.attach_data_ptr; 373 374 if adp = null 375 then do; 376 a_code = error_table_$not_attached; 377 return; 378 end; 379 380 if iocbp -> iocb.open_descrip_ptr ^= null 381 then do; 382 code = error_table_$not_closed; 383 return; 384 end; 385 386 open_mode = a_mode; 387 if open_mode ^= Stream_input_output 388 then do; 389 a_code = error_table_$bad_mode; 390 return; 391 end; 392 393 call iox_$open (ad.terminal_iocbp, Sequential_input_output, "0"b, a_code); 394 if a_code = 0 395 then do; 396 ad.record_io = "1"b; /* we have record interface approval */ 397 call hcs_$make_ptr (null, "remote_conv_", "teleprinter", ad.cv_proc, a_code); 398 if a_code ^= 0 399 then return; 400 end; 401 else do; 402 ad.record_io = "0"b; /* try for stream interface */ 403 call iox_$open (ad.terminal_iocbp, Stream_input_output, "0"b, a_code); 404 if a_code ^= 0 405 then return; 406 call hcs_$make_ptr (null, ad.terminal || "conv_", "teleprinter", ad.cv_proc, a_code); 407 if a_code ^= 0 408 then return; 409 end; 410 411 ad.open_description = rtrim (iox_modes (open_mode)); 412 mask = "0"b; 413 414 on any_other call handler; 415 416 call hcs_$set_ips_mask ("0"b, mask); 417 418 iocbp -> iocb.get_chars = remote_teleprinter_get_chars; 419 iocbp -> iocb.get_line = remote_teleprinter_get_chars; 420 iocbp -> iocb.put_chars = remote_teleprinter_put_chars; 421 iocbp -> iocb.control = remote_teleprinter_control; 422 iocbp -> iocb.modes = remote_teleprinter_modes; 423 iocbp -> iocb.position = remote_teleprinter_position; 424 iocbp -> iocb.close = remote_teleprinter_close; 425 iocbp -> iocb.open_descrip_ptr = addr (ad.open_description); 426 427 call iox_$propagate (iocbp); 428 429 call hcs_$reset_ips_mask (mask, mask); 430 431 revert any_other; 432 433 return; 434 435 /* */ 436 437 remote_teleprinter_close: 438 entry (a_iocbp, a_code); 439 440 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 441 code, a_code = 0; 442 adp = iocbp -> iocb.attach_data_ptr; 443 444 if adp = null 445 then do; 446 a_code = error_table_$not_attached; 447 return; 448 end; 449 450 if iocbp -> iocb.open_descrip_ptr = null 451 then do; 452 code = error_table_$not_open; 453 return; 454 end; 455 456 call iox_$close (ad.terminal_iocbp, a_code); 457 if a_code = error_table_$not_open | a_code = error_table_$not_attached 458 then a_code = 0; /* make it easy to re-synch the attachments */ 459 460 mask = "0"b; 461 462 on any_other call handler; 463 464 call hcs_$set_ips_mask ("0"b, mask); 465 466 iocbp -> iocb.open_descrip_ptr = null; 467 iocbp -> iocb.open = remote_teleprinter_open; 468 iocbp -> iocb.detach_iocb = remote_teleprinter_detach; 469 iocbp -> iocb.control = iox_$err_no_operation; 470 iocbp -> iocb.position = iox_$err_no_operation; 471 iocbp -> iocb.modes = iox_$err_no_operation; 472 473 call iox_$propagate (iocbp); 474 475 call hcs_$reset_ips_mask (mask, mask); 476 477 revert any_other; 478 479 return; 480 481 /* */ 482 483 remote_teleprinter_put_chars: 484 entry (a_iocbp, a_data_ptr, a_data_chars, a_code); 485 486 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 487 code, a_code = 0; 488 adp = iocbp -> iocb.attach_data_ptr; 489 490 if adp = null 491 then do; 492 a_code = error_table_$not_attached; 493 return; 494 end; 495 496 if iocbp -> iocb.open_descrip_ptr = null 497 then do; 498 code = error_table_$not_open; 499 return; 500 end; 501 502 if a_data_chars < 0 | a_data_chars > sys_info$max_seg_size * 4 503 then do; 504 a_code = error_table_$bad_arg; 505 return; 506 end; 507 508 terminal_io_record_ptr = null (); /* for the cleanup handler */ 509 510 call iox_$control (ad.terminal_iocbp, "select_device", addr (teleprinter), code); 511 /* HACK FOR THE ibm2780_ TERMINAL */ 512 if code ^= 0 513 then goto put_chars_ret; 514 515 put_chars_since_last_runout = "1"b; 516 pcip = addr (ad.remote_pci); /* get ptr to pci structure */ 517 remaining_chars = a_data_chars; /* This is decremented as data is sent */ 518 charp = a_data_ptr; 519 520 terminal_io_record_element_size = 9; /* always character data */ 521 terminal_io_record_n_elements = 3 * ad.phys_line_length; 522 /* enough room for 1 printing character and 2 non-printing 523* characters per column (eg: DC1-u X) */ 524 525 on cleanup 526 begin; 527 if terminal_io_record_ptr ^= null () 528 then free terminal_io_record_ptr -> terminal_io_record in (my_area); 529 end; 530 531 call alloc_tio_rec; /* allocate and initialize the terminal_io_record */ 532 533 if ad.record_io 534 then prt_conv_outp = terminal_io_record_ptr; /* full record for record interface */ 535 else prt_conv_outp = addr (terminal_io_record.data); 536 /* use the string for stream interface */ 537 538 do while (remaining_chars > 0 | pci.slew_residue > 0); 539 /* runout chars and trailing NLs */ 540 pci.line = 1; /* fool prt_conv_ and say this is always line one */ 541 /* we are assuming noskip mode and want to suppress */ 542 /* the FF used to align each physical page */ 543 544 call prt_conv_ (charp, remaining_chars, prt_conv_outp, record_len, pcip); 545 546 if ad.record_io 547 then do; 548 call iox_$write_record (ad.terminal_iocbp, terminal_io_record_ptr, 549 4 * currentsize (terminal_io_record), code); 550 end; 551 else do; /* stream output */ 552 call iox_$put_chars (ad.terminal_iocbp, prt_conv_outp, record_len, code); 553 end; 554 555 if code ^= 0 556 then goto put_chars_ret; 557 end; 558 559 call iox_$control (ad.terminal_iocbp, "runout", null, code); 560 /* make the terminal IO Module ship the message */ 561 562 put_chars_ret: 563 if terminal_io_record_ptr ^= null () 564 then free terminal_io_record_ptr -> terminal_io_record in (my_area); 565 566 a_code = code; 567 568 return; 569 570 /* */ 571 572 /* Get_chars and Get_line entry points */ 573 574 remote_teleprinter_get_chars: 575 entry (a_iocbp, a_buf_ptr, a_buf_chars, a_data_chars, a_code); 576 577 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 578 adp = iocbp -> iocb.attach_data_ptr; 579 580 if adp = null 581 then do; 582 a_code = error_table_$not_attached; 583 return; 584 end; 585 586 if iocbp -> iocb.open_descrip_ptr = null 587 then do; 588 code = error_table_$not_open; 589 return; 590 end; 591 592 a_data_chars = 0; /* clear the return values */ 593 code, a_code = 0; 594 595 terminal_io_record_ptr = null; /* for the cleanup handler */ 596 terminal_io_record_element_size = 9; /* always character data */ 597 terminal_io_record_n_elements = a_buf_chars; /* allow for max buffer size */ 598 599 on cleanup 600 begin; 601 if terminal_io_record_ptr ^= null 602 then free terminal_io_record_ptr -> terminal_io_record in (my_area); 603 end; 604 605 call alloc_tio_rec; /* allocate and initialize terminal_io_record */ 606 607 if ad.record_io 608 then do; 609 call iox_$read_record (ad.terminal_iocbp, terminal_io_record_ptr, 4 * size (terminal_io_record), 610 record_len, code); 611 if code = error_table_$eof_record 612 then code = 0; 613 if code ^= 0 614 then go to get_chars_ret; 615 if terminal_io_record.version ^= terminal_io_record_version_1 616 then do; 617 code = error_table_$unimplemented_version; 618 go to get_chars_ret; 619 end; 620 621 /* assume that the data string doesn't have any slew specified (ignore any that was sent) */ 622 623 end; 624 else do; 625 call iox_$get_chars (ad.terminal_iocbp, addr (terminal_io_record.data), (a_buf_chars), record_len, code); 626 if code = error_table_$eof_record 627 then code = 0; 628 if code ^= 0 629 then go to get_chars_ret; 630 terminal_io_record.n_elements = record_len; /* make a legal varying string */ 631 end; 632 633 /* at this point, we must have a record of the form: */ 634 /* where the slew chars are missing - hopefully - for the teleprinter */ 635 636 /* use card_util_ to do escape processing and adding NL if desired */ 637 638 terminal_io_record_data_chars_varying_max_len = Card_Util_Char_Max; 639 call card_util_$translate (ad.input_modes, terminal_io_record_data_chars_varying); 640 /* can only shorten the string */ 641 642 643 data_chars = terminal_io_record.n_elements; /* get the updated count */ 644 if data_chars > a_buf_chars 645 then code = error_table_$data_loss; /* tell caller we truncated the record */ 646 647 a_data_chars = min (a_buf_chars, data_chars); 648 substr (a_buf_ptr -> char_string, 1, a_data_chars) = substr (terminal_io_record_data_chars, 1, a_data_chars); 649 650 get_chars_ret: 651 free terminal_io_record_ptr -> terminal_io_record in (my_area); 652 revert cleanup; 653 654 a_code = code; 655 656 return; 657 658 /* */ 659 660 remote_teleprinter_control: 661 entry (a_iocbp, a_order, a_infop, a_code); 662 663 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 664 adp = iocbp -> iocb.attach_data_ptr; 665 666 if adp = null 667 then do; 668 a_code = error_table_$not_attached; 669 return; 670 end; 671 672 if iocbp -> iocb.open_descrip_ptr = null 673 then do; 674 code = error_table_$not_open; 675 return; 676 end; 677 678 infop = a_infop; 679 order = a_order; 680 code, ec, a_code = 0; 681 682 if order = "runout_spacing" 683 then do; 684 if infop = null 685 then do; 686 code = error_table_$bad_arg; 687 go to control_ret; 688 end; 689 ad.runout_spacing = max (0, min (infop -> info_fixed, 32)); 690 end; 691 else if order = "end_write_mode" 692 then go to do_control; /* CHECK THIS OUT */ 693 else if order = "runout" 694 then do; 695 if ^put_chars_since_last_runout 696 then return; /* ignore multiple runouts per switch */ 697 put_chars_since_last_runout = "0"b; 698 if ad.runout_spacing = 0 699 then go to do_control; /* for another common case */ 700 nl_string = copy (NL, ad.runout_spacing); /* get the right number of new lines */ 701 702 call iox_$put_chars (iocbp, addr (nl_string), ad.runout_spacing, ignore); 703 /* let the normal entry do the work */ 704 goto do_control; 705 end; 706 else if order = "io_call" 707 then call remote_teleprinter_io_call; 708 else do; 709 call remote_printer_control_ (iocbp, order, infop, ec); 710 if ec ^= 0 711 then do; 712 do_control: 713 call iox_$control (ad.terminal_iocbp, order, infop, code); 714 if code ^= 0 & ec ^= 0 715 then code = ec; /* use first code if this fails */ 716 end; 717 if order = "reset" 718 then call iox_$control (ad.terminal_iocbp, order, null, 0); 719 end; 720 721 control_ret: 722 a_code = code; 723 724 return; 725 726 /* */ 727 728 remote_teleprinter_modes: 729 entry (a_iocbp, a_new_modes, a_old_modes, a_code); 730 731 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 732 adp = iocbp -> iocb.attach_data_ptr; 733 code, a_code = 0; 734 735 if adp = null 736 then do; 737 a_code = error_table_$not_attached; 738 return; 739 end; 740 741 if iocbp -> iocb.open_descrip_ptr = null 742 then do; 743 code = error_table_$not_open; 744 return; 745 end; 746 747 prt_modes, card_modes = ""; /* get ready to pickup old modes */ 748 749 call remote_printer_modes_ (iocbp, a_new_modes, prt_modes, prt_code); 750 751 call card_util_$modes (a_new_modes, ad.input_modes, card_modes, card_code); 752 753 if prt_code = 0 | card_code = 0 754 then a_code = 0; /* say OK if one was good */ 755 else a_code = prt_code; 756 757 if a_new_modes = "default" 758 then do; 759 call iox_$modes (ad.terminal_iocbp, a_new_modes, "", 0); 760 end; 761 else if index (a_new_modes, "non_edited") ^= 0 762 then do; 763 i = index (a_new_modes, "non_edited"); 764 if i = 1 765 then call iox_$modes (ad.terminal_iocbp, "non_edited", "", 0); 766 else if substr (a_new_modes, i - 1, 1) = "^" 767 then call iox_$modes (ad.terminal_iocbp, "default", "", 0); 768 else call iox_$modes (ad.terminal_iocbp, "non_edited", "", 0); 769 end; 770 771 last_pos = length (rtrim (prt_modes)); /* check last char so we give a good mode string */ 772 last_char = substr (prt_modes, last_pos, 1); 773 if last_char = "," | last_char = "." 774 then last_pos = last_pos - 1; /* we'll put it back */ 775 776 a_old_modes = rtrim (substr (prt_modes, 1, last_pos) || "," || card_modes); 777 /* put it all together */ 778 779 return; 780 781 /* */ 782 783 remote_teleprinter_position: 784 entry (a_iocbp, a_pos_type, a_pos_value, a_code); 785 786 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 787 adp = iocbp -> iocb.attach_data_ptr; 788 code, a_code = 0; 789 790 if adp = null 791 then do; 792 a_code = error_table_$not_attached; 793 return; 794 end; 795 796 if iocbp -> iocb.open_descrip_ptr = null 797 then do; 798 code = error_table_$not_open; 799 return; 800 end; 801 802 call iox_$position (ad.terminal_iocbp, a_pos_type, a_pos_value, a_code); 803 804 return; 805 806 807 808 809 flip_com_err_sw: 810 entry (); 811 812 static_comerr_sw = ^static_comerr_sw; /* flip the bit */ 813 814 call ioa_ ("The teleprinter com err sw is now: ^[on^;off^]", static_comerr_sw); 815 816 return; 817 818 /* */ 819 820 get_arg: 821 procedure (idx) returns (character (*)); 822 823 dcl idx fixed bin; 824 825 idx = idx + 1; /* advance the index of the major loop */ 826 if idx > hbound (a_option, 1) 827 then do; 828 code = error_table_$noarg; 829 call abort_attach (code, "No argument after ^a.", (a_option (idx - 1))); 830 end; 831 832 return (a_option (idx)); 833 834 end get_arg; 835 836 837 838 cv_dec_arg: 839 procedure (idx) returns (fixed binary); 840 841 dcl idx fixed bin; 842 843 idx = idx + 1; /* advance the index of the major loop */ 844 if idx > hbound (a_option, 1) 845 then do; 846 code = error_table_$noarg; 847 call abort_attach (code, "No argument after ^a.", (a_option (idx - 1))); 848 end; 849 850 on conversion go to bad_dec_arg; 851 852 return (bin (a_option (idx))); 853 bad_dec_arg: 854 code = error_table_$bad_conversion; 855 call abort_attach (code, "Invalid decimal number. ^a", (a_option (idx))); 856 857 end cv_dec_arg; 858 859 860 861 abort_attach: 862 procedure (code, str1, str2); 863 864 dcl code fixed bin (35); 865 dcl (str1, str2) char (*) aligned; 866 867 /* This proc handles attach errors */ 868 869 if com_err_sw 870 then call com_err_ (code, remote_device_name, str1, str2); 871 872 a_code = code; /* we were called because code ^= 0 */ 873 874 call clean_up; 875 876 go to attach_return; /* do a direct non-local return */ 877 878 end abort_attach; 879 880 /* */ 881 882 alloc_tio_rec: 883 procedure (); 884 885 allocate terminal_io_record in (my_area) set (terminal_io_record_ptr); 886 887 unspec (terminal_io_record) = "0"b; /* clear everything */ 888 889 terminal_io_record.version = terminal_io_record_version_1; 890 /* our view of the record structure */ 891 terminal_io_record.device_type = ad.device_type; 892 terminal_io_record.element_size = terminal_io_record_element_size; 893 /* set by our caller */ 894 895 return; 896 897 end alloc_tio_rec; 898 899 900 901 clean_up: 902 procedure (); 903 904 /* this is for any form of abort during attachment */ 905 906 if adp ^= null 907 then do; 908 if ad.terminal_iocbp ^= null 909 then call iox_$detach_iocb (ad.terminal_iocbp, ignore); 910 free adp -> ad in (my_area); 911 adp = null; 912 end; 913 914 iocbp -> iocb.attach_descrip_ptr = null; /* be sure iox_ knows */ 915 iocbp -> iocb.attach_data_ptr = null; 916 iocbp -> iocb.open = iox_$err_no_operation; 917 918 919 return; 920 921 end clean_up; 922 923 924 handler: 925 procedure (); 926 927 /* This proc handles faults that occur while masked */ 928 929 if mask 930 then /* were we saving any mask bits? */ 931 call hcs_$reset_ips_mask (mask, mask); 932 933 mask = ""b; 934 935 call continue_to_signal_ (ignore); 936 937 return; 938 939 end handler; 940 941 /* */ 942 943 /* Handles the io_call orders by mapping them into control order calls to this dim */ 944 945 remote_teleprinter_io_call: 946 procedure (); 947 948 if infop = null 949 then do; 950 code = error_table_$bad_arg; 951 return; 952 end; 953 954 io_call_infop = infop; 955 order = io_call_info.order_name; 956 if io_call_info.nargs > 0 957 then do; 958 arg = io_call_info.args (1); 959 argp = addr (arg); 960 end; 961 else argp = null; 962 if order = "runout_spacing" 963 then do; 964 on conversion goto io_call_err; 965 runout_spacing_cnt = convert (runout_spacing_cnt, io_call_info.args (1)); 966 call iox_$control (iocbp, order, addr (runout_spacing_cnt), code); 967 end; 968 else call iox_$control (iocbp, order, argp, code); 969 return; 970 io_call_err: 971 code = error_table_$bad_conversion; 972 return; 973 974 end remote_teleprinter_io_call; 975 976 /* */ 977 1 1 /* BEGIN INCLUDE FILE ... remote_attach_data.incl.pl1 ... 3/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(88-06-07,Brunelle), approve(88-06-07,MCR7911), 1 7* audit(88-09-29,Wallman), install(88-10-28,MR12.2-1199): 1 8* Model field and static overstrike_data_ptr added for laser printer 1 9* support. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* format: style4 */ 1 14 1 15 dcl adp ptr; /* local copy of pointer to attach data */ 1 16 1 17 dcl 1 ad aligned based (adp), 1 18 2 fixed, 1 19 3 runout_spacing fixed bin, 1 20 3 stop_every fixed bin, /* stop every n pages of printing */ 1 21 3 stop_counter fixed bin, 1 22 3 char_mode fixed bin, 1 23 3 record_len fixed bin, /* length of output record in characters */ 1 24 3 line_length fixed bin, /* length of printer line */ 1 25 3 chars_printed fixed bin (35), /* input chars processed since "reset" order */ 1 26 3 device_type fixed bin, /* terminal_io_record device_type code for this attachment 1 27* (See terminal_io_record.incl.pl1) */ 1 28 3 fb_pad fixed bin, 1 29 2 bits, 1 30 3 binary bit (1) unal, 1 31 3 record_io bit (1) unal, /* TRUE - if the iox_ record interface to terminal is used */ 1 32 3 other_bits_padded bit (34) unal, 1 33 3 output_modes, 1 34 4 single_page bit (1) unal, 1 35 4 noprint bit (1) unal, /* if on don't print */ 1 36 4 pad bit (34) unal, 1 37 3 transparent bit (1), /* Set if in transparent mode */ 1 38 3 input_modes bit (36), 1 39 2 ptrs, 1 40 3 terminal_iocbp ptr, /* iocb ptr to terminal dim */ 1 41 3 static_overstrike_data_ptr ptr, /* ptr to overstrike_data */ 1 42 2 chars, 1 43 3 terminal char (32) var, 1 44 3 attach_desc char (256) var, 1 45 3 open_description char (24) var, 1 46 3 model char (32) var, 1 47 2 info like prt_info aligned, 1 48 2 remote_pci like pci aligned; 1 49 1 50 1 51 /* END INCLUDE FILE ... remote_attach_data.incl.pl1 */ 978 979 2 1 2 2 /* BEGIN INCLUDE FILE ... prt_conv_info.incl.pl1 */ 2 3 /* Modified: 12 September 1980 by G. Palter */ 2 4 2 5 2 6 /****^ HISTORY COMMENTS: 2 7* 1) change(87-05-10,Gilcrease), approve(87-07-31,MCR7686), 2 8* audit(88-02-01,Farley), install(88-02-02,MR12.2-1019): 2 9* Add modes.line_nbrs, flags.(eol eof) bits for eor -nb. 2 10* END HISTORY COMMENTS */ 2 11 2 12 2 13 dcl pcip ptr; /* pointer to conversion info structure */ 2 14 2 15 dcl 1 pci based (pcip) aligned, /* printer conversion info structure */ 2 16 2 cv_proc ptr, /* pointer to character conversion procedure */ 2 17 2 lmarg fixed bin, /* left margin indentation */ 2 18 2 rmarg fixed bin, /* right margin limit */ 2 19 2 page_length fixed bin, /* number of lines on page */ 2 20 2 phys_line_length fixed bin, /* physical width of paper */ 2 21 2 phys_page_length fixed bin, /* physical length of paper */ 2 22 2 lpi fixed bin, /* lines per inch */ 2 23 2 sheets_per_page fixed bin, /* sheets of paper per logical page */ 2 24 2 line_count fixed bin, /* count of converted lines */ 2 25 2 page_count fixed bin, /* count of converted pages */ 2 26 2 func fixed bin, /* special conversion function */ 2 27 /* 0 => normal conversion */ 2 28 /* 1 => change NL to FF */ 2 29 /* 2 => change NL to top inside page */ 2 30 /* 3 => change NL to end of page */ 2 31 /* 4 => change NL to top of outside page */ 2 32 (2 modes, /* conversion modes */ 2 33 3 overflow_off bit (1), /* "1"b to suppress end of page overflow */ 2 34 3 single_space bit (1), /* "1"b to change all forms advance chars to NL */ 2 35 3 non_edited bit (1), /* "1"b to print ASCII control chars */ 2 36 3 truncate bit (1), /* "1"b to truncate lines that are too long */ 2 37 3 esc bit (1), /* "1"b to process ESC character */ 2 38 3 ctl_char bit (1), /* "1"b to output control characters */ 2 39 3 line_nbrs bit (1), /* "1"b to output line numbers */ 2 40 3 pci_pad bit (5), 2 41 2 flags, /* flags internal to prt_conv_ */ 2 42 3 ignore_next_ff bit (1), /* ON => prt_conv_ just output a FF; ignore next character if 2 43* it's a FF */ 2 44 3 eol bit (1), /* "1"b = end-of-line encountered */ 2 45 3 eof bit (1), /* "1"b = end-of-segment encountered */ 2 46 3 flags_pad bit (3), 2 47 2 coroutine_modes, 2 48 3 upper_case bit(1), /* "1"b to convert to upper case */ 2 49 3 ht bit(1), /* "1"b to skip tab conversion */ 2 50 3 coroutine_pad bit(13), 2 51 3 slew_table_idx bit(3) ) unal, /* slew table index */ 2 52 2 top_label_line char (136), /* contains an optional top of page label */ 2 53 2 bot_label_line char (136), /* contains an optional bottom of page label */ 2 54 2 top_label_length fixed bin, /* length of top label line */ 2 55 2 bot_label_length fixed bin, /* length of bottom label line */ 2 56 2 form_stops (256) unal, /* logical form stops */ 2 57 3 lbits bit (9), /* leftmost bits */ 2 58 3 rbits bit (9), /* rightmost bits */ 2 59 2 60 /* The following items are for internal use by the print conversion procedure. 2 61* They should be zeroed once and then never referenced again. */ 2 62 2 63 2 level fixed bin, /* overstrike level */ 2 64 2 pos fixed bin, /* print position at end of incomplete line */ 2 65 2 line fixed bin, /* current line number */ 2 66 2 slew_residue fixed bin, /* number of lines remaining to be slewed */ 2 67 2 label_nelem fixed bin, /* characters remaining in label */ 2 68 2 label_wksp ptr, /* pointer to label being processed */ 2 69 2 sav_pos fixed bin, /* position saved during label processing */ 2 70 2 esc_state fixed bin, /* state of ESC processing */ 2 71 2 esc_num fixed bin, /* number following ESC sequence */ 2 72 2 temp bit (36); /* conversion proc temporary */ 2 73 2 74 /* End of include file ...... prt_conv_info.incl.pl1 */ 2 75 980 981 3 1 3 2 /* Begin include file ...... prt_info.incl.pl1 */ 3 3 /* last modified 6/12/75 by Noel I. Morris */ 3 4 3 5 dcl pip ptr; /* pointer to printer info structure */ 3 6 3 7 dcl 1 prt_info based (pip) aligned, /* printer info structure */ 3 8 2 devname char (4), /* name of device */ 3 9 2 devx fixed bin, /* device index */ 3 10 2 model fixed bin, /* printer model number */ 3 11 2 type fixed bin, /* printer type number */ 3 12 2 train fixed bin, /* print train ID */ 3 13 2 line_length fixed bin, /* max length of printed line */ 3 14 2 print_idcw bit (36), /* IDCW to print 1 line */ 3 15 2 term_idcw bit (36); /* IDCW to stop printer channel */ 3 16 3 17 /* End of include file ...... prt_info.incl.pl1 */ 3 18 982 983 4 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 4 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 4 3* version number to IOX2. */ 4 4 /* format: style2 */ 4 5 4 6 dcl 1 iocb aligned based, /* I/O control block. */ 4 7 2 version character (4) aligned, /* IOX2 */ 4 8 2 name char (32), /* I/O name of this block. */ 4 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 4 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 4 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 4 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 4 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 4 14 2 reserved bit (72), /* Reserved for future use. */ 4 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 4 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 4 17 /* open(p,mode,not_used,s) */ 4 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 4 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 4 20 /* get_line(p,bufptr,buflen,actlen,s) */ 4 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 4 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 4 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 4 24 /* put_chars(p,bufptr,buflen,s) */ 4 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 4 26 /* modes(p,newmode,oldmode,s) */ 4 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 4 28 /* position(p,u1,u2,s) */ 4 29 2 control entry (ptr, char (*), ptr, fixed (35)), 4 30 /* control(p,order,infptr,s) */ 4 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 4 32 /* read_record(p,bufptr,buflen,actlen,s) */ 4 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 4 34 /* write_record(p,bufptr,buflen,s) */ 4 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 4 36 /* rewrite_record(p,bufptr,buflen,s) */ 4 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 4 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 4 39 /* seek_key(p,key,len,s) */ 4 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 4 41 /* read_key(p,key,len,s) */ 4 42 2 read_length entry (ptr, fixed (21), fixed (35)), 4 43 /* read_length(p,len,s) */ 4 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 4 45 /* open_file(p,mode,desc,not_used,s) */ 4 46 2 close_file entry (ptr, char (*), fixed bin (35)), 4 47 /* close_file(p,desc,s) */ 4 48 2 detach entry (ptr, char (*), fixed bin (35)); 4 49 /* detach(p,desc,s) */ 4 50 4 51 declare iox_$iocb_version_sentinel 4 52 character (4) aligned external static; 4 53 4 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 984 985 5 1 /* Begin include file ..... iox_modes.incl.pl1 */ 5 2 5 3 /* Written by C. D. Tavares, 03/17/75 */ 5 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 5 5 5 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 5 7 ("stream_input", "stream_output", "stream_input_output", 5 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 5 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 5 10 "direct_input", "direct_output", "direct_update"); 5 11 5 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 5 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 5 14 5 15 dcl (Stream_input initial (1), 5 16 Stream_output initial (2), 5 17 Stream_input_output initial (3), 5 18 Sequential_input initial (4), 5 19 Sequential_output initial (5), 5 20 Sequential_input_output initial (6), 5 21 Sequential_update initial (7), 5 22 Keyed_sequential_input initial (8), 5 23 Keyed_sequential_output initial (9), 5 24 Keyed_sequential_update initial (10), 5 25 Direct_input initial (11), 5 26 Direct_output initial (12), 5 27 Direct_update initial (13)) fixed bin int static options (constant); 5 28 5 29 /* End include file ..... iox_modes.incl.pl1 */ 986 987 6 1 /* Begin include file ..... io_call_info.incl.pl1 */ 6 2 6 3 /* This include file defines the info_structure used by an I/O module to perform an "io_call" order 6 4* on behalf of the io_call command. */ 6 5 /* Coded April 1976 by Larry Johnson */ 6 6 /* Changed June 1977 by Larry Johnson for "io_call_af" order */ 6 7 6 8 dcl io_call_infop ptr; 6 9 6 10 dcl 1 io_call_info aligned based (io_call_infop), 6 11 2 version fixed bin, 6 12 2 caller_name char (32), /* Caller name for error messages */ 6 13 2 order_name char (32), /* Actual name of the order to be performed */ 6 14 2 report entry variable options (variable), 6 15 /* Entry to ioa_ like procedure to report results */ 6 16 2 error entry variable options (variable), 6 17 /* Entry to com_err_ like procedure to report results */ 6 18 2 af_returnp ptr, /* Pointer to return string if "io_call_af" order */ 6 19 2 af_returnl fixed bin, /* Length of string */ 6 20 2 fill (5) bit (36) aligned, 6 21 2 nargs fixed bin, /* Number of additional command arguments provided */ 6 22 2 max_arglen fixed bin, /* Length of longest argument (used to define array) */ 6 23 2 args (0 refer (io_call_info.nargs)) char (0 refer (io_call_info.max_arglen)) varying; 6 24 6 25 dcl io_call_af_ret char (io_call_info.af_returnl) based (io_call_info.af_returnp) varying; 6 26 /* Return string for active function */ 6 27 6 28 /* End include file ..... io_call_info.incl.pl1 */ 988 989 7 1 /* BEGIN INCLUDE FILE ... terminal_io_record.incl.pl1 */ 7 2 /* Created: November 1979 by G. Palter */ 7 3 /* Modified: 26 March 1982 by G. Palter to make the structure more compatible with use of the like attribute */ 7 4 7 5 7 6 /* Record format used by I/O modules designed for communcation with remote I/O daemon stations */ 7 7 7 8 dcl 1 terminal_io_record aligned based (terminal_io_record_ptr), 7 9 2 header, 7 10 3 version fixed binary, 7 11 3 device_type fixed binary, /* type of device sending/receiving this record -- 7 12* reader/printer/punch/teleprinter */ 7 13 3 slew_control, /* slew control data: used for printer and teleprinter only */ 7 14 4 slew_type fixed binary (18) unaligned unsigned, /* type of slewing operation before/after this line -- 7 15* by-count/top-of-form/inside-page/outside-page/to-channel */ 7 16 4 slew_count fixed binary (18) unaligned unsigned,/* # of lines if by count; channel # if to channel */ 7 17 3 flags, 7 18 4 binary bit (1) unaligned, /* ON => data in record should be written in binary mode */ 7 19 4 preslew bit (1) unaligned, /* ON => perform above slew before printing data; 7 20* OFF => perform above slew after printing data */ 7 21 4 pad bit (34) unaligned, 7 22 3 element_size fixed binary, /* # of bits in a data element */ 7 23 3 n_elements fixed binary (24), /* # of elements in the record */ 7 24 2 data, /* force word alignment */ 7 25 3 bits (terminal_io_record_n_elements refer (terminal_io_record.n_elements)) 7 26 bit (terminal_io_record_element_size refer (terminal_io_record.element_size)) unaligned; 7 27 7 28 dcl terminal_io_record_ptr pointer; 7 29 7 30 dcl terminal_io_record_element_size fixed binary; /* used for allocating terminal_io_record structures */ 7 31 dcl terminal_io_record_n_elements fixed binary (24); 7 32 7 33 7 34 /* Manifest constants */ 7 35 7 36 dcl terminal_io_record_version_1 fixed binary static options (constant) initial (1); 7 37 7 38 dcl (TELEPRINTER_DEVICE initial (1), 7 39 READER_DEVICE initial (2), 7 40 PRINTER_DEVICE initial (3), 7 41 PUNCH_DEVICE initial (4)) 7 42 fixed binary static options (constant); 7 43 7 44 dcl (SLEW_BY_COUNT initial (1), 7 45 SLEW_TO_TOP_OF_PAGE initial (2), 7 46 SLEW_TO_INSIDE_PAGE initial (3), /* skip to top of next inside page (head sheet) */ 7 47 SLEW_TO_OUTSIDE_PAGE initial (4), /* skip to top of next outside page (tail sheet) */ 7 48 SLEW_TO_CHANNEL initial (5)) /* skip to specified channel stop */ 7 49 fixed binary static options (constant); 7 50 7 51 7 52 /* Data in record as a character string (terminal_io_record.element_size = 9) */ 7 53 7 54 dcl terminal_io_record_data_chars character (terminal_io_record.n_elements) unaligned 7 55 based (addr (terminal_io_record.bits)); 7 56 7 57 dcl terminal_io_record_data_chars_varying_max_len fixed binary (21); /* Set this before using the varying string. */ 7 58 dcl terminal_io_record_data_chars_varying character (terminal_io_record_data_chars_varying_max_len) varying 7 59 based (addr (terminal_io_record.n_elements)); /* varying string consists of length and data */ 7 60 7 61 7 62 /* Data in record as a bit string (terminal_io_record.element_size = 1) */ 7 63 7 64 dcl terminal_io_record_data_bits bit (terminal_io_record.n_elements) unaligned based (addr (terminal_io_record.bits)); 7 65 7 66 /* END INCLUDE FILE ... terminal_io_record.incl.pl1 */ 990 991 992 end remote_teleprinter_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/28/88 1257.9 remote_teleprinter_.pl1 >special_ldd>install>MR12.2-1199>remote_teleprinter_.pl1 978 1 10/28/88 1226.7 remote_attach_data.incl.pl1 >special_ldd>install>MR12.2-1199>remote_attach_data.incl.pl1 980 2 02/04/88 2009.3 prt_conv_info.incl.pl1 >ldd>include>prt_conv_info.incl.pl1 982 3 08/29/75 1310.5 prt_info.incl.pl1 >ldd>include>prt_info.incl.pl1 984 4 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 986 5 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.incl.pl1 988 6 07/19/79 1547.1 io_call_info.incl.pl1 >ldd>include>io_call_info.incl.pl1 990 7 11/12/82 1624.8 terminal_io_record.incl.pl1 >ldd>include>terminal_io_record.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. Card_Util_Char_Max constant fixed bin(17,0) initial dcl 114 ref 638 NL constant char(1) initial packed unaligned dcl 115 ref 700 Sequential_input_output 000166 constant fixed bin(17,0) initial dcl 5-15 set ref 393* Stream_input_output 000173 constant fixed bin(17,0) initial dcl 5-15 set ref 387 403* TELEPRINTER_DEVICE constant fixed bin(17,0) initial dcl 7-38 ref 203 a_buf_chars parameter fixed bin(21,0) dcl 52 ref 574 597 625 644 647 a_buf_ptr parameter pointer dcl 50 ref 574 648 a_code parameter fixed bin(35,0) dcl 48 set ref 172 177* 330 334* 339* 367 371* 376* 389* 393* 394 397* 398 403* 404 406* 407 437 441* 446* 456* 457 457 457* 483 487* 492* 504* 566* 574 582* 593* 654* 660 668* 680* 721* 728 733* 737* 753* 755* 783 788* 792* 802* 872* a_data_chars parameter fixed bin(21,0) dcl 53 set ref 483 502 502 517 574 592* 647* 648 648 a_data_ptr parameter pointer dcl 51 ref 483 518 a_infop parameter pointer dcl 57 ref 660 678 a_iocbp parameter pointer dcl 45 ref 172 175 330 333 367 370 437 440 483 486 574 577 660 663 728 731 783 786 a_mode parameter fixed bin(17,0) dcl 49 ref 367 386 a_new_modes parameter char packed unaligned dcl 59 set ref 728 749* 751* 757 759* 761 763 766 a_old_modes parameter char packed unaligned dcl 58 set ref 728 776* a_option parameter varying char array dcl 46 ref 172 186 222 223 223 226 228 228 231 233 235 235 240 240 244 246 251 826 829 832 844 847 852 855 a_order parameter char packed unaligned dcl 56 ref 660 679 a_pos_type parameter fixed bin(17,0) dcl 54 set ref 783 802* a_pos_value parameter fixed bin(21,0) dcl 55 set ref 783 802* a_sw parameter bit(1) packed unaligned dcl 47 ref 172 176 367 actual_iocb_ptr 12 based pointer level 2 dcl 4-6 ref 333 370 440 486 577 663 731 786 ad based structure level 1 dcl 1-17 set ref 194 910 addr builtin function dcl 167 ref 306 425 510 510 516 535 625 625 639 648 702 702 959 966 966 adp 000650 automatic pointer dcl 1-15 set ref 179* 194* 198 199 200 201 202 203 204 205 206 207 208 209 211 225 230 237 242 248 249 256 262 262 268 268 289 290 296 306 307 335* 337 372* 374 393 396 397 402 403 406 406 411 425 442* 444 456 488* 490 510 516 521 533 546 548 552 559 578* 580 607 609 625 639 664* 666 689 698 700 702 712 717 732* 735 751 759 764 766 768 787* 790 802 891 906 908 908 910 911* any_other 000634 stack reference condition dcl 165 ref 302 315 353 361 414 431 462 477 arg 000246 automatic char(32) packed unaligned dcl 74 set ref 958* 959 argp 000256 automatic pointer dcl 75 set ref 959* 961* 968* args 44 based varying char array level 2 dcl 6-10 ref 958 965 attach_count 000011 internal static fixed bin(17,0) initial dcl 105 set ref 282* 282 283 283* 285 attach_data_ptr 16 based pointer level 2 dcl 4-6 set ref 307* 335 372 442 488 578 664 732 787 915* attach_desc 33 based varying char(256) level 3 dcl 1-17 set ref 290* 306 attach_descrip_ptr 14 based pointer level 2 dcl 4-6 set ref 180 306* 914* bin builtin function dcl 167 ref 852 bits 11 based structure level 2 in structure "ad" dcl 1-17 in procedure "remote_teleprinter_" set ref 198* bits 6 based bit array level 3 in structure "terminal_io_record" packed packed unaligned dcl 7-8 in procedure "remote_teleprinter_" set ref 648 card_code 000243 automatic fixed bin(35,0) dcl 72 set ref 751* 753 card_modes 000150 automatic char(160) packed unaligned dcl 64 set ref 747* 751* 776 card_util_$modes 000020 constant entry external dcl 123 ref 211 751 card_util_$translate 000022 constant entry external dcl 124 ref 639 char builtin function dcl 167 ref 285 char_string based char(1024) packed unaligned dcl 97 set ref 648* charp 000224 automatic pointer dcl 69 set ref 518* 544* chars 22 based structure level 2 dcl 1-17 set ref 201* cleanup 000642 stack reference condition dcl 165 ref 192 525 599 652 close 36 based entry variable level 2 dcl 4-6 set ref 424* code 000240 automatic fixed bin(35,0) dcl 72 in procedure "remote_teleprinter_" set ref 177* 182* 183* 188* 189* 211* 212 212* 258* 259* 264* 265* 270* 271* 276* 277* 292* 293 293* 317* 318 318* 321* 322 322* 334* 345* 371* 382* 441* 452* 487* 498* 510* 512 548* 552* 555 559* 566 588* 593* 609* 611 611* 613 617* 625* 626 626* 628 644* 654 674* 680* 686* 712* 714 714* 721 733* 743* 788* 798* 828* 829* 846* 847* 853* 855* 950* 966* 968* 970* code parameter fixed bin(35,0) dcl 864 in procedure "abort_attach" set ref 861 869* 872 com_err_ 000016 constant entry external dcl 122 ref 869 com_err_sw 000222 automatic bit(1) packed unaligned dcl 68 set ref 176* 869 continue_to_signal_ 000036 constant entry external dcl 130 ref 935 control 66 based entry variable level 2 dcl 4-6 set ref 421* 469* conversion 000000 stack reference condition dcl 165 ref 850 964 convert builtin function dcl 167 ref 965 copy builtin function dcl 167 ref 700 coroutine_modes 200(18) based structure level 3 packed packed unaligned dcl 1-17 currentsize builtin function dcl 167 ref 548 cv_proc 164 based pointer level 3 dcl 1-17 set ref 209* 397* 406* data 6 based structure level 2 dcl 7-8 set ref 535 625 625 data_chars 000265 automatic fixed bin(21,0) dcl 81 set ref 643* 644 647 detach_iocb 26 based entry variable level 2 dcl 4-6 set ref 309* 468* device_opt 000226 automatic varying char(32) dcl 70 set ref 220* 233* 274 277 288 device_type 1 based fixed bin(17,0) level 3 in structure "terminal_io_record" dcl 7-8 in procedure "remote_teleprinter_" set ref 891* device_type 7 based fixed bin(17,0) level 3 in structure "ad" dcl 1-17 in procedure "remote_teleprinter_" set ref 203* 891 ec 000241 automatic fixed bin(35,0) dcl 72 set ref 680* 709* 710 714 714 element_size 4 based fixed bin(17,0) level 3 dcl 7-8 set ref 527 548 562 601 648 650 885* 887 892* error_table_$bad_arg 000104 external static fixed bin(35,0) dcl 151 ref 258 264 270 276 504 686 950 error_table_$bad_conversion 000100 external static fixed bin(35,0) dcl 149 ref 853 970 error_table_$bad_mode 000106 external static fixed bin(35,0) dcl 152 ref 389 error_table_$data_loss 000120 external static fixed bin(35,0) dcl 157 ref 644 error_table_$eof_record 000102 external static fixed bin(35,0) dcl 150 ref 611 626 error_table_$noarg 000124 external static fixed bin(35,0) dcl 159 ref 828 846 error_table_$not_attached 000112 external static fixed bin(35,0) dcl 154 ref 339 376 446 457 492 582 668 737 792 error_table_$not_closed 000116 external static fixed bin(35,0) dcl 156 ref 345 382 error_table_$not_detached 000110 external static fixed bin(35,0) dcl 153 ref 182 error_table_$not_open 000114 external static fixed bin(35,0) dcl 155 ref 452 457 498 588 674 743 798 error_table_$unimplemented_version 000126 external static fixed bin(35,0) dcl 160 ref 617 error_table_$wrong_no_of_args 000122 external static fixed bin(35,0) dcl 158 ref 188 fixed based structure level 2 dcl 1-17 set ref 199* get_chars 46 based entry variable level 2 dcl 4-6 set ref 418* get_line 42 based entry variable level 2 dcl 4-6 set ref 419* get_system_free_area_ 000024 constant entry external dcl 125 ref 194 527 562 601 650 885 910 hbound builtin function dcl 167 ref 186 222 826 844 hcs_$make_ptr 000026 constant entry external dcl 126 ref 397 406 hcs_$reset_ips_mask 000040 constant entry external dcl 131 ref 313 359 429 475 929 hcs_$set_ips_mask 000042 constant entry external dcl 132 ref 304 355 416 464 header based structure level 2 dcl 7-8 ht 200(19) based bit(1) level 4 packed packed unaligned dcl 1-17 set ref 237* i 000261 automatic fixed bin(21,0) dcl 77 set ref 763* 764 766 idx parameter fixed bin(17,0) dcl 841 in procedure "cv_dec_arg" set ref 838 843* 843 844 847 852 855 idx parameter fixed bin(17,0) dcl 823 in procedure "get_arg" set ref 820 825* 825 826 829 832 idx 000262 automatic fixed bin(17,0) dcl 78 in procedure "remote_teleprinter_" set ref 222* 223 223 225* 226 228 228 230* 231 233 233* 235 235 240 240 242* 244 246 248* 251* ignore 000237 automatic fixed bin(35,0) dcl 71 set ref 702* 908* 935* index builtin function dcl 167 ref 761 763 info_fixed based fixed bin(17,0) dcl 98 ref 689 infop 000302 automatic pointer dcl 85 set ref 678* 684 689 709* 712* 948 954 input_modes 14 based bit(36) level 3 dcl 1-17 set ref 211* 639* 751* io_call_info based structure level 1 dcl 6-10 io_call_infop 000654 automatic pointer dcl 6-8 set ref 954* 955 956 958 965 ioa_ 000014 constant entry external dcl 121 ref 814 iocb based structure level 1 dcl 4-6 iocbp 000244 automatic pointer dcl 73 set ref 175* 180 183 306 307 308 309 311* 317* 321* 333* 335 343 357* 370* 372 380 418 419 420 421 422 423 424 425 427* 440* 442 450 466 467 468 469 470 471 473* 486* 488 496 577* 578 586 663* 664 672 702* 709* 731* 732 741 749* 786* 787 796 914 915 916 966* 968* iox_$attach_ioname 000052 constant entry external dcl 136 ref 292 iox_$close 000056 constant entry external dcl 138 ref 456 iox_$control 000072 constant entry external dcl 144 ref 510 559 712 717 966 968 iox_$detach_iocb 000054 constant entry external dcl 137 ref 908 iox_$err_no_operation 000074 constant entry external dcl 145 ref 469 470 471 916 iox_$get_chars 000062 constant entry external dcl 140 ref 625 iox_$modes 000046 constant entry external dcl 134 ref 759 764 766 768 iox_$open 000060 constant entry external dcl 139 ref 393 403 iox_$position 000050 constant entry external dcl 135 ref 802 iox_$propagate 000044 constant entry external dcl 133 ref 311 357 427 473 iox_$put_chars 000066 constant entry external dcl 142 ref 552 702 iox_$read_record 000064 constant entry external dcl 141 ref 609 iox_$write_record 000070 constant entry external dcl 143 ref 548 iox_modes 000000 constant char(24) initial array dcl 5-6 ref 411 last_char 000220 automatic char(1) packed unaligned dcl 65 set ref 772* 773 773 last_pos 000221 automatic fixed bin(17,0) dcl 66 set ref 771* 772 773* 773 776 length builtin function dcl 167 ref 771 line 325 based fixed bin(17,0) level 2 in structure "pci" dcl 2-15 in procedure "remote_teleprinter_" set ref 540* line 511 based fixed bin(17,0) level 3 in structure "ad" dcl 1-17 in procedure "remote_teleprinter_" set ref 208* lpi 173 based fixed bin(17,0) level 3 dcl 1-17 set ref 207* ltrim builtin function dcl 167 ref 285 288 mask 000260 automatic bit(36) dcl 76 set ref 300* 304* 313* 313* 351* 355* 359* 359* 412* 416* 429* 429* 460* 464* 475* 475* 929 929* 929* 933* max builtin function dcl 167 ref 242 689 max_arglen 43 based fixed bin(17,0) level 2 dcl 6-10 ref 958 958 965 965 min builtin function dcl 167 ref 242 647 689 modes 56 based entry variable level 2 dcl 4-6 set ref 422* 471* my_area based area(1024) dcl 99 ref 194 527 562 601 650 885 910 my_options 000320 automatic varying char(256) dcl 89 set ref 217* 231* 231 244* 244 249* 249 290 n_elements 5 based fixed bin(24,0) level 3 dcl 7-8 set ref 527 548 562 601 630* 639 643 648 650 885* 887 name 1 based char(32) level 2 dcl 4-6 set ref 183* nargs 42 based fixed bin(17,0) level 2 dcl 6-10 ref 956 nl_string 000623 automatic char(32) packed unaligned dcl 92 set ref 700* 702 702 null builtin function dcl 167 ref 179 180 200 209 317 317 337 343 374 380 397 397 406 406 444 450 466 490 496 508 527 559 559 562 580 586 595 601 666 672 684 717 717 735 741 790 796 906 908 911 914 915 948 961 open 32 based entry variable level 2 dcl 4-6 set ref 308* 467* 916* open_descrip_ptr 20 based pointer level 2 dcl 4-6 set ref 343 380 425* 450 466* 496 586 672 741 796 open_description 134 based varying char(24) level 3 dcl 1-17 set ref 411* 425 open_mode 000263 automatic fixed bin(17,0) dcl 79 set ref 386* 387 411 order 000266 automatic char(32) packed unaligned dcl 82 set ref 679* 682 691 693 706 709* 712* 717 717* 955* 962 966* 968* order_name 11 based char(32) level 2 dcl 6-10 ref 955 pci based structure level 1 dcl 2-15 pcip 000652 automatic pointer dcl 2-13 set ref 516* 538 540 544* phys_line_length 171 based fixed bin(17,0) level 3 dcl 1-17 set ref 205* 225* 262 262 521 phys_page_length 172 based fixed bin(17,0) level 3 dcl 1-17 set ref 206* 230* 268 268 position 62 based entry variable level 2 dcl 4-6 set ref 423* 470* prt_code 000242 automatic fixed bin(35,0) dcl 72 set ref 749* 753 755 prt_conv_ 000030 constant entry external dcl 127 ref 544 prt_conv_outp 000276 automatic pointer dcl 83 set ref 533* 535* 544* 552* prt_info based structure level 1 dcl 3-7 prt_modes 000100 automatic char(160) packed unaligned dcl 64 set ref 747* 749* 771 772 776 ptrs 16 based structure level 2 dcl 1-17 set ref 200* put_chars 52 based entry variable level 2 dcl 4-6 set ref 420* put_chars_since_last_runout 000010 internal static bit(1) initial packed unaligned dcl 104 set ref 515* 695 697* record_io 11(01) based bit(1) level 3 packed packed unaligned dcl 1-17 set ref 396* 402* 533 546 607 record_len 000300 automatic fixed bin(17,0) dcl 84 set ref 544* 552* 609* 625* 630 remaining_chars 000264 automatic fixed bin(21,0) dcl 80 set ref 517* 538 544* remote_device_name 000126 constant char(19) initial packed unaligned dcl 111 set ref 285 290 869* remote_pci 164 based structure level 2 dcl 1-17 set ref 202* 516 remote_printer_control_ 000034 constant entry external dcl 129 ref 317 709 remote_printer_modes_ 000032 constant entry external dcl 128 ref 321 749 rtrim builtin function dcl 167 ref 411 771 776 runout_spacing based fixed bin(17,0) level 3 dcl 1-17 set ref 242* 689* 698 700 702* runout_spacing_cnt 000306 automatic fixed bin(17,0) dcl 87 set ref 965* 965 966 966 sheets_per_page 174 based fixed bin(17,0) level 3 dcl 1-17 set ref 204* size builtin function dcl 167 ref 609 slew_residue 326 based fixed bin(17,0) level 2 dcl 2-15 ref 538 space 006544 constant char(1) initial packed unaligned dcl 113 ref 251 289 290 static_comerr_sw 000012 internal static bit(1) initial packed unaligned dcl 106 set ref 176 812* 812 814* str1 parameter char dcl 865 set ref 861 869* str2 parameter char dcl 865 set ref 861 869* substr builtin function dcl 167 set ref 648* 648 766 772 776 sys_info$max_seg_size 000076 external static fixed bin(17,0) dcl 147 ref 502 teleprinter 000116 constant char(32) initial packed unaligned dcl 112 set ref 510 510 temp_iocbp 000304 automatic pointer dcl 86 set ref 292* 296 terminal 22 based varying char(32) level 3 dcl 1-17 set ref 248* 249 256 289 406 terminal_attach_desc 000522 automatic varying char(256) dcl 91 set ref 219* 289* 292 terminal_attach_options 000421 automatic varying char(256) dcl 90 set ref 218* 226* 226 238* 238 251* 251 288* 288 289 290 terminal_io_record based structure level 1 dcl 7-8 set ref 527 548 562 601 609 650 885 887* terminal_io_record_data_chars based char packed unaligned dcl 7-54 ref 648 terminal_io_record_data_chars_varying based varying char dcl 7-58 set ref 639* terminal_io_record_data_chars_varying_max_len 000662 automatic fixed bin(21,0) dcl 7-57 set ref 638* 639 terminal_io_record_element_size 000660 automatic fixed bin(17,0) dcl 7-30 set ref 520* 596* 609 885 885 892 terminal_io_record_n_elements 000661 automatic fixed bin(24,0) dcl 7-31 set ref 521* 597* 609 885 885 terminal_io_record_ptr 000656 automatic pointer dcl 7-28 set ref 508* 527 527 533 535 548* 548 562 562 595* 601 601 609* 609 615 625 625 630 639 643 648 648 650 885* 887 889 891 892 terminal_io_record_version_1 constant fixed bin(17,0) initial dcl 7-36 ref 615 889 terminal_iocbp 16 based pointer level 3 dcl 1-17 set ref 296* 393* 403* 456* 510* 548* 552* 559* 609* 625* 712* 717* 759* 764* 766* 768* 802* 908 908* terminal_switch_name 000307 automatic varying char(32) dcl 88 set ref 285* 292 unspec builtin function dcl 167 set ref 202* 887* version based fixed bin(17,0) level 3 dcl 7-8 set ref 615 889* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Direct_input internal static fixed bin(17,0) initial dcl 5-15 Direct_output internal static fixed bin(17,0) initial dcl 5-15 Direct_update internal static fixed bin(17,0) initial dcl 5-15 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 5-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 5-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 5-15 PRINTER_DEVICE internal static fixed bin(17,0) initial dcl 7-38 PUNCH_DEVICE internal static fixed bin(17,0) initial dcl 7-38 READER_DEVICE internal static fixed bin(17,0) initial dcl 7-38 SLEW_BY_COUNT internal static fixed bin(17,0) initial dcl 7-44 SLEW_TO_CHANNEL internal static fixed bin(17,0) initial dcl 7-44 SLEW_TO_INSIDE_PAGE internal static fixed bin(17,0) initial dcl 7-44 SLEW_TO_OUTSIDE_PAGE internal static fixed bin(17,0) initial dcl 7-44 SLEW_TO_TOP_OF_PAGE internal static fixed bin(17,0) initial dcl 7-44 Sequential_input internal static fixed bin(17,0) initial dcl 5-15 Sequential_output internal static fixed bin(17,0) initial dcl 5-15 Sequential_update internal static fixed bin(17,0) initial dcl 5-15 Stream_input internal static fixed bin(17,0) initial dcl 5-15 Stream_output internal static fixed bin(17,0) initial dcl 5-15 io_call_af_ret based varying char dcl 6-25 iox_$iocb_version_sentinel external static char(4) dcl 4-51 pip automatic pointer dcl 3-5 short_iox_modes internal static char(4) initial array dcl 5-12 terminal_io_record_data_bits based bit packed unaligned dcl 7-64 NAMES DECLARED BY EXPLICIT CONTEXT. abort_attach 006111 constant entry internal dcl 861 ref 183 189 212 259 265 271 277 293 318 322 829 847 855 alloc_tio_rec 006175 constant entry internal dcl 882 ref 531 605 attach_return 002566 constant label dcl 325 ref 876 bad_dec_arg 006025 constant label dcl 853 set ref 850 clean_up 006245 constant entry internal dcl 901 ref 192 349 874 control_ret 004745 constant label dcl 721 ref 687 cv_dec_arg 005664 constant entry internal dcl 838 ref 225 230 242 do_control 004657 constant label dcl 712 ref 691 698 704 flip_com_err_sw 005505 constant entry external dcl 809 get_arg 005542 constant entry internal dcl 820 ref 233 248 get_chars_ret 004416 constant label dcl 650 ref 613 618 628 handler 006326 constant entry internal dcl 924 ref 302 353 414 462 io_call_err 006530 constant label dcl 970 ref 964 put_chars_ret 004072 constant label dcl 562 ref 512 555 remote_teleprinter_ 000504 constant entry external dcl 39 remote_teleprinter_attach 000517 constant entry external dcl 172 remote_teleprinter_close 003341 constant entry external dcl 437 ref 424 remote_teleprinter_control 004446 constant entry external dcl 660 ref 421 remote_teleprinter_detach 002573 constant entry external dcl 330 ref 309 468 remote_teleprinter_get_chars 004125 constant entry external dcl 574 ref 418 419 remote_teleprinter_io_call 006360 constant entry internal dcl 945 ref 706 remote_teleprinter_modes 004755 constant entry external dcl 728 ref 422 remote_teleprinter_open 002724 constant entry external dcl 367 ref 308 467 remote_teleprinter_position 005425 constant entry external dcl 783 ref 423 remote_teleprinter_put_chars 003527 constant entry external dcl 483 ref 420 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 7500 7630 6547 7510 Length 10346 6547 130 502 731 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME remote_teleprinter_ 542 external procedure is an external procedure. on unit on line 192 64 on unit on unit on line 302 64 on unit on unit on line 353 64 on unit on unit on line 414 64 on unit on unit on line 462 64 on unit on unit on line 525 70 on unit on unit on line 599 70 on unit get_arg 90 internal procedure uses returns(char(*)) or returns(bit(*)). cv_dec_arg 256 internal procedure enables or reverts conditions. on unit on line 850 64 on unit abort_attach 84 internal procedure is called during a stack extension. alloc_tio_rec internal procedure shares stack frame of external procedure remote_teleprinter_. clean_up 72 internal procedure is called by several nonquick procedures. handler 70 internal procedure is called by several nonquick procedures. remote_teleprinter_io_call 230 internal procedure enables or reverts conditions. on unit on line 964 64 on unit STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 put_chars_since_last_runout remote_teleprinter_ 000011 attach_count remote_teleprinter_ 000012 static_comerr_sw remote_teleprinter_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME remote_teleprinter_ 000100 prt_modes remote_teleprinter_ 000150 card_modes remote_teleprinter_ 000220 last_char remote_teleprinter_ 000221 last_pos remote_teleprinter_ 000222 com_err_sw remote_teleprinter_ 000224 charp remote_teleprinter_ 000226 device_opt remote_teleprinter_ 000237 ignore remote_teleprinter_ 000240 code remote_teleprinter_ 000241 ec remote_teleprinter_ 000242 prt_code remote_teleprinter_ 000243 card_code remote_teleprinter_ 000244 iocbp remote_teleprinter_ 000246 arg remote_teleprinter_ 000256 argp remote_teleprinter_ 000260 mask remote_teleprinter_ 000261 i remote_teleprinter_ 000262 idx remote_teleprinter_ 000263 open_mode remote_teleprinter_ 000264 remaining_chars remote_teleprinter_ 000265 data_chars remote_teleprinter_ 000266 order remote_teleprinter_ 000276 prt_conv_outp remote_teleprinter_ 000300 record_len remote_teleprinter_ 000302 infop remote_teleprinter_ 000304 temp_iocbp remote_teleprinter_ 000306 runout_spacing_cnt remote_teleprinter_ 000307 terminal_switch_name remote_teleprinter_ 000320 my_options remote_teleprinter_ 000421 terminal_attach_options remote_teleprinter_ 000522 terminal_attach_desc remote_teleprinter_ 000623 nl_string remote_teleprinter_ 000650 adp remote_teleprinter_ 000652 pcip remote_teleprinter_ 000654 io_call_infop remote_teleprinter_ 000656 terminal_io_record_ptr remote_teleprinter_ 000660 terminal_io_record_element_size remote_teleprinter_ 000661 terminal_io_record_n_elements remote_teleprinter_ 000662 terminal_io_record_data_chars_varying_max_len remote_teleprinter_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return_mac tra_ext_1 signal_op enable_op shorten_stack ext_entry ext_entry_desc int_entry int_entry_desc set_chars_eis index_chars_eis return_chars_eis any_to_any_truncate_op_alloc_ op_freen_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. card_util_$modes card_util_$translate com_err_ continue_to_signal_ get_system_free_area_ hcs_$make_ptr hcs_$reset_ips_mask hcs_$set_ips_mask ioa_ iox_$attach_ioname iox_$close iox_$control iox_$detach_iocb iox_$err_no_operation iox_$get_chars iox_$modes iox_$open iox_$position iox_$propagate iox_$put_chars iox_$read_record iox_$write_record prt_conv_ remote_printer_control_ remote_printer_modes_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$bad_conversion error_table_$bad_mode error_table_$data_loss error_table_$eof_record error_table_$noarg error_table_$not_attached error_table_$not_closed error_table_$not_detached error_table_$not_open error_table_$unimplemented_version error_table_$wrong_no_of_args sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 39 000503 172 000511 175 000535 176 000541 177 000553 179 000555 180 000557 182 000562 183 000564 186 000610 188 000615 189 000620 192 000646 194 000670 198 000704 199 000722 200 000733 201 000736 202 000742 203 000745 204 000747 205 000751 206 000753 207 000755 208 000757 209 000761 211 000763 212 001017 217 001044 218 001045 219 001046 220 001047 222 001054 223 001065 225 001112 226 001123 227 001174 228 001176 230 001210 231 001221 232 001272 233 001274 235 001332 237 001346 238 001351 239 001363 240 001364 242 001376 244 001416 245 001467 246 001471 248 001476 249 001527 250 001564 251 001566 252 001624 256 001627 258 001635 259 001640 262 001663 264 001671 265 001674 268 001717 270 001725 271 001730 274 001753 276 001760 277 001763 278 002016 282 002017 283 002021 285 002026 288 002072 289 002142 290 002200 292 002244 293 002311 296 002337 300 002342 302 002343 304 002365 306 002400 307 002404 308 002406 309 002412 311 002415 313 002424 315 002434 317 002435 318 002465 321 002512 322 002541 325 002566 330 002567 333 002603 334 002610 335 002612 337 002614 339 002620 340 002623 343 002624 345 002630 346 002633 349 002634 351 002640 353 002641 355 002663 357 002676 359 002705 361 002715 363 002716 367 002717 370 002734 371 002741 372 002743 374 002745 376 002751 377 002754 380 002755 382 002761 383 002764 386 002765 387 002767 389 002771 390 002774 393 002775 394 003014 396 003016 397 003021 398 003065 400 003067 402 003070 403 003073 404 003112 406 003114 407 003172 411 003175 412 003227 414 003230 416 003252 418 003265 419 003272 420 003274 421 003277 422 003302 423 003305 424 003310 425 003313 427 003316 429 003325 431 003335 433 003336 437 003337 440 003351 441 003356 442 003360 444 003362 446 003366 447 003371 450 003372 452 003376 453 003401 456 003402 457 003413 460 003422 462 003423 464 003445 466 003460 467 003463 468 003467 469 003472 470 003476 471 003500 473 003502 475 003510 477 003520 479 003521 483 003522 486 003541 487 003546 488 003550 490 003552 492 003556 493 003561 496 003562 498 003566 499 003571 502 003572 504 003601 505 003604 508 003605 510 003607 512 003640 515 003642 516 003645 517 003650 518 003652 520 003656 521 003660 525 003664 527 003700 529 003724 531 003725 533 003726 535 003735 538 003740 540 003745 544 003750 546 003767 548 003773 550 004020 552 004021 555 004036 557 004040 559 004041 562 004072 566 004115 568 004117 574 004120 577 004137 578 004144 580 004146 582 004152 583 004155 586 004156 588 004162 589 004165 592 004166 593 004167 595 004171 596 004173 597 004175 599 004177 601 004213 603 004237 605 004240 607 004241 609 004245 611 004273 613 004300 615 004302 617 004305 618 004307 623 004310 625 004311 626 004336 628 004343 630 004345 638 004350 639 004352 643 004373 644 004376 647 004404 648 004411 650 004416 652 004435 654 004436 656 004440 660 004441 663 004464 664 004471 666 004473 668 004477 669 004502 672 004503 674 004507 675 004512 678 004513 679 004516 680 004523 682 004526 684 004532 686 004536 687 004541 689 004542 690 004552 691 004553 693 004557 695 004563 697 004566 698 004567 700 004571 702 004600 704 004617 706 004620 709 004631 710 004655 712 004657 714 004704 717 004711 721 004745 724 004747 728 004750 731 005000 732 005005 733 005007 735 005011 737 005015 738 005020 741 005021 743 005025 744 005030 747 005031 749 005037 751 005065 753 005115 755 005123 757 005125 759 005134 760 005164 761 005165 763 005174 764 005175 766 005234 768 005272 771 005326 772 005340 773 005344 776 005353 779 005416 783 005420 786 005435 787 005442 788 005444 790 005446 792 005452 793 005455 796 005456 798 005462 799 005465 802 005466 804 005503 809 005504 812 005512 814 005521 816 005540 820 005541 825 005547 826 005551 828 005557 829 005561 830 005634 832 005635 838 005663 843 005671 844 005673 846 005701 847 005703 848 005756 850 005757 852 005776 853 006025 855 006031 857 006103 861 006110 869 006131 872 006161 874 006165 876 006172 882 006175 885 006176 887 006222 889 006234 891 006236 892 006241 895 006243 901 006244 906 006252 908 006257 910 006274 911 006306 914 006311 915 006314 916 006316 919 006324 924 006325 929 006333 933 006345 935 006347 937 006356 945 006357 948 006365 950 006372 951 006374 954 006375 955 006377 956 006403 958 006405 959 006411 960 006413 961 006414 962 006416 964 006422 965 006441 966 006453 967 006503 968 006504 969 006527 970 006530 972 006534 ----------------------------------------------------------- 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