COMPILATION LISTING OF SEGMENT tc_request Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phx. Az., Sys-M Compiled on: 08/13/87 1329.3 mst Thu Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 6* * * 7* *********************************************************** */ 8 9 10 11 /****^ HISTORY COMMENTS: 12* 1) change(81-06-01,Margulies), approve(), audit(), install(): 13* There is a temporary crock in place here, for handling 14* error_table_$bigarg returned from hcs_$tty_write_whole_string. See the 15* call to it for details IT MUST BE REMOVED when hardcore is fixed. 16* 2) change(82-05-01,York), approve(), audit(), install(): 17* There is another temporary crock in the insert_text procedure, relating 18* to the two different types of insert-char sequences supported by various 19* terminals. See the comment in place for more Info. 20* 21* Change the pad character from DEL to NUL (or high to low for you PL/I 22* builtin fans). This fixes padding problems with the Heath/Zenith-19, 23* but probably breaks some other terminal... 24* 3) change(82-05-01,York), approve(), audit(), install(): 25* Initialize cost_of_cha_cha in the position_cursor optimzation routine, 26* avoiding weird usuless motion. 27* 4) change(82-07-16,York), approve(), audit(), install(): 28* Position the cursor correctly and send the correct output to the terminal 29* when simulating insert-chars on terminals lacking the capability. 30* 5) change(82-07-16,York), approve(), audit(), install(): 31* Insert a crock in insert_text to keep the screen image updated when 32* doing insert-chars operations on the Teleray 1061 and related terminals. 33* 6) change(82-07-16,York), approve(), audit(), install(): 34* Fix the delete_chars routine so that it does not try to do an actual 35* delete_chars terminal operation on terminals that don't have it. 36* 7) change(82-07-30,York), approve(), audit(), install(): 37* Buffer all output to the terminal generated by one call to tc_request 38* and send it in one call to hcs_ 39* 8) change(82-08-12,York), approve(), audit(), install(): 40* Extend this buffering to work across calls to tc_request, and only send 41* to ring 0 when the buffer fills or an input request is received. 42* 9) change(82-08-30,York), approve(), audit(), install(): 43* Dump the output buffer before raw output is sent to ring 0 and before 44* input is re-echoed, and to send raw output via tty_write_whole_string. 45* 10) change(82-09-10,York), approve(), audit(), install(): 46* Add the send_buffered_output entrypoint as an external interface to 47* write_global_buffer. This is used by the send_buffered_output control 48* order. 49* 11) change(82-09-20,York), approve(), audit(), install(): 50* Remove the send_buffered_output entrypoint, since a call to 51* window_$sync does the right thing. Also changed to pass 52* tc_input$check_echnego the request_ptr as an argument. 53* 12) change(83-01-01,York), approve(), audit(), install(): 54* Not position the cursor on calls that don't modify the screen 55* (e.g. unechoed reads). 56* 13) change(83-09-07,Rochlis), approve(), audit(), install(): 57* Remove the special casing of error_table_$bigarg in the 58* hcs_$tty_write_whole_string call. Now we will get a wakeup and bigarg 59* means we really have problems. 60* 14) change(83-10-09,Rochlis), approve(), audit(), install(): 61* Support partial screen width windows. 62* 15) change(85-09-14,Rochlis), approve(86-05-15,MCR7276), 63* audit(86-05-28,Gilcrease), install(86-06-04,MR12.0-1070): 64* Fix unitialized variable bug in position cursor. Goodbye to the insert 65* mode bug, thanks to Allen Grider. 66* 16) change(86-05-21,LJAdams), approve(86-05-27,MCR7428), 67* audit(86-05-28,Gilcrease), install(86-06-04,MR12.0-1070): 68* The "encode" procedure has an alignment problem. value is declared as 69* fixed bin which equates to 36 bits; bits is declared as (6) bit (3) 70* unaligned which equates to 18 bits. When an unspec (value) = unspec 71* (bits) is done a stringsize condition occurs and only the upper half of 72* the word was being stored. Solution change the declaration of bits to: 73* dcl bits (-5:6) bit (3) unaligned. 74* 17) change(86-11-11,LJAdams), approve(86-11-11,MCR7485), 75* audit(86-12-16,Margolin), install(87-01-06,MR12.0-1255): 76* Modified to support MOWSE. 77* 18) change(86-11-26,LJAdams), approve(86-11-26,MCR7584), 78* audit(86-12-16,Margolin), install(87-01-06,MR12.0-1255): 79* Initial DSA coding has been maintained in a non-executable form. 80* END HISTORY COMMENTS */ 81 82 /* Terminal Control 83* Request Processing level 84* 85* This program is the interpreter of terminal operations. 86* For input side (save read status) we position the cursor, and pass 87* the batton to tc_input. All else is done here, including the grokking 88* of the ttt video tables. */ 89 90 /* format: style2,linecom,^indnoniterdo,indcomtxt,^inditerdo,dclind5,idind25 */ 91 92 tc_request: 93 procedure (TC_data_ptr, Request_ptr, Last_column, Code); 94 go to do_output; 95 96 declare ( 97 (TC_data_ptr, Request_ptr) 98 pointer, 99 Last_column fixed bin, 100 Code fixed bin (35) 101 ) parameter; 102 103 104 declare hcs_$tty_write_whole_string 105 entry (fixed bin, character (*), bit (1) aligned, fixed bin (21), fixed bin, 106 fixed bin (35)); 107 declare hcs_$tty_write entry (fixed bin, pointer, fixed bin (21), fixed bin (21), fixed bin (21), 108 fixed bin, fixed bin (35)); 109 declare ws_tty_$write_whole_string 110 entry (ptr, char (*), bit (1), fixed bin (21), fixed bin, fixed bin (35)); 111 declare ws_tty_$write entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (21), fixed bin, 112 fixed bin (35)); 113 declare dsa_tty_$write_whole_string 114 entry (fixed bin (35), character (*), bit (1) aligned, fixed bin (21), 115 fixed bin, fixed bin (35)); 116 declare dsa_tty_$write entry (fixed bin (35), pointer, fixed bin (21), fixed bin (21), fixed bin (21), 117 fixed bin, fixed bin (35)); 118 119 declare tc_screen$operation entry (pointer, fixed bin, fixed bin, fixed bin, fixed bin); 120 declare tc_screen$get_in_line entry (pointer, fixed bin, fixed bin, character (*)); 121 declare tc_screen$text entry (pointer, fixed bin, fixed bin, bit (1) aligned, character (*)); 122 declare tc_screen$is_region_clear 123 entry (pointer, fixed binary, fixed binary, fixed binary, fixed binary) 124 returns (bit (1) aligned); 125 126 declare tc_input entry (pointer, pointer, fixed bin (35)); 127 declare tc_disconnect$check entry (pointer, fixed bin (35)); 128 declare tc_input$check_echnego entry (pointer, pointer); 129 declare tc_error entry (fixed binary (35), character (*)); 130 declare tc_block entry (pointer, pointer, bit (36) aligned); 131 132 declare ( 133 video_et_$capability_lacking, 134 video_et_$tc_illegal_request, 135 video_et_$tc_cannot_position, 136 video_et_$tc_missing_operation, 137 video_et_$tc_tty_error 138 ) fixed bin (35) ext static; 139 140 declare OMEGA fixed bin init (100000) internal static options (constant); 141 /* compiler limitation of 256 chars, should be bigger. */ 142 declare MANY_SPACES char (256) static options (constant) init (""); 143 144 declare last_column fixed bin; 145 declare (request_row, request_col) 146 fixed bin; 147 declare request_row_count fixed bin; 148 declare request_column_count fixed bin; 149 declare request_string_ptr pointer; 150 declare request_string_length fixed bin (21); 151 declare request_count fixed bin; 152 declare tty_state fixed bin; 153 declare save_row character (200); /* pretty big terminal */ 154 declare code fixed bin (35); 155 156 declare (addr, bin, byte, divide, hbound, lbound, length, min, rank, rtrim, substr, unspec, verify) 157 builtin; 158 159 declare 1 new_state aligned based, 160 2 pay_attention aligned, /* use these to see those below */ 161 3 insert bit (1) unaligned, 162 /* flags.insert_mode is useful */ 163 3 cursor bit (1) unaligned, 164 /* flags.cursor_valid */ 165 3 position bit (1) unaligned, 166 /* cursor_position */ 167 2 flags aligned, 168 3 insert_mode bit (1) unaligned, 169 3 cursor_valid bit (1) unaligned, 170 2 cursor_position aligned, 171 3 row fixed bin, 172 3 col fixed bin; 173 174 init: 175 entry (TC_data_ptr); 176 177 tc_data_ptr = TC_data_ptr; 178 state.pending.count = 0; 179 state.cursor_valid = "0"b; 180 state.current_mark = 0; 181 state.last_mark_back = 0; 182 tc_data.global_buffer_index = 0; /* the buffer length should be based on line speed or something */ 183 /* this won't be so important after tty_write_whole_string is 184* changed to send a wakeup when space is available. */ 185 tc_data.global_buffer_limit = 256; 186 return; 187 188 shut: 189 entry (TC_data_ptr, Code); 190 191 /* Since we are usually in tc_request on behalf of some window, we need 192* a fabricated window operation structure for tc_block to play with. */ 193 194 /* 195* The following code commented out since it breaks reconnection. 196* Fix it to not cause the terminal_control_disconnection_ signal if 197* we are shutting. Removed for 10.1 installation deadline. 198* 199* dcl 1 dummy_request_header aligned like request_header; 200* 201* Code = 0; 202* tc_data_ptr = TC_data_ptr; 203* request_ptr = addr (dummy_request_header); 204* 205* dummy_request_header.sentinel = REQUEST_SENTINEL; 206* dummy_request_header.request_id = 0; 207* dummy_request_header.window_id = ""b; 208* dummy_request_header.operation = 5; 209* 210* call write_global_buffer (); 211**/ 212 return; 213 214 /* ASSERT: this entrypoint is called MASKED!! */ 215 216 do_output: 217 tc_data_ptr = TC_data_ptr; 218 request_ptr = Request_ptr; 219 last_column = Last_column; 220 ttyvtblp = tc_data.ttt_video_ptr; 221 222 request_header.async_interruption, request_header.this_window = "0"b; 223 224 /* The following test is performed to avoid unnecessary external 225* calls to tc_input for each output operation. Modularity has been 226* sacrificed in the name of efficiency. */ 227 228 if state.echnego_outstanding | (state.pending.count > 0) 229 then call tc_input$check_echnego (tc_data_ptr, request_ptr); 230 231 if tc_data.pending.count > 0 232 then begin; /* Note window hits */ 233 declare wx fixed bin; 234 do wx = 1 to tc_data.pending.count; 235 if request_header.window_id = tc_data.state.pending.blocked_windows (wx) 236 then state_async_same_window (wx) = "1"b; 237 end; 238 end; 239 240 tc_data.change_pclock = tc_data.change_pclock + 1; 241 242 if request_header.operation < lbound (REQUEST, 1) | request_header.operation > hbound (REQUEST, 1) 243 then do; 244 REQUEST (5): 245 call tc_error (video_et_$tc_illegal_request, ""); 246 go to request_done; 247 end; 248 249 /* Come Here if something happened while we blocked and 250* we have to try again */ 251 252 253 recompute_operation_here: /* Make automatic copies of coords for faster procedure calls. 254* This means that any routine that wants to set the coord values 255* had better be called with request_header.row and .col, not 256* the copies. */ 257 request_row = request_header.row; 258 request_col = request_header.col; 259 260 go to REQUEST (request_header.operation); 261 262 /* We should check for insert-mode on certain echoed-input calls, 263* but that will be a limitation for now */ 264 REQUEST (9): /* GET CHARS */ 265 call position_cursor (request_row, request_col); 266 267 /* Don't position the cursor for calls that will not echo. This makes 268* "raw" input work way back up at the iox_ level. */ 269 REQUEST (16): /* READ_ONE */ 270 REQUEST (10): /* GET CHARS NO ECHO */ 271 REQUEST (13): /* READ STATUS */ 272 call write_global_buffer; /* Must do this before input */ 273 call tc_input (tc_data_ptr, request_ptr, code); /* do input req */ 274 go to request_done; 275 276 277 REQUEST (11): /* WRITE SYNC READ */ 278 request_string_ptr = request_read.prompt_ptr; 279 request_string_length = request_read.prompt_length; 280 281 call overwrite_text (request_row, request_col, request_string_ptr, request_string_length); 282 283 call write_global_buffer; /* must dump output before input */ 284 call tc_input (tc_data_ptr, request_ptr, code); 285 286 go to request_done; 287 REQUEST (1): /* POSITION CURSOR */ 288 call position_cursor (request_row, request_col); 289 go to request_done; 290 291 292 REQUEST (2): /* CLEAR REGION */ 293 request_row_count = request_clear_region.rows; 294 request_column_count = request_clear_region.columns; 295 296 call clear_region (request_row, request_col, request_row_count, request_column_count); 297 go to request_done; 298 299 REQUEST (4): /* CLEAR SCREEN NO OPT */ 300 call clear_screen; 301 go to request_done; 302 303 REQUEST (3): /* INSERT_TEXT */ 304 request_string_ptr = request_text.text_ptr; 305 request_string_length = request_text.text_length; 306 307 call insert_text (request_row, request_col, request_string_ptr, request_string_length, last_column); 308 go to request_done; 309 310 REQUEST (14): /* OVERWRITE_TEXT */ 311 request_string_ptr = request_text.text_ptr; 312 request_string_length = request_text.text_length; 313 314 call overwrite_text (request_row, request_col, request_string_ptr, request_string_length); 315 go to request_done; 316 317 REQUEST (15): /* RAW TEXT */ 318 call write_raw_text (request_row, request_col, request_text_string); 319 go to request_done; 320 321 REQUEST (6): /* DELETE CHARS */ 322 call delete_chars (request_row, request_col, request_delete_chars.count, last_column); 323 go to request_done; 324 325 REQUEST (7): /* SCROLL REGION */ 326 request_row = request_scroll_region.start_line; 327 request_row_count = request_scroll_region.n_lines; 328 request_count = request_scroll_region.distance; 329 330 call scroll_region (request_scroll_region.start_line, request_scroll_region.n_lines, 331 request_scroll_region.distance); 332 go to request_done; 333 334 REQUEST (8): /* BELL */ 335 call bell (request_row, request_col); 336 go to request_done; 337 338 REQUEST (12): /* GET POSITION */ 339 request_header.row = state.row; 340 request_header.col = state.col; /* output */ 341 go to request_done; 342 343 344 /* Here begins the hard work */ 345 346 position_cursor: 347 procedure (a_row, a_col); 348 349 declare (a_row, a_col) fixed bin; 350 351 declare (row, col) fixed bin; 352 declare (least_cost, cost_of_abs, cost_of_home, cost_of_cha_cha, cost_of_home_cha_cha) 353 fixed bin; 354 declare 1 ns aligned like new_state; 355 356 /* Put the cursor THERE, in absolute screen coords */ 357 358 row = a_row; 359 col = a_col; 360 361 unspec (ns) = ""b; 362 363 if state.cursor_valid 364 then if state.cursor_position.row = row 365 then if state.cursor_position.col = col 366 then return; 367 368 /* Perhaps we are heading for home? */ 369 /* DUMP ASSUMPTION: HOME is cheaper than anything else. Boy do we need 370* an expense metric. Perhaps weights in the ttt? */ 371 372 ns.pay_attention.position, ns.pay_attention.cursor = "1"b; 373 ns.row = row; 374 ns.col = col; 375 ns.cursor_valid = "1"b; 376 377 if (row = 1) & (col = 1) & available (HOME) 378 then do; /* Lassie come ... */ 379 call do_operation (HOME, 1, 1, 1, ns); 380 return; 381 end; 382 383 /* What follows is a fair, and no better, chooser of method to do 384* an arbitrary position. The faster the terminal, the less important 385* it is to get the least characters. Instead, CPU time should be 386* held down. This approach is middling for both costs */ 387 388 389 /* ASSUME: we can at least do cha-cha (up down right left) or abs pos */ 390 391 392 cost_of_abs = cost (ABS_POS); /* n characters */ 393 cost_of_home = cost (HOME); /* OMEGA if not available */ 394 395 cost_of_cha_cha = OMEGA; /* don't want to do this if we can avoid it */ 396 397 cost_of_home_cha_cha = cost_of_home + cost_repeat (CURSOR_DOWN, row - 1) + cost_repeat (CURSOR_RIGHT, col - 1); 398 399 if state.cursor_valid 400 then do; /* we can only compute a real cha-cha cost if the cursor is valid */ 401 cost_of_cha_cha = 0; 402 if row > state.row 403 then cost_of_cha_cha = cost_of_cha_cha + cost_repeat (CURSOR_DOWN, (row - state.row)); 404 else if row < state.row 405 then cost_of_cha_cha = cost_of_cha_cha + cost_repeat (CURSOR_UP, (state.row - row)); 406 407 408 if col > state.col 409 then cost_of_cha_cha = cost_of_cha_cha + cost_repeat (CURSOR_RIGHT, (col - state.col)); 410 else if col < state.col 411 then cost_of_cha_cha = cost_of_cha_cha + cost_repeat (CURSOR_LEFT, (state.col - col)); 412 end; 413 414 /* cost of cha cha is less than OMEGA iff the required functions were there */ 415 416 least_cost = min (cost_of_abs, cost_of_cha_cha, cost_of_home_cha_cha); 417 if least_cost >= OMEGA 418 then call tc_error (video_et_$tc_cannot_position, ""); 419 420 if cost_of_abs = least_cost 421 then call do_operation (ABS_POS, row, col, (1), ns); 422 /* ns is already correct for atomic position call */ 423 424 else if cost_of_home_cha_cha = least_cost 425 then do; 426 ns.row, ns.col = 1; /* state reflects home call */ 427 call do_operation (HOME, 1, 1, (1), ns); 428 if row > 1 429 then do; 430 ns.row = row; /* now we do just the row */ 431 call do_operation (CURSOR_DOWN, (0), (0), row - 1, ns); 432 end; 433 if col > 1 434 then do; 435 ns.col = col; /* and the col here ... ns.row is correct */ 436 call do_operation (CURSOR_RIGHT, (0), (0), col - 1, ns); 437 end; 438 end; 439 440 else do; /* cha-cha from current cursor position */ 441 ns.cursor_position = state.cursor_position; /* wherever we are */ 442 if row > state.row 443 then do; 444 ns.row = row; /* twiddle row */ 445 call do_operation (CURSOR_DOWN, (0), (0), row - state.row, ns); 446 end; 447 else if row < state.row 448 then do; 449 ns.row = row; 450 call do_operation (CURSOR_UP, (0), (0), state.row - row, ns); 451 end; 452 if col > state.col 453 then do; 454 ns.col = col; 455 call do_operation (CURSOR_RIGHT, (0), (0), col - state.col, ns); 456 end; 457 else if state.col > col 458 then do; 459 ns.col = col; 460 call do_operation (CURSOR_LEFT, (0), (0), state.col - col, ns); 461 end; 462 end; 463 end position_cursor; 464 465 466 clear_screen: 467 procedure; 468 call clear_region_noopt (1, 1, tc_data.terminal.rows, tc_data.terminal.columns); 469 end clear_screen; 470 471 clear_region: 472 procedure (a_row, a_col, a_n_rows, a_n_cols); 473 declare (a_row, a_col, a_n_rows, a_n_cols) 474 fixed bin; 475 declare (row, col, n_rows, n_cols) 476 fixed bin; 477 declare i fixed bin; 478 declare 1 ns aligned like new_state; 479 declare noopt bit (1) aligned; 480 481 noopt = "0"b; 482 go to opt_common; 483 484 clear_region_noopt: 485 entry (a_row, a_col, a_n_rows, a_n_cols); 486 noopt = "1"b; 487 488 opt_common: 489 unspec (ns) = ""b; /* hopefully, we do nuthin */ 490 491 /* copy for call efficiency */ 492 row = a_row; 493 col = a_col; 494 n_rows = a_n_rows; 495 n_cols = a_n_cols; 496 497 /* anything to clear? */ 498 if n_cols = 0 499 then do; 500 call position_cursor (row, col); 501 return; 502 end; 503 504 /* Check for whole screen case. */ 505 if row = 1 & col = 1 & n_rows = tc_data.rows & n_cols = tc_data.columns 506 then if available (CLEAR_SCREEN) 507 then do; 508 call do_operation (CLEAR_SCREEN, (0), (0), (1), ns); 509 return; 510 end; 511 512 /* Check to see if the whole region is already clear. */ 513 if ^noopt & tc_screen$is_region_clear (tc_data.screen_data_ptr, row, col, n_rows, n_cols) 514 then return; 515 516 if (-1 + row + n_rows = tc_data.rows) /* all the rows from here */ 517 & (col = 1) /* starting in first col */ 518 & (n_cols = tc_data.columns) /* full width */ 519 then do; /* EOS */ 520 if available (CLEAR_TO_EOS) 521 then do; 522 call position_cursor (row, col); /* hacks state */ 523 call do_operation (CLEAR_TO_EOS, (0), (0), (1), ns); 524 call position_cursor (row, col); 525 return; 526 end; 527 end; 528 529 if (-1 + col + n_cols = tc_data.columns) /* Full width */ 530 & available (CLEAR_TO_EOL) 531 then do; /* CLEOL assumed better than delete-lines, insert lines */ 532 533 534 do i = row to row + n_rows - 1; 535 if noopt | ^tc_screen$is_region_clear (tc_data.screen_data_ptr, i, col, 1, n_cols) 536 then do; 537 call position_cursor (i, col); 538 call do_operation (CLEAR_TO_EOL, (0), (0), (1), ns); 539 end; 540 end; 541 call position_cursor (row, col); 542 return; 543 end; 544 545 /* But if we cant tell easily that CLEOL is correct, we prefer 546* i-del-lines */ 547 548 if col = 1 & n_cols = tc_data.columns & available (DELETE_LINES) & available (INSERT_LINES) 549 then do; 550 call position_cursor (row, 1); 551 call do_operation (DELETE_LINES, (0), (0), n_rows, ns); 552 if -1 + row + n_rows < tc_data.rows 553 then do; 554 call do_operation (INSERT_LINES, (0), (0), n_rows, ns); 555 call position_cursor (row, col); 556 end; 557 return; 558 end; 559 560 561 /* This is still pretty primitive. I/DEL chars might be 562* faster sometimes */ 563 564 begin; 565 declare n_after fixed bin; 566 declare first_after fixed bin; 567 declare have_cleol bit (1) aligned; 568 569 have_cleol = available (CLEAR_TO_EOL); 570 first_after = col + n_cols; 571 n_after = tc_data.columns - (first_after - 1); 572 573 do i = row to -1 + row + n_rows; 574 if noopt | ^tc_screen$is_region_clear (tc_data.screen_data_ptr, i, col, 1, n_cols) 575 then do; 576 if have_cleol 577 & (noopt | tc_screen$is_region_clear (tc_data.screen_data_ptr, i, first_after, 1, n_after)) 578 then do; 579 call position_cursor (i, col); 580 call do_operation (CLEAR_TO_EOL, (0), (0), (1), ns); 581 end; 582 else do; 583 call position_cursor (i, col);/* erase only as many chars as necessary */ 584 if have_cleol & n_after + cost (CLEAR_TO_EOL) < n_cols 585 /* cheaper to CEOL and repaint stuff to the right? */ 586 then do; /* CEOL and repaint */ 587 call tc_screen$get_in_line (tc_data.screen_data_ptr, i, first_after, save_row); 588 call do_operation (CLEAR_TO_EOL, (0), (0), (1), ns); 589 call position_cursor (i, first_after); 590 call write_text (i, first_after, addr (save_row), length (rtrim (save_row))); 591 end; 592 else do; /* erase with spaces and leave other windows to the right alone */ 593 call tc_screen$get_in_line (tc_data.screen_data_ptr, i, col, save_row); 594 call write_text (i, col, addr (MANY_SPACES), 595 length (rtrim (substr (save_row, 1, n_cols)))); 596 /* write as few spaces as possible */ 597 end; 598 end; 599 end; 600 end; 601 end; 602 call position_cursor (row, col); 603 end clear_region; 604 605 606 insert_text: 607 procedure (a_row, a_col, text_ptr, text_length, last_column); 608 609 declare (a_row, a_col, last_column) 610 fixed bin; 611 612 declare (row, col) fixed bin; 613 declare text_ptr pointer; 614 declare text_length fixed bin (21); 615 declare overwrite bit (1); 616 declare 1 ns aligned like new_state; 617 declare clear_start fixed bin; 618 619 overwrite = "0"b; 620 go to common; 621 622 overwrite_text: 623 entry (a_row, a_col, text_ptr, text_length); 624 625 overwrite = "1"b; 626 627 common: 628 unspec (ns) = ""b; 629 630 row = a_row; 631 col = a_col; 632 633 if overwrite 634 then if state.insert_mode /* could only happen if END avail */ 635 then do; 636 ns.pay_attention.insert = "1"b; 637 ns.insert_mode = "0"b; 638 call do_operation (END_INSERT_CHARS, (0), (0), (1), ns); 639 unspec (ns) = ""b; 640 end; 641 else ; 642 else do; /* request to insert */ 643 if available (END_INSERT_CHARS) & tc_data.columns = last_column 644 then if ^state.insert_mode 645 then do; 646 ns.pay_attention.insert = "1"b; 647 ns.insert_mode = "1"b; 648 call do_operation (INSERT_CHARS, (0), (0), (1), ns); 649 unspec (ns) = ""b; 650 end; 651 else ; 652 else do; /* At this point we know that the terminal does not have 653* an insert-character mode. It may have an "open up 654* some space" insert chars operation, a la the Teleray 655* 1061. If so, we have to call do_operation with the 656* INSERT_CHARS op to get the sequences to the terminal, 657* and then we have to call tc_screen again to update the 658* screen image, since it knows that the INSERT_CHARS op 659* doesn't change the screen on terminals with an insert 660* char mode. The two different types of INSERT_CHARS 661* should have been made two different ops when the TTF 662* video stuff was set up, and should be split when the 663* TTF is upgraded (MR 10.2?). -WMY 7/16/82. */ 664 665 if available (INSERT_CHARS) & tc_data.columns = last_column 666 then do; 667 call do_operation (INSERT_CHARS, (0), (0), (text_length), ns); 668 /* assume no cursor motion */ 669 begin; 670 dcl some_spaces char (text_length) defined (MANY_SPACES) position (1); 671 call tc_screen$text (tc_data.screen_data_ptr, row, col, "1"b /* fake insert mode */, 672 some_spaces); 673 end; 674 end; 675 else do; /* we get here if the terminal doesn't have i-chars 676* or if we aren't the rightmost window */ 677 /* we have no real insert chars operation, so 678* we have to replay the part of the line past 679* the inserted text, so get it from the screen image */ 680 call tc_screen$get_in_line (tc_data.screen_data_ptr, row, col, save_row); 681 call position_cursor (row, col); 682 call write_text (row, col, text_ptr, text_length); 683 684 /* shorten to fit in what's left of the line. */ 685 save_row = substr (save_row, 1, last_column - (col + text_length) + 1); 686 687 /* now strip any trailing whitespace from this new 688* string and write it. */ 689 690 call write_text (row, col + text_length, addr (save_row), length (rtrim (save_row))); 691 /* now clear the rest of the line */ 692 clear_start = col + text_length + length (rtrim (save_row)); 693 call clear_region (row, clear_start, 1, last_column - clear_start + 1); 694 call position_cursor (row, col + text_length); 695 return; 696 end; 697 end; 698 end; 699 700 call position_cursor (row, col); 701 call write_text (row, col, text_ptr, text_length); 702 end insert_text; 703 704 705 delete_chars: 706 procedure (a_row, a_col, a_count, last_column); 707 708 declare (a_row, a_col, a_count, last_column) 709 fixed bin; 710 711 declare (row, col, count) fixed bin; 712 declare 1 ns aligned like new_state; 713 declare clear_start fixed bin; 714 declare write_length fixed bin (21); 715 716 unspec (ns) = ""b; 717 718 row = a_row; 719 col = a_col; 720 count = a_count; 721 722 call position_cursor (row, col); 723 if available (DELETE_CHARS) & last_column = tc_data.columns 724 then call do_operation (DELETE_CHARS, (0), (0), count, ns); 725 else do; /* nasty simulation */ 726 call tc_screen$get_in_line (tc_data.screen_data_ptr, row, col + count, save_row); 727 728 write_length = length (rtrim (substr (save_row, 1, last_column - col - count + 1))); 729 /* be sure not to write in the next window */ 730 call write_text (row, col, addr (save_row), write_length); 731 732 /* now clear the rest of the line. this should help with 733* whitespace optomization. */ 734 clear_start = col + write_length; 735 call clear_region (row, clear_start, 1, last_column - clear_start + 1); 736 call position_cursor (row, col); 737 end; 738 739 end delete_chars; 740 741 742 scroll_region: 743 procedure (a_row, n_rows, a_distance); 744 745 declare (a_row, n_rows, a_distance) 746 fixed bin; 747 748 declare (row, distance) fixed bin; 749 750 declare save_row fixed bin; 751 declare save_col fixed bin; 752 753 declare 1 ns aligned like new_state; 754 755 if ^(available (INSERT_LINES) & available (DELETE_LINES)) 756 then go to capabilities_lacking; /* too hard to simulate */ 757 758 row = a_row; 759 distance = a_distance; 760 761 if distance = 0 762 then return; /* ??? */ 763 764 unspec (ns) = ""b; 765 766 save_row = state.row; 767 save_col = state.col; 768 769 if distance > 0 /* down */ 770 then do; 771 if (row + n_rows - 1) = tc_data.rows 772 then do; /* insert is all we need */ 773 call position_cursor (row, 1); 774 call do_operation (INSERT_LINES, (0), (0), distance, ns); 775 end; 776 else do; 777 call position_cursor (row + n_rows - distance, 1); 778 call do_operation (DELETE_LINES, (0), (0), distance, ns); 779 call position_cursor (row, 1); 780 call do_operation (INSERT_LINES, (0), (0), distance, ns); 781 end; 782 end; 783 else do; /* up */ 784 call position_cursor (row, 1); 785 call do_operation (DELETE_LINES, (0), (0), -distance, ns); 786 if (row + n_rows - 1) ^= tc_data.rows /* bottom region */ 787 then do; 788 call position_cursor (row + n_rows + distance, 1); 789 /* it is negative */ 790 call do_operation (INSERT_LINES, (0), (0), -distance, ns); 791 end; 792 end; 793 794 call position_cursor (save_row, save_col); 795 end scroll_region; 796 797 798 bell: 799 procedure (a_row, a_col); 800 801 declare (a_row, a_col) fixed bin; 802 803 declare (row, col) fixed bin; 804 805 row = a_row; 806 col = a_col; 807 808 call position_cursor (row, col); /* visual effect too */ 809 call write_bell; /* knows it 0 length on screen */ 810 end bell; 811 812 813 cost: 814 procedure (op) returns (fixed bin); 815 declare op fixed bin; 816 817 declare count fixed bin; 818 819 count = 1; 820 go to cost_common; 821 822 cost_repeat: 823 entry (op, a_count) returns (fixed bin); 824 declare a_count fixed bin; 825 826 827 count = a_count; 828 829 cost_common: 830 ttyvseqp = addr (tty_video_table.sequences (op)); 831 if ^tty_video_seq.present 832 then return (OMEGA); /* Quite expensive */ 833 if tty_video_seq.able_to_repeat 834 then return (tty_video_seq.len); 835 else return (count * tty_video_seq.len); 836 837 available: 838 entry (op) returns (bit (1) aligned); 839 840 ttyvseqp = addr (tty_video_table.sequences (op)); 841 return (tty_video_seq.present); 842 843 end cost; 844 845 846 do_operation: 847 procedure (op, a_op_row, a_op_col, op_n, a_new_state); 848 849 /* If op_row or op_col is zero we use current position, if something 850* demands coords. This makes for redundant positions, but so be it for now */ 851 852 /* ASSERT: that even a line's worth of text will fit into 853* the hardcore's take it or leave it buffer. */ 854 855 /* This program manages state. For each operation, it makes 856* the character string for the terminal, and calculates the net 857* effect on the cursor position, updating the state structure, 858* and the screen image via tc_screen. */ 859 860 861 declare (op, op_row, op_col, op_n, a_op_row, a_op_col) 862 fixed binary; 863 864 declare 1 a_new_state aligned like new_state; 865 declare 1 ns aligned like new_state; 866 867 declare 1 seq aligned like tty_video_seq based (ttyvseqp); 868 declare chars character (seq.len) based (chars_ptr); 869 declare chars_ptr pointer; 870 871 872 ttyvseqp = addr (tty_video_table.sequences (op)); /* Do this first do avoid faults in the begin block prologue. */ 873 874 ns = state, by name; 875 if a_new_state.pay_attention.cursor 876 then ns.cursor_valid = a_new_state.cursor_valid; 877 if a_new_state.pay_attention.insert 878 then ns.insert_mode = a_new_state.insert_mode; 879 if a_new_state.pay_attention.position 880 then ns.cursor_position = a_new_state.cursor_position; 881 882 begin; 883 declare i fixed bin; 884 declare loop fixed bin; 885 declare cx fixed bin; 886 declare vchars character (seq.len) defined (tty_video_table.video_chars) 887 position (seq.seq_index); 888 889 op_row = a_op_row; 890 if op_row = 0 891 then op_row = state.row; 892 op_col = a_op_col; 893 if op_col = 0 894 then op_col = state.col; 895 896 /* HOME is a bit magic */ 897 898 if op = HOME 899 then op_row, op_col = 1; 900 if ^seq.present 901 then call tc_error (video_et_$tc_missing_operation, ""); 902 903 chars_ptr = addr (vchars); /* so we can see chars in probe */ 904 905 if ^seq.interpret /* easy */ 906 then do; 907 do i = 1 to op_n; /* supply repeats */ 908 call add_to_buffer (chars); 909 call pad; 910 end; 911 go to update_state; 912 end; 913 914 /* don't bother if nothing is going to happen */ 915 else if (op_n > 0) 916 then do; 917 if seq.able_to_repeat 918 then loop = 1; 919 else loop = op_n; 920 do i = 1 to loop; 921 922 do cx = 1 to seq.len; 923 begin; 924 declare the_char character (1) defined (chars) position (cx); 925 declare 1 encoded unaligned like tty_numeric_encoding based (enc_ptr); 926 declare enc_ptr pointer; 927 928 929 enc_ptr = addr (the_char); 930 931 if ^encoded.must_be_on 932 then call add_to_buffer (the_char); 933 else cx = cx + encode (encoded); 934 end; /* begin */ 935 end; /* do over chars in seq */ 936 call pad; 937 end; /* over repeat count */ 938 end; /* was nontrivial */ 939 update_state: 940 state = ns, by name; 941 942 if op_n > 0 943 then call tc_screen$operation (tc_data.screen_data_ptr, op, op_row, op_col, op_n); 944 end; /* simulated terminal */ 945 return; 946 947 948 pad: 949 procedure; 950 if seq.cpad_present 951 then do; 952 if seq.cpad_in_chars 953 then call add_pad_to_buffer ((seq.cpad)); 954 else call add_pad_to_buffer (divide (seq.cpad /* .0001 secs */ * tc_data.line_speed, 10000, 21, 0)); 955 end; 956 end pad; 957 958 959 encode: 960 procedure (thing) returns (fixed bin); 961 962 /* ASSERT that n is positive. what should negatives look like? */ 963 964 declare 1 thing unaligned like tty_numeric_encoding; 965 declare value fixed bin; 966 declare skip fixed bin; 967 968 skip = 0; 969 go to VALUE (thing.l_c_or_n); 970 971 VALUE (0): /* LINE */ 972 value = op_row; 973 go to got_value; 974 975 VALUE (1): /* COLUMN */ 976 value = op_col; 977 go to got_value; 978 VALUE (2): /* N */ 979 value = op_n; 980 981 got_value: 982 if ^thing.offset_is_0 983 then do; 984 value = value + thing.offset; 985 skip = 1; 986 end; 987 988 989 if thing.express_in_decimal 990 then do; 991 if thing.num_digits = 0 992 then call add_to_buffer_ltrim_char (value); 993 994 else call add_to_buffer_last_n (value, (thing.num_digits)); 995 end; 996 else if thing.express_in_octal 997 then do; /* this is a mess, cause pl1 do not grok octal */ 998 begin; 999 declare bits (-5:6) bit (3) unaligned; 1000 declare ib fixed bin; 1001 declare saw_nonzero bit (1); 1002 declare start fixed bin; 1003 1004 saw_nonzero = "0"b; 1005 unspec (bits) = unspec (value); 1006 if thing.num_digits = 0 1007 then start = 1; 1008 else start = 6 - thing.num_digits + 1; 1009 1010 do ib = start to 6; 1011 if bits (ib) = "000"b 1012 then if saw_nonzero | start > 1 1013 then call add_to_buffer ("0"); 1014 else ; /* suppress */ 1015 else do; 1016 call add_to_buffer (byte (bin (bits (ib), 3) + rank ("0"))); 1017 saw_nonzero = "1"b; 1018 end; 1019 end; 1020 end; /* begin */ 1021 end; /* octalness */ 1022 1023 else call add_to_buffer (byte (value)); 1024 return (skip); 1025 end encode; 1026 1027 end do_operation; 1028 1029 /* parallel routine to do_operation for writing text to the terminal and 1030* updating the screen image. */ 1031 1032 write_text: 1033 procedure (op_row, op_col, text_ptr, text_length); 1034 1035 dcl (op_row, op_col) fixed bin; 1036 dcl text_ptr pointer; 1037 dcl text_length fixed bin (21); 1038 1039 dcl text char (text_length) based (text_ptr); 1040 1041 /* Can not be called with 0 values for row and col. */ 1042 1043 call add_to_buffer_splittable (text_ptr, text_length); 1044 1045 state.row = op_row; 1046 state.col = op_col + text_length; 1047 1048 call tc_screen$text (tc_data.screen_data_ptr, op_row, op_col, (state.insert_mode), text); 1049 return; 1050 1051 write_bell: 1052 entry; 1053 1054 call add_to_buffer (byte (7)); 1055 return; 1056 1057 end write_text; 1058 1059 /* Internal procedures for handling the buffering and sending 1060* of data to ring 0 tty routines. */ 1061 1062 add_to_buffer: 1063 procedure (string); 1064 1065 /* Entry to add a string to the output buffer. Always ensures that the 1066* entire string is added without breaks, so tty sequences won't get broken */ 1067 1068 dcl string character (*); 1069 dcl chunk_length fixed bin; 1070 dcl stuff_idx fixed bin; 1071 dcl ok_to_split bit (1) aligned; 1072 1073 dcl a_stuff_ptr pointer; 1074 dcl a_stuff_length fixed bin (21); 1075 1076 dcl stuff_ptr pointer; 1077 dcl stuff_length fixed bin (21); 1078 1079 dcl stuff char (stuff_length) based (stuff_ptr); 1080 1081 stuff_ptr = addr (string); 1082 stuff_length = length (string); 1083 1084 ok_to_split = "0"b; 1085 goto add_to_buffer_common; 1086 1087 add_to_buffer_splittable: 1088 entry (a_stuff_ptr, a_stuff_length); 1089 1090 /* Entry to write potentially large strings, which can be split up 1091* arbitrarily among different calls to ring 0. */ 1092 1093 stuff_ptr = a_stuff_ptr; 1094 stuff_length = a_stuff_length; 1095 1096 ok_to_split = "1"b; 1097 goto add_to_buffer_common; 1098 1099 add_to_buffer_common: /* Make sure that there is room in the buffer, and flush it 1100* out if it is full. */ 1101 if (tc_data.global_buffer_index + length (stuff)) > tc_data.global_buffer_limit 1102 then if ok_to_split 1103 then do; /* first fill the buffer completely and write it */ 1104 stuff_idx = 1; 1105 1106 do while ((length (stuff) - stuff_idx + 1) > tc_data.global_buffer_limit); 1107 chunk_length = tc_data.global_buffer_limit - tc_data.global_buffer_index; 1108 substr (tc_data.global_output_buffer, tc_data.global_buffer_index + 1, chunk_length) = 1109 substr (stuff, stuff_idx, chunk_length); 1110 tc_data.global_buffer_index = tc_data.global_buffer_limit; 1111 call write_global_buffer; 1112 stuff_idx = stuff_idx + chunk_length; 1113 end; 1114 1115 /* now put the remaining stuff in the buffer */ 1116 chunk_length = length (stuff) - stuff_idx + 1; 1117 substr (tc_data.global_output_buffer, tc_data.global_buffer_index + 1, chunk_length) = 1118 substr (stuff, stuff_idx); 1119 tc_data.global_buffer_index = tc_data.global_buffer_index + chunk_length; 1120 return; 1121 end; 1122 1123 else call write_global_buffer; /* not OK to split */ 1124 1125 /* Add entire string. This better not be bigger than the buffer */ 1126 1127 substr (tc_data.global_output_buffer, tc_data.global_buffer_index + 1, length (stuff)) = stuff; 1128 tc_data.global_buffer_index = tc_data.global_buffer_index + length (stuff); 1129 return; 1130 1131 end add_to_buffer; 1132 1133 add_pad_to_buffer: 1134 procedure (number); 1135 declare number fixed bin; 1136 1137 declare pad_length fixed bin; /* the 254 here is due to a compiler limitation in init clauses */ 1138 declare pad_string char (254) static options (constant) init ((254)""); 1139 1140 pad_length = min (number, length (pad_string)); 1141 begin; 1142 dcl defined_pad char (pad_length) defined (pad_string) pos (1); 1143 call add_to_buffer (defined_pad); 1144 end; 1145 return; 1146 end add_pad_to_buffer; 1147 1148 add_to_buffer_ltrim_char: 1149 procedure (number); 1150 declare number fixed bin; 1151 declare pic_ picture "9999"; 1152 declare char_temp char (4); 1153 declare first_nonspace fixed bin; 1154 1155 pic_ = number; 1156 first_nonspace = verify (pic_, "0"); /* digits start here, there must be 1 */ 1157 if first_nonspace = 0 1158 then first_nonspace = 4; 1159 1160 add_in_number: 1161 char_temp = pic_; 1162 begin; 1163 dcl defined_pic char (length (char_temp) - first_nonspace + 1) defined (char_temp) 1164 pos (first_nonspace); 1165 call add_to_buffer (defined_pic); 1166 end; 1167 return; 1168 1169 add_to_buffer_last_n: 1170 entry (number, digits); 1171 declare digits fixed bin; 1172 1173 pic_ = number; 1174 first_nonspace = 5 - digits; /* first digit we want */ 1175 go to add_in_number; 1176 1177 end add_to_buffer_ltrim_char; 1178 1179 /* Internal routine to write the buffered output to the terminal */ 1180 1181 write_global_buffer: 1182 procedure; 1183 1184 declare to_write character (tc_data.global_buffer_index) 1185 defined (tc_data.global_output_buffer) position (1); 1186 declare n_wrote fixed bin (21); 1187 1188 if length (to_write) = 0 1189 then return; 1190 1191 tc_data.change_pclock = tc_data.change_pclock + 1; 1192 1193 write: 1194 n_wrote = 0; 1195 1196 if tc_data.network_type = DSA_NETWORK_TYPE 1197 then /* DSA */ 1198 call dsa_tty_$write_whole_string (tc_data.tty_handle, to_write, "1"b /* MARK */, n_wrote, tty_state, code); 1199 else if tc_data.network_type = MOWSE_NETWORK_TYPE 1200 then /* MOWSE */ 1201 call ws_tty_$write_whole_string (tc_data.mowse_terminal_iocb_ptr, to_write, "1"b, n_wrote, tty_state, code) 1202 ; 1203 else /* MCS */ 1204 call hcs_$tty_write_whole_string (tc_data.devx, to_write, "1"b /* MARK */, n_wrote, tty_state, code); 1205 1206 if code ^= 0 1207 then call tc_disconnect$check (TC_data_ptr, code); 1208 1209 if code ^= 0 1210 then do; /* If the stuff couldn't be written, all our assumptions about 1211* the cursor position on the actual terminal are wrong. */ 1212 tc_data.state.cursor_valid = "0"b; 1213 call tty_write_error (code); 1214 end; 1215 1216 if length (to_write) > 0 & n_wrote = 0 /* did not happen */ 1217 then do; 1218 if tc_data.network_type ^= MOWSE_NETWORK_TYPE 1219 then call block; 1220 go to write; 1221 end; 1222 call bump_mark; 1223 1224 tc_data.global_buffer_index = 0; /* indicate buffer empty */ 1225 1226 end write_global_buffer; 1227 1228 1229 write_no_mark: 1230 procedure (text); 1231 declare text character (*); 1232 declare n_wrote fixed bin (21); /* ASSERT text_to_echo is aligned */ 1233 declare buffer_ptr pointer; 1234 declare offset fixed bin (21); 1235 declare n_left fixed bin (21); 1236 declare char_offset_ entry (ptr) returns (fixed bin (21)) reducible; 1237 declare add_char_offset_ entry (ptr, fixed bin (21)) returns (ptr) reducible; 1238 1239 if length (text) = 0 1240 then return; 1241 1242 n_left = length (text); 1243 1244 buffer_ptr = addr (text); 1245 offset = char_offset_ (buffer_ptr); 1246 1247 /**** The hardcore demands a word aligned buffer ****/ 1248 1249 if offset > 0 1250 then buffer_ptr = add_char_offset_ (buffer_ptr, -offset); 1251 1252 /* first write out any buffered stuff to get in sync */ 1253 call write_global_buffer; 1254 1255 echo_write: 1256 if tc_data.network_type = DSA_NETWORK_TYPE 1257 then /* DSA */ 1258 call dsa_tty_$write (tc_data.tty_handle, buffer_ptr, offset, n_left, n_wrote, tty_state, code); 1259 else if tc_data.network_type = MOWSE_NETWORK_TYPE 1260 then /* MOWSE */ 1261 call ws_tty_$write (tc_data.mowse_terminal_iocb_ptr, buffer_ptr, offset, n_left, n_wrote, tty_state, code); 1262 else /* MCS */ 1263 call hcs_$tty_write (tc_data.devx, buffer_ptr, offset, n_left, n_wrote, tty_state, code); 1264 1265 if code ^= 0 1266 then call tc_disconnect$check (tc_data_ptr, code); 1267 if code ^= 0 1268 then call tty_write_error (code); 1269 if n_wrote < n_left 1270 then do; /* Lets try it again */ 1271 1272 /* This should NEVER happen. */ 1273 1274 if tc_data.network_type ^= MOWSE_NETWORK_TYPE 1275 then call block; 1276 n_left = n_left - n_wrote; 1277 offset = offset + n_wrote; 1278 go to echo_write; 1279 end; 1280 return; 1281 end write_no_mark; 1282 1283 /* This should be the only non-error return point from tc_request. */ 1284 1285 request_done: 1286 Code = 0; 1287 return; 1288 1289 capabilities_lacking: 1290 Code = video_et_$capability_lacking; 1291 go to request_done; 1292 1293 1294 block: 1295 procedure; 1296 1297 declare UNMASK_NOTHING bit (36) aligned initial ("01"b) internal static options (constant); 1298 1299 call tc_block (tc_data_ptr, request_ptr, UNMASK_NOTHING); 1300 1301 end block; 1302 1303 1304 tty_write_error: 1305 procedure (code); 1306 declare code fixed bin (35); 1307 declare msg character (100) aligned; 1308 declare convert_status_code_ entry (fixed binary (35), character (8) aligned, character (100) aligned); 1309 1310 call convert_status_code_ (code, (8)" ", msg); 1311 call tc_error (video_et_$tc_tty_error, rtrim (msg)); 1312 end tty_write_error; 1313 1314 1315 write_raw_text: 1316 procedure (row, col, text); 1317 declare (row, col) fixed bin; 1318 declare text character (*); 1319 declare n_wrote fixed bin (21); 1320 declare code fixed bin (35); 1321 declare tty_state fixed bin; 1322 declare offset fixed bin (21); 1323 declare text_length fixed bin (21); 1324 1325 if length (text) = 0 1326 then return; 1327 1328 offset = 0; 1329 text_length = length (text); 1330 1331 tc_data.change_pclock = tc_data.change_pclock + 1; 1332 1333 /* first write out any buffered stuff */ 1334 call write_global_buffer; 1335 1336 write: 1337 begin; 1338 declare to_write character (text_length) defined (text) position (1 + offset); 1339 1340 n_wrote = 0; 1341 1342 /* write the whole string at once, with mark */ 1343 1344 if tc_data.network_type = DSA_NETWORK_TYPE 1345 then /* DSA */ 1346 call dsa_tty_$write_whole_string (tc_data.tty_handle, to_write, "1"b /* with mark */, n_wrote, 1347 tty_state, code); 1348 else if tc_data.network_type = MOWSE_NETWORK_TYPE 1349 then /* MOWSE */ 1350 call ws_tty_$write_whole_string (tc_data.mowse_terminal_iocb_ptr, to_write, "1"b, n_wrote, tty_state, 1351 code); 1352 else /* MCS */ 1353 call hcs_$tty_write_whole_string (tc_data.devx, to_write, "1"b /* with mark */, n_wrote, tty_state, 1354 code); 1355 1356 if code ^= 0 1357 then call tc_disconnect$check (tc_data_ptr, code); 1358 if code ^= 0 1359 then call tty_write_error (code); 1360 end; 1361 1362 if n_wrote < text_length 1363 then do; 1364 if tc_data.network_type ^= MOWSE_NETWORK_TYPE 1365 then call block; 1366 text_length = text_length - n_wrote; 1367 offset = offset + n_wrote; 1368 go to write; 1369 end; 1370 state.cursor_valid = "0"b; /* who knows what it did ? */ 1371 call bump_mark; 1372 end write_raw_text; 1373 1374 1375 RECOMPUTE_OPERATION: 1376 if request_header.this_window /* it happened in the same window */ 1377 then go to request_done; 1378 else go to recompute_operation_here; /* was not this window */ 1379 1380 1381 1382 bump_mark: 1383 procedure; 1384 if state.current_mark = 511 /* using the size condition is expensive */ 1385 then do; 1386 state.current_mark = 1; 1387 state.last_mark_back = 0; 1388 end; 1389 state.current_mark = state.current_mark + 1; 1390 end bump_mark; 1391 1392 write_echo: 1393 entry (TC_data_ptr, text_to_echo); 1394 1395 declare text_to_echo character (*) parameter; 1396 1397 tc_data_ptr = TC_data_ptr; 1398 call write_no_mark (text_to_echo); 1399 call tc_screen$text (tc_data.screen_data_ptr, state.row, state.col, "0"b, text_to_echo); 1400 state.col = state.col + length (text_to_echo); 1401 return; 1402 1 1 /* BEGIN INCLUDE FILE ... net_event_message.incl.pl1 */ 1 2 1 3 /****^ HISTORY COMMENTS: 1 4* 1) change(86-07-30,Kissel), approve(86-07-30,MCR7475), audit(86-08-04,Coren), 1 5* install(86-10-09,MR12.0-1181): 1 6* This include file was formerly tty_event_message.incl.pl1. It has been 1 7* updated with different fields and new constants, and renamed to 1 8* net_event_message.incl.pl1 1 9* 2) change(87-04-20,GDixon), approve(87-07-13,MCR7694), 1 10* audit(87-06-24,Hartogs), install(87-08-04,MR12.1-1056): 1 11* Add NETWORK_TYPE_VALUES array. 1 12* END HISTORY COMMENTS */ 1 13 1 14 /* describes event message passed with wakeups from the tty DIM */ 1 15 /* Created 5/24/76 by Robert S. Coren */ 1 16 1 17 /* format: style3,linecom,ifthenstmt,indthenelse,^indnoniterdo,indnoniterend,initcol3,dclind5,idind32 */ 1 18 1 19 dcl net_event_message_arg fixed bin (71); /* For calling IPC */ 1 20 dcl NET_EVENT_MESSAGE_VERSION_1 bit (2) internal static options (constant) init ("10"b); 1 21 1 22 dcl 1 net_event_message aligned based (addr (net_event_message_arg)), 1 23 2 version bit (2) unaligned, /* Currently version 1 */ 1 24 2 reason bit (16) unaligned, /* Additional info about the event */ 1 25 2 pad bit (6) unaligned, /* Must be zero */ 1 26 2 network_type fixed bin (4) unsigned unaligned, 1 27 /* See below for constants */ 1 28 2 type fixed bin (8) unsigned unaligned, 1 29 /* Type of interrupt, see below */ 1 30 2 handle fixed bin (35) aligned;/* Caller's handle (devx for MCS, handle for DSA) */ 1 31 1 32 /* Network type constants */ 1 33 1 34 dcl MCS_NETWORK_TYPE fixed bin (4) unsigned internal static options (constant) init (0); 1 35 dcl DSA_NETWORK_TYPE fixed bin (4) unsigned internal static options (constant) init (1); 1 36 dcl MOWSE_NETWORK_TYPE fixed bin (4) unsigned internal static options (constant) init (2); 1 37 1 38 dcl NETWORK_TYPE_VALUES (0:2) char(8) varying int static options(constant) init( 1 39 "MCS", 1 40 "DSA", 1 41 "MOWSE"); 1 42 1 43 1 44 /* MCS event message type constants */ 1 45 1 46 dcl MAX_MCS_EVENT_MSG_TYPE fixed bin internal static options (constant) init (8); 1 47 1 48 dcl MCS_UNSPECIFIED_MSG fixed bin internal static options (constant) init (0); 1 49 /* used for "start" order, etc. */ 1 50 dcl MCS_DIALUP_MSG fixed bin internal static options (constant) init (1); 1 51 /* dialup */ 1 52 dcl MCS_HANGUP_MSG fixed bin internal static options (constant) init (2); 1 53 /* hangup */ 1 54 dcl MCS_DIALOUT_MSG fixed bin internal static options (constant) init (3); 1 55 /* dialout status returned */ 1 56 dcl MCS_QUIT_MSG fixed bin internal static options (constant) init (4); 1 57 /* quit */ 1 58 dcl MCS_READ_MSG fixed bin internal static options (constant) init (5); 1 59 /* input arrived */ 1 60 dcl MCS_WRITE_MSG fixed bin internal static options (constant) init (6); 1 61 /* output completed */ 1 62 dcl MCS_LINE_STATUS_MSG fixed bin internal static options (constant) init (7); 1 63 /* control tables sent status */ 1 64 dcl MCS_MASKED_MSG fixed bin internal static options (constant) init (8); 1 65 /* channel masked by FNP */ 1 66 1 67 dcl MCS_MSG_TYPE_TO_PNAME (0:8) char (20) internal static options (constant) init ("unspecified", 1 68 /* 0 */ 1 69 "dialup", /* 1 */ 1 70 "hangup", /* 2 */ 1 71 "dialout status", /* 3 */ 1 72 "quit", /* 4 */ 1 73 "read", /* 5 */ 1 74 "write", /* 6 */ 1 75 "line status", /* 7 */ 1 76 "masked"); /* 8 */ 1 77 1 78 /* DSA event message type constants */ 1 79 1 80 dcl MAX_DSA_EVENT_MSG_TYPE fixed bin internal static options (constant) init (19); 1 81 1 82 dcl DSA_UNSPECIFIED_MSG fixed bin (8) uns internal static options (constant) init (0); 1 83 dcl DSA_ATTENTION_MSG fixed bin (8) uns internal static options (constant) init (1); 1 84 dcl DSA_DATA_ATTENTION_MSG fixed bin (8) uns internal static options (constant) init (2); 1 85 dcl DSA_DEMAND_RELEASE_SRU_MSG fixed bin (8) uns internal static options (constant) init (3); 1 86 dcl DSA_DEMAND_TURN_MSG fixed bin (8) uns internal static options (constant) init (4); 1 87 dcl DSA_DEMAND_TURN_ACK_MSG fixed bin (8) uns internal static options (constant) init (5); 1 88 dcl DSA_PURGE_MSG fixed bin (8) uns internal static options (constant) init (6); 1 89 dcl DSA_RECOVER_MSG fixed bin (8) uns internal static options (constant) init (7); 1 90 dcl DSA_RECOVER_ACK_MSG fixed bin (8) uns internal static options (constant) init (8); 1 91 dcl DSA_RELEASE_SRU_MSG fixed bin (8) uns internal static options (constant) init (9); 1 92 dcl DSA_RESUME_MSG fixed bin (8) uns internal static options (constant) init (10); 1 93 dcl DSA_RESUME_ACK_MSG fixed bin (8) uns internal static options (constant) init (11); 1 94 dcl DSA_SUSPEND_MSG fixed bin (8) uns internal static options (constant) init (12); 1 95 dcl DSA_SUSPEND_ACK_MSG fixed bin (8) uns internal static options (constant) init (13); 1 96 dcl DSA_TERM_ABNORMAL_MSG fixed bin (8) uns internal static options (constant) init (14); 1 97 dcl DSA_ESTABLISHMENT_MSG fixed bin (8) uns internal static options (constant) init (15); 1 98 dcl DSA_TERMINATED_MSG fixed bin (8) uns internal static options (constant) init (16); 1 99 dcl DSA_USER_UNASSIGN_MSG fixed bin (8) uns internal static options (constant) init (17); 1 100 dcl DSA_DATA_INPUT_MSG fixed bin (8) uns internal static options (constant) init (18); 1 101 dcl DSA_DATA_OUTPUT_MSG fixed bin (8) uns internal static options (constant) init (19); 1 102 1 103 dcl DSA_MSG_TYPE_TO_PNAME (0:19) char (20) internal static options (constant) init ("unspecified", 1 104 /* 0 */ 1 105 "attention", /* 1 */ 1 106 "data_attention", /* 2 */ 1 107 "demand_release_sru", /* 3 */ 1 108 "demand_turn", /* 4 */ 1 109 "demand_turn_ack", /* 5 */ 1 110 "purge", /* 6 */ 1 111 "recover", /* 7 */ 1 112 "recover_ack", /* 8 */ 1 113 "release_sru", /* 9 */ 1 114 "resume", /* 10 */ 1 115 "resume_ack", /* 11 */ 1 116 "suspend", /* 12 */ 1 117 "suspend_ack", /* 13 */ 1 118 "terminate_abnormal", /* 14 */ 1 119 "establishment", /* 15 */ 1 120 "terminated", /* 16 */ 1 121 "user_unassign", /* 17 */ 1 122 "data input", /* 18 */ 1 123 "data output"); /* 19 */ 1 124 1 125 /* END INCLUDE FILE ... net_event_message.incl.pl1 */ 1403 1404 2 1 /* BEGIN INCLUDE FILE tc_data_.incl.pl1 BIM May 1981 */ 2 2 2 3 2 4 /****^ HISTORY COMMENTS: 2 5* 1) change(86-07-22,LJAdams), approve(86-11-13,MCR7485), 2 6* audit(86-12-19,Margolin), install(87-01-06,MR12.0-1255): 2 7* Added mowse_terminal_iocb_ptr field. 2 8* 2) change(86-11-26,LJAdams), approve(86-11-26,MCR7584), 2 9* audit(86-12-19,Margolin), install(87-01-06,MR12.0-1255): 2 10* tty_handle component has been added for DSA. 2 11* END HISTORY COMMENTS */ 2 12 2 13 2 14 /* Modified DEC 1985 by R. Negaret to add network_type and tty_handle */ 2 15 /* format: style3 */ 2 16 /* This data structure should contain the information 2 17* to run terminal control, regardless of what I/O module 2 18* it happens to live in */ 2 19 2 20 declare tc_data_ptr pointer; 2 21 declare 1 tc_data aligned based (tc_data_ptr), 2 22 2 network_type fixed bin, /* Identification of the network: 2 23* MCS_NETWORK_TYPE, DSA_NETWORK_TYPE, ... */ 2 24 2 devx fixed bin, /* hardcore devx */ 2 25 2 tty_handle fixed bin (35), 2 26 2 event fixed bin (71), /* tty_index wakes this up */ 2 27 2 mowse_terminal_iocb_ptr 2 28 ptr, /* ptr to mowse_terminal_ switch */ 2 29 2 change_pclock fixed bin (35), /* for detecting async happenings */ 2 30 2 ttp character (32) unaligned, /* terminal type */ 2 31 2 ttt_video_ptr pointer, 2 32 2 breaktest bit (128) unaligned, 2 33 2 terminal aligned, 2 34 3 rows fixed bin, /* mostly for better name */ 2 35 3 columns fixed bin, 2 36 3 line_speed fixed bin, 2 37 2 state aligned like terminal_state, 2 38 2 tty_read_buffer character (1024) unaligned, /* should suffice */ 2 39 2 input_buffer_ptr 2 40 pointer, 2 41 2 screen_data_ptr pointer, 2 42 2 desk_ptr pointer, /* table of windows */ 2 43 2 old_mode_string character (512) unaligned, 2 44 2 global_buffer_index 2 45 fixed bin, 2 46 2 global_buffer_limit 2 47 fixed bin, 2 48 2 global_output_buffer 2 49 char (512) unaligned; 2 50 2 51 2 52 declare tc_break_array (0:127) bit (1) unaligned defined (tc_data.breaktest) position (1); 2 53 2 54 declare 1 terminal_state aligned based, 2 55 2 flags aligned, 2 56 3 insert_mode bit (1) unaligned, 2 57 3 cursor_valid bit (1) unaligned, /* we know pos */ 2 58 3 echnego_outstanding 2 59 bit (1) unaligned, 2 60 3 mark_outstanding 2 61 bit (1) unaligned, 2 62 3 pad bit (32) unaligned, 2 63 2 pending aligned, 2 64 3 count fixed bin, /* count of invocations blocked */ 2 65 3 input_count fixed bin, /* how many are input */ 2 66 3 protocol_evs (72) fixed bin (71), /* yea, too damn big */ 2 67 3 have_sent_protocol 2 68 bit (72) unaligned, 2 69 3 async_same_window 2 70 bit (72) unaligned, /* for reflection back to blocking window */ 2 71 3 blocked_windows 2 72 (72) bit (36) aligned, /* only 1:count are valid */ 2 73 2 cursor_position aligned, /* respectable only if valid */ 2 74 3 row fixed bin, 2 75 3 col fixed bin, 2 76 2 current_mark fixed bin (9) unsigned, 2 77 2 last_mark_back fixed bin (9) unsigned; 2 78 2 79 declare state_async_same_window 2 80 (72) bit (1) unaligned defined (tc_data.state.pending.async_same_window) position (1); 2 81 2 82 declare state_have_sent_protocol 2 83 (72) bit (1) unaligned defined (tc_data.state.pending.have_sent_protocol) position (1); 2 84 2 85 /* END INCLUDE FILE tc_data_.incl.pl1 */ 1405 1406 3 1 /* BEGIN INCLUDE FILE tc_operations_.incl.pl1 BIM May 1981 */ 3 2 3 3 /* Modified 7 February 1985 by Jon Rochlis to add saved_ips_mask to 3 4* request_header. */ 3 5 3 6 /* format: style3 */ 3 7 3 8 /* These are the operations that the "virtual video terminal" is expected to 3 9*provide. These are the primitive operation. For example, the various 3 10*flavors of region clearing are collapsed into "clear region". The particular 3 11*operations of clear screen, clear to end of screen, and clear to end of line 3 12*are special cases which will be used when terminal functionality permits. Of 3 13*course, at the user interface level, these are provided as convienience. 3 14*This introduces the innefficiency of mapping CLEOL -> CL-REGION -> CLEOL. 3 15*However, CLEOL _i_n _a _w_i_n_d_o_w does not always mean CLEOL on the screen. It will 3 16*not unless the window is full width, or happens to be rightmost. Similiarly, 3 17*a user call of CLEAR_WINDOW is just a region to the terminal. */ 3 18 3 19 declare request_ptr pointer; 3 20 declare REQUEST_SENTINEL character (4) aligned init ("RqqS") internal static options (constant); 3 21 3 22 declare 1 request_header aligned based (request_ptr), 3 23 2 sentinel character (4) aligned, 3 24 2 request_id fixed bin (71), /* Clock Value */ 3 25 2 window_id bit (36) aligned, 3 26 2 coords aligned like r_coords, 3 27 2 operation fixed bin, 3 28 2 flags aligned, 3 29 3 async_interruption 3 30 bit (1) unaligned, /* Output */ 3 31 3 this_window bit (1) unaligned, /* ditto */ 3 32 2 saved_ips_mask bit (36) aligned; /* so tc_block can restore mask from window_io_ */ 3 33 3 34 declare 1 r_coords aligned based, 3 35 2 row fixed bin, 3 36 2 col fixed bin; 3 37 3 38 declare OP_ERROR fixed bin initial (0) internal static options (constant); 3 39 declare OP_POSITION_CURSOR fixed bin initial (1) internal static options (constant); 3 40 3 41 declare OP_CLEAR_REGION fixed bin initial (2) internal static options (constant); 3 42 3 43 /* This next one is for the TC operation of clearing terminal without 3 44* any assumptions, used when the user indicates screen damage, or on 3 45* reconnection. */ 3 46 3 47 declare OP_CLEAR_SCREEN_NO_OPT 3 48 fixed bin init (4) internal static options (constant); 3 49 3 50 declare 1 request_clear_region 3 51 aligned based (request_ptr), 3 52 2 header aligned like request_header, 3 53 2 by_name aligned, 3 54 3 extent aligned, 3 55 4 rows fixed bin, 3 56 4 columns fixed bin; 3 57 3 58 declare OP_INSERT_TEXT fixed bin initial (3) internal static options (constant); 3 59 3 60 declare 1 request_text aligned based (request_ptr), 3 61 2 header aligned like request_header, 3 62 2 by_name aligned, 3 63 3 text_ptr pointer, 3 64 3 text_length fixed bin (21); 3 65 3 66 declare request_text_string character (request_text.text_length) based (request_text.text_ptr); 3 67 3 68 declare OP_DELETE_CHARS fixed bin initial (6) internal static options (constant); 3 69 3 70 declare 1 request_delete_chars 3 71 aligned based (request_ptr), 3 72 2 header aligned like request_header, 3 73 2 by_name aligned, 3 74 3 count fixed bin; 3 75 3 76 declare OP_SCROLL_REGION fixed bin initial (7) internal static options (constant); 3 77 3 78 declare 1 request_scroll_region 3 79 aligned based (request_ptr), 3 80 2 header aligned like request_header, 3 81 2 by_name aligned, 3 82 3 start_line fixed bin, 3 83 3 n_lines fixed bin, 3 84 3 distance fixed bin; 3 85 3 86 declare OP_BELL fixed bin initial (8) internal static options (constant); 3 87 declare OP_GET_CHARS_ECHO fixed bin initial (9) internal static options (constant); 3 88 declare OP_GET_CHARS_NO_ECHO 3 89 fixed bin initial (10) internal static options (constant); 3 90 declare OP_WRITE_SYNC_GET_CHARS_NO_ECHO 3 91 fixed bin initial (11) internal static options (constant); 3 92 3 93 declare 1 request_read_status 3 94 aligned based (request_ptr), 3 95 2 header aligned like request_header, 3 96 2 by_name aligned, /* not used as such */ 3 97 3 returned_length 3 98 fixed bin, 3 99 3 event_channel fixed bin (71); 3 100 3 101 declare 1 request_read aligned based (request_ptr), 3 102 2 header aligned like request_header, 3 103 2 by_name aligned, 3 104 3 buffer_ptr pointer, 3 105 3 buffer_length fixed bin (21), 3 106 3 returned_length 3 107 fixed bin (21), 3 108 3 returned_break_flag 3 109 bit (1) aligned, 3 110 3 prompt_ptr pointer, 3 111 3 prompt_length fixed bin (21), 3 112 3 breaks bit (128) unaligned; 3 113 3 114 3 115 declare request_prompt character (request_read.prompt_length) based (request_read.prompt_ptr); 3 116 declare request_buffer character (request_read.buffer_length) based (request_read.buffer_ptr); 3 117 3 118 declare OP_GET_CURSOR_POSITION 3 119 fixed bin initial (12) internal static options (constant); 3 120 declare OP_READ_STATUS fixed bin initial (13) internal static options (constant); 3 121 declare OP_OVERWRITE_TEXT fixed bin initial (14) internal static options (constant); 3 122 declare OP_WRITE_RAW fixed bin initial (15) internal static options (constant); 3 123 declare OP_READ_ONE fixed bin initial (16) internal static options (constant); 3 124 3 125 /* use request_read, and return the character in the buffer there */ 3 126 /* pass the BLOCK flag in in break_flag. Well... */ 3 127 3 128 /* END INCLUDE FILE tc_operations_.incl.pl1 */ 1407 1408 4 1 /* BEGIN INCLUDE FILE condition_info_header.incl.pl1 BIM 1981 */ 4 2 /* format: style2 */ 4 3 4 4 declare condition_info_header_ptr 4 5 pointer; 4 6 declare 1 condition_info_header 4 7 aligned based (condition_info_header_ptr), 4 8 2 length fixed bin, /* length in words of this structure */ 4 9 2 version fixed bin, /* version number of this structure */ 4 10 2 action_flags aligned, /* tell handler how to proceed */ 4 11 3 cant_restart bit (1) unaligned, /* caller doesn't ever want to be returned to */ 4 12 3 default_restart bit (1) unaligned, /* caller can be returned to with no further action */ 4 13 3 quiet_restart bit (1) unaligned, /* return, and print no message */ 4 14 3 support_signal bit (1) unaligned, /* treat this signal as if the signalling procedure had the support bit set */ 4 15 /* if the signalling procedure had the support bit set, do the same for its caller */ 4 16 3 pad bit (32) unaligned, 4 17 2 info_string char (256) varying, /* may contain printable message */ 4 18 2 status_code fixed bin (35); /* if^=0, code interpretable by com_err_ */ 4 19 4 20 /* END INCLUDE FILE condition_info_header.incl.pl1 */ 1409 1410 5 1 /* Begin include file tc_asyncronity_info.incl.pl1 BIM June 1981 */ 5 2 /* format: style3 */ 5 3 /* include condition_info_header along with this */ 5 4 5 5 declare tc_asyncronity_ condition; 5 6 declare TC_ASYNCRONITY_CONDITION_NAME 5 7 character (15) init ("tc_asyncronity_") internal static options (constant); 5 8 5 9 declare tc_async_info_ptr pointer; 5 10 declare 1 tc_async_info aligned based (tc_async_info_ptr), 5 11 2 header aligned like condition_info_header, 5 12 2 flags aligned, 5 13 3 input bit (1) unaligned, /* we are interrupting an input request */ 5 14 3 pad bit (35) unaligned, 5 15 2 request_id fixed bin (71), 5 16 2 window_id bit (36) aligned; 5 17 5 18 /* the windows do not return any state here. Since there may 5 19* be more than one invocation of tc on the stack, the window 5 20* must set the info in its own request structure. this 5 21* will happen redundantly, because each invocation of tc_request 5 22* will signal up this structure (unless its throw bit has been set). 5 23**/ 5 24 5 25 /* End include file tc_asyncronity_info.incl.pl1 */ 1411 1412 6 1 /* BEGIN INCLUDE FILE... tty_video_tables.incl.pl1 */ 6 2 /* Created: 3 June 1979 by Bernard S. Greenberg */ 6 3 /* Modified: 9 June 1981 by G. Palter to switch to line/column orientation */ 6 4 6 5 /* Definition of the video operations supported by a terminal */ 6 6 6 7 dcl tty_video_tables_version_1 fixed binary static options (constant) initial (1); 6 8 6 9 dcl ttyvtblp pointer; 6 10 dcl tty_video_table_video_chars_len fixed binary (21); 6 11 6 12 dcl 1 tty_video_table aligned based (ttyvtblp), 6 13 2 version fixed binary initial (tty_video_tables_version_1), 6 14 2 screen_height fixed binary, /* # of lines on screen */ 6 15 2 screen_line_length fixed binary, /* # of characters on a line */ 6 16 2 scroll_count fixed binary, /* # of lines scrolled by LF at bottom */ 6 17 2 flags, 6 18 3 overstrike_available bit (1) unaligned, /* ON => overstrike works */ 6 19 3 automatic_crlf bit (1) unaligned, /* ON => automatically goes to next line from last column */ 6 20 3 simulate_eol bit (1) unaligned, /* ON => program must simulate clear-to-end-of-line */ 6 21 3 pad bit (33) unaligned, 6 22 2 video_chars_len fixed binary (21), /* combined length of all sequences used */ 6 23 2 pad (2) bit (36), 6 24 2 nseq fixed binary, /* # of video sequences defined */ 6 25 2 sequences (N_VIDEO_SEQUENCES refer (tty_video_table.nseq)) like tty_video_seq aligned, 6 26 /* the control sequences */ 6 27 2 video_chars character (tty_video_table_video_chars_len refer (tty_video_table.video_chars_len)) unaligned; 6 28 6 29 dcl video_chars_ptr pointer; /* -> tty_video_table.video_chars */ 6 30 dcl video_chars character (tty_video_table.video_chars_len) based (video_chars_ptr); 6 31 6 32 6 33 /* A single video sequence: it may contain encoded screen coordinates or a repeat counter */ 6 34 6 35 dcl ttyvseqp pointer; 6 36 6 37 dcl 1 tty_video_seq based (ttyvseqp) aligned, 6 38 2 flags unaligned, /* first 2 characters */ 6 39 3 present bit (1) unaligned, /* ON => this feature is present */ 6 40 3 interpret bit (1) unaligned, /* ON => sequence contains encoded coordinates/repeat count */ 6 41 3 able_to_repeat bit (1) unaligned, /* ON => sequence contains a repeat count */ 6 42 3 cpad_present bit (1) unaligned, /* ON => this operation must be padded */ 6 43 3 cpad_in_chars bit (1) unaligned, /* ON => pad expressed in characters */ 6 44 3 pad bit (7) unaligned, 6 45 3 general bit (6) unaligned, /* reserved for per-operation flags */ 6 46 2 cpad fixed binary (18) unsigned unaligned, /* padding in characters of .1 millisecond units */ 6 47 2 pad bit (15) unal, 6 48 2 len fixed binary (9) unsigned unaligned, /* # of valid characters in sequence */ 6 49 2 seq_index fixed binary (12) unsigned unaligned; /* start of string in character data */ 6 50 6 51 6 52 /* Available operations */ 6 53 6 54 dcl (ABS_POS initial (1), CLEAR_SCREEN initial (2), 6 55 CLEAR_TO_EOS initial (3), HOME initial (4), 6 56 CLEAR_TO_EOL initial (5), CURSOR_UP initial (6), 6 57 CURSOR_RIGHT initial (7), CURSOR_DOWN initial (8), 6 58 CURSOR_LEFT initial (9), INSERT_CHARS initial (10), 6 59 END_INSERT_CHARS /* if not present, insert-chars opens up N spaces */ 6 60 initial (11), DELETE_CHARS initial (12), 6 61 INSERT_LINES initial (13), DELETE_LINES initial (14)) 6 62 fixed binary static options (constant); 6 63 6 64 dcl N_VIDEO_SEQUENCES fixed binary static options (constant) initial (14); 6 65 6 66 6 67 /* Encoding of special values (eg: coordinates or the repeat count) */ 6 68 6 69 dcl 1 tty_numeric_encoding based unaligned, 6 70 2 flags, 6 71 3 must_be_on bit (1) unaligned, /* ON => an encoding; not a character */ 6 72 3 express_in_decimal bit (1) unaligned, /* ON => express it as decimal digits */ 6 73 3 express_in_octal bit (1) unaligned, /* ON => express it as octal digits; both OFF => in binary */ 6 74 6 75 3 offset_is_0 bit (1) unaligned, /* ON => offset is not stored as it's zero */ 6 76 2 l_c_or_n fixed binary (2) unsigned unaligned, /* 0 = line, 1= column, 2 = repeat-count */ 6 77 2 num_digits fixed bin (2) unsigned unaligned, /* # of digits for decimal/octal; 0 => as many as needed */ 6 78 2 pad bit (1) unaligned, 6 79 2 offset fixed bin (8) unaligned; /* offset to add to the number */ 6 80 6 81 /* END INCLUDE FILE tty_video_tables.incl.pl1 */ 1413 1414 1415 end tc_request; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 08/13/87 1323.6 tc_request.pl1 >special_ldd>install>MR12.1-1086>tc_request.pl1 1403 1 08/06/87 0913.5 net_event_message.incl.pl1 >ldd>include>net_event_message.incl.pl1 1405 2 01/06/87 1357.0 tc_data_.incl.pl1 >ldd>include>tc_data_.incl.pl1 1407 3 03/12/85 0930.8 tc_operations_.incl.pl1 >ldd>include>tc_operations_.incl.pl1 1409 4 03/24/82 1347.2 condition_info_header.incl.pl1 >ldd>include>condition_info_header.incl.pl1 1411 5 03/27/82 0424.8 tc_asyncronity_info.incl.pl1 >ldd>include>tc_asyncronity_info.incl.pl1 1413 6 08/11/81 1106.2 tty_video_tables.incl.pl1 >ldd>include>tty_video_tables.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. ABS_POS constant fixed bin(17,0) initial dcl 6-54 set ref 392* 420* CLEAR_SCREEN constant fixed bin(17,0) initial dcl 6-54 set ref 505* 508* CLEAR_TO_EOL constant fixed bin(17,0) initial dcl 6-54 set ref 529* 538* 569* 580* 584* 588* CLEAR_TO_EOS constant fixed bin(17,0) initial dcl 6-54 set ref 520* 523* CURSOR_DOWN 000031 constant fixed bin(17,0) initial dcl 6-54 set ref 397* 402* 431* 445* CURSOR_LEFT constant fixed bin(17,0) initial dcl 6-54 set ref 410* 460* CURSOR_RIGHT constant fixed bin(17,0) initial dcl 6-54 set ref 397* 408* 436* 455* CURSOR_UP constant fixed bin(17,0) initial dcl 6-54 set ref 404* 450* Code parameter fixed bin(35,0) dcl 96 set ref 92 188 1285* 1289* DELETE_CHARS 000026 constant fixed bin(17,0) initial dcl 6-54 set ref 723* 723* DELETE_LINES 000024 constant fixed bin(17,0) initial dcl 6-54 set ref 548* 551* 755* 778* 785* DSA_NETWORK_TYPE constant fixed bin(4,0) initial unsigned dcl 1-35 ref 1196 1255 1344 END_INSERT_CHARS 000027 constant fixed bin(17,0) initial dcl 6-54 set ref 638* 643* HOME constant fixed bin(17,0) initial dcl 6-54 set ref 377* 379* 393* 427* 898 INSERT_CHARS 000030 constant fixed bin(17,0) initial dcl 6-54 set ref 648* 665* 667* INSERT_LINES 000025 constant fixed bin(17,0) initial dcl 6-54 set ref 548* 554* 755* 774* 780* 790* Last_column parameter fixed bin(17,0) dcl 96 ref 92 219 MANY_SPACES 006472 constant char(256) initial unaligned dcl 142 set ref 594 594 671 671 MOWSE_NETWORK_TYPE constant fixed bin(4,0) initial unsigned dcl 1-36 ref 1199 1218 1259 1274 1348 1364 OMEGA constant fixed bin(17,0) initial dcl 140 ref 395 417 831 Request_ptr parameter pointer dcl 96 ref 92 218 TC_data_ptr parameter pointer dcl 96 set ref 92 174 177 188 216 1206* 1392 1397 UNMASK_NOTHING 000023 constant bit(36) initial dcl 1297 set ref 1299* a_col parameter fixed bin(17,0) dcl 801 in procedure "bell" ref 798 806 a_col parameter fixed bin(17,0) dcl 473 in procedure "clear_region" ref 471 484 493 a_col parameter fixed bin(17,0) dcl 708 in procedure "delete_chars" ref 705 719 a_col parameter fixed bin(17,0) dcl 609 in procedure "insert_text" ref 606 622 631 a_col parameter fixed bin(17,0) dcl 349 in procedure "position_cursor" ref 346 359 a_count parameter fixed bin(17,0) dcl 824 in procedure "cost" ref 822 827 a_count parameter fixed bin(17,0) dcl 708 in procedure "delete_chars" ref 705 720 a_distance parameter fixed bin(17,0) dcl 745 ref 742 759 a_n_cols parameter fixed bin(17,0) dcl 473 ref 471 484 495 a_n_rows parameter fixed bin(17,0) dcl 473 ref 471 484 494 a_new_state parameter structure level 1 dcl 864 ref 846 a_op_col parameter fixed bin(17,0) dcl 861 ref 846 892 a_op_row parameter fixed bin(17,0) dcl 861 ref 846 889 a_row parameter fixed bin(17,0) dcl 609 in procedure "insert_text" ref 606 622 630 a_row parameter fixed bin(17,0) dcl 473 in procedure "clear_region" ref 471 484 492 a_row parameter fixed bin(17,0) dcl 801 in procedure "bell" ref 798 805 a_row parameter fixed bin(17,0) dcl 708 in procedure "delete_chars" ref 705 718 a_row parameter fixed bin(17,0) dcl 745 in procedure "scroll_region" ref 742 758 a_row parameter fixed bin(17,0) dcl 349 in procedure "position_cursor" ref 346 358 a_stuff_length parameter fixed bin(21,0) dcl 1074 ref 1087 1094 a_stuff_ptr parameter pointer dcl 1073 ref 1087 1093 able_to_repeat 0(02) based bit(1) level 3 in structure "tty_video_seq" packed unaligned dcl 6-37 in procedure "tc_request" ref 833 able_to_repeat 0(02) based bit(1) level 3 in structure "seq" packed unaligned dcl 867 in procedure "do_operation" ref 917 add_char_offset_ 000062 constant entry external dcl 1237 ref 1249 addr builtin function dcl 156 ref 590 590 594 594 690 690 730 730 829 840 872 903 929 1081 1244 async_interruption 10 based bit(1) level 3 packed unaligned dcl 3-22 set ref 222* async_same_window 262 based bit(72) level 4 packed unaligned dcl 2-21 set ref 235* 235 bin builtin function dcl 156 ref 1016 1016 bits 000446 automatic bit(3) array unaligned dcl 999 set ref 1005* 1011 1016 1016 blocked_windows 264 based bit(36) array level 4 dcl 2-21 set ref 235 buffer_ptr 000550 automatic pointer dcl 1233 set ref 1244* 1245* 1249* 1249* 1255* 1259* 1262* by_name 12 based structure level 2 in structure "request_read" dcl 3-101 in procedure "tc_request" by_name 12 based structure level 2 in structure "request_scroll_region" dcl 3-78 in procedure "tc_request" by_name 12 based structure level 2 in structure "request_clear_region" dcl 3-50 in procedure "tc_request" by_name 12 based structure level 2 in structure "request_text" dcl 3-60 in procedure "tc_request" by_name 12 based structure level 2 in structure "request_delete_chars" dcl 3-70 in procedure "tc_request" byte builtin function dcl 156 ref 1016 1016 1023 1023 1054 1054 change_pclock 10 based fixed bin(35,0) level 2 dcl 2-21 set ref 240* 240 1191* 1191 1331* 1331 char_offset_ 000060 constant entry external dcl 1236 ref 1245 char_temp 000517 automatic char(4) unaligned dcl 1152 set ref 1160* 1163 1165 1165 chars based char unaligned dcl 868 set ref 908* 929 929 931 931 chars_ptr 000404 automatic pointer dcl 869 set ref 903* 908 929 931 chunk_length 000466 automatic fixed bin(17,0) dcl 1069 set ref 1107* 1108 1108 1112 1116* 1117 1119 clear_start 000325 automatic fixed bin(17,0) dcl 713 in procedure "delete_chars" set ref 734* 735* 735 clear_start 000305 automatic fixed bin(17,0) dcl 617 in procedure "insert_text" set ref 692* 693* 693 code 000175 automatic fixed bin(35,0) dcl 154 in procedure "tc_request" set ref 273* 284* 1196* 1199* 1203* 1206 1206* 1209 1213* 1255* 1259* 1262* 1265 1265* 1267 1267* code 000631 automatic fixed bin(35,0) dcl 1320 in procedure "write_raw_text" set ref 1344* 1348* 1352* 1356 1356* 1358 1358* code parameter fixed bin(35,0) dcl 1306 in procedure "tty_write_error" set ref 1304 1310* col parameter fixed bin(17,0) dcl 1317 in procedure "write_raw_text" ref 1315 col 3 000227 automatic fixed bin(17,0) level 3 in structure "ns" dcl 354 in procedure "position_cursor" set ref 374* 426* 435* 454* 459* col 000251 automatic fixed bin(17,0) dcl 475 in procedure "clear_region" set ref 493* 500* 505 513* 516 522* 524* 529 535* 537* 541* 548 555* 570 574* 579* 583* 593* 594* 602* col 000221 automatic fixed bin(17,0) dcl 351 in procedure "position_cursor" set ref 359* 363 374 377 397 408 408 410 410 420* 433 435 436 452 454 455 457 459 460 col 000317 automatic fixed bin(17,0) dcl 711 in procedure "delete_chars" set ref 719* 722* 726 728 730* 734 736* col 000277 automatic fixed bin(17,0) dcl 612 in procedure "insert_text" set ref 631* 671* 680* 681* 682* 685 690 692 694 700* 701* col 375 based fixed bin(17,0) level 4 in structure "tc_data" dcl 2-21 in procedure "tc_request" set ref 340 363 408 408 410 410 452 455 457 460 767 893 1046* 1399* 1400* 1400 col 000355 automatic fixed bin(17,0) dcl 803 in procedure "bell" set ref 806* 808* col 6 based fixed bin(17,0) level 3 in structure "request_header" dcl 3-22 in procedure "tc_request" set ref 258 340* columns 13 based fixed bin(17,0) level 4 in structure "request_clear_region" dcl 3-50 in procedure "tc_request" ref 294 columns 31 based fixed bin(17,0) level 3 in structure "tc_data" dcl 2-21 in procedure "tc_request" set ref 468* 505 516 529 548 571 643 665 723 condition_info_header based structure level 1 dcl 4-6 convert_status_code_ 000064 constant entry external dcl 1308 ref 1310 coords 5 based structure level 2 dcl 3-22 cost_of_abs 000223 automatic fixed bin(17,0) dcl 352 set ref 392* 416 420 cost_of_cha_cha 000225 automatic fixed bin(17,0) dcl 352 set ref 395* 401* 402* 402 404* 404 408* 408 410* 410 416 cost_of_home 000224 automatic fixed bin(17,0) dcl 352 set ref 393* 397 cost_of_home_cha_cha 000226 automatic fixed bin(17,0) dcl 352 set ref 397* 416 424 count 12 based fixed bin(17,0) level 3 in structure "request_delete_chars" dcl 3-70 in procedure "tc_request" set ref 321* count 36 based fixed bin(17,0) level 4 in structure "tc_data" dcl 2-21 in procedure "tc_request" set ref 178* 228 231 234 count 000364 automatic fixed bin(17,0) dcl 817 in procedure "cost" set ref 819* 827* 835 count 000320 automatic fixed bin(17,0) dcl 711 in procedure "delete_chars" set ref 720* 723* 726 728 cpad 0(18) based fixed bin(18,0) level 2 packed unsigned unaligned dcl 867 ref 952 954 954 cpad_in_chars 0(04) based bit(1) level 3 packed unaligned dcl 867 ref 952 cpad_present 0(03) based bit(1) level 3 packed unaligned dcl 867 ref 950 current_mark 376 based fixed bin(9,0) level 3 unsigned dcl 2-21 set ref 180* 1384 1386* 1389* 1389 cursor 0(01) 000227 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 354 in procedure "position_cursor" set ref 372* cursor 0(01) parameter bit(1) level 3 in structure "a_new_state" packed unaligned dcl 864 in procedure "do_operation" ref 875 cursor_position 374 based structure level 3 in structure "tc_data" dcl 2-21 in procedure "tc_request" set ref 441 cursor_position 2 parameter structure level 2 in structure "a_new_state" dcl 864 in procedure "do_operation" ref 879 cursor_position 2 000400 automatic structure level 2 in structure "ns" dcl 865 in procedure "do_operation" set ref 879* cursor_position 2 000227 automatic structure level 2 in structure "ns" dcl 354 in procedure "position_cursor" set ref 441* cursor_valid 34(01) based bit(1) level 4 in structure "tc_data" packed unaligned dcl 2-21 in procedure "tc_request" set ref 179* 363 399 1212* 1370* cursor_valid 1(01) parameter bit(1) level 3 in structure "a_new_state" packed unaligned dcl 864 in procedure "do_operation" ref 875 cursor_valid 1(01) 000400 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 865 in procedure "do_operation" set ref 875* cursor_valid 1(01) 000227 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 354 in procedure "position_cursor" set ref 375* cx 000410 automatic fixed bin(17,0) dcl 885 set ref 922* 929 931 933* 933 defined_pad defined char unaligned dcl 1142 set ref 1143* defined_pic defined char unaligned dcl 1163 set ref 1165* devx 1 based fixed bin(17,0) level 2 dcl 2-21 set ref 1203* 1262* 1352* digits parameter fixed bin(17,0) dcl 1171 ref 1169 1174 distance 14 based fixed bin(17,0) level 3 in structure "request_scroll_region" dcl 3-78 in procedure "tc_request" set ref 328 330* distance 000337 automatic fixed bin(17,0) dcl 748 in procedure "scroll_region" set ref 759* 761 769 774* 777 778* 780* 785 788 790 divide builtin function dcl 156 ref 954 954 dsa_tty_$write 000022 constant entry external dcl 116 ref 1255 dsa_tty_$write_whole_string 000020 constant entry external dcl 113 ref 1196 1344 echnego_outstanding 34(02) based bit(1) level 4 packed unaligned dcl 2-21 set ref 228 enc_ptr 000426 automatic pointer dcl 926 set ref 929* 931 933 encoded based structure level 1 packed unaligned dcl 925 set ref 933* express_in_decimal 0(01) parameter bit(1) level 3 packed unaligned dcl 964 ref 989 express_in_octal 0(02) parameter bit(1) level 3 packed unaligned dcl 964 ref 996 extent 12 based structure level 3 dcl 3-50 first_after 000264 automatic fixed bin(17,0) dcl 566 set ref 570* 571 576* 587* 589* 590* first_nonspace 000520 automatic fixed bin(17,0) dcl 1153 set ref 1156* 1157 1157* 1163 1165 1174* flags 34 based structure level 3 in structure "tc_data" dcl 2-21 in procedure "tc_request" flags 1 000400 automatic structure level 2 in structure "ns" dcl 865 in procedure "do_operation" flags 10 based structure level 2 in structure "request_header" dcl 3-22 in procedure "tc_request" flags 1 parameter structure level 2 in structure "a_new_state" dcl 864 in procedure "do_operation" flags 1 000301 automatic structure level 2 in structure "ns" dcl 616 in procedure "insert_text" flags based structure level 2 in structure "seq" packed unaligned dcl 867 in procedure "do_operation" flags parameter structure level 2 in structure "thing" packed unaligned dcl 964 in procedure "encode" flags based structure level 2 in structure "tty_video_seq" packed unaligned dcl 6-37 in procedure "tc_request" flags 1 000227 automatic structure level 2 in structure "ns" dcl 354 in procedure "position_cursor" flags based structure level 2 in structure "encoded" packed unaligned dcl 925 in begin block on line 923 global_buffer_index 1206 based fixed bin(17,0) level 2 dcl 2-21 set ref 182* 1099 1107 1108 1110* 1117 1119* 1119 1127 1128* 1128 1184 1224* global_buffer_limit 1207 based fixed bin(17,0) level 2 dcl 2-21 set ref 185* 1099 1106 1107 1110 global_output_buffer 1210 based char(512) level 2 packed unaligned dcl 2-21 set ref 1108* 1117* 1127* 1188 1188 1196 1196 1199 1199 1203 1203 1216 1216 have_cleol 000265 automatic bit(1) dcl 567 set ref 569* 576 584 hbound builtin function dcl 156 ref 242 hcs_$tty_write 000012 constant entry external dcl 107 ref 1262 hcs_$tty_write_whole_string 000010 constant entry external dcl 104 ref 1203 1352 i 000254 automatic fixed bin(17,0) dcl 477 in procedure "clear_region" set ref 534* 535* 537* 573* 574* 576* 579* 583* 587* 589* 590* 593* 594* i 000406 automatic fixed bin(17,0) dcl 883 in begin block on line 882 set ref 907* 920* ib 000447 automatic fixed bin(17,0) dcl 1000 set ref 1010* 1011 1016 1016* insert 000301 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 616 in procedure "insert_text" set ref 636* 646* insert parameter bit(1) level 3 in structure "a_new_state" packed unaligned dcl 864 in procedure "do_operation" ref 877 insert_mode 34 based bit(1) level 4 in structure "tc_data" packed unaligned dcl 2-21 in procedure "tc_request" set ref 633 643 1048 insert_mode 1 000400 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 865 in procedure "do_operation" set ref 877* insert_mode 1 parameter bit(1) level 3 in structure "a_new_state" packed unaligned dcl 864 in procedure "do_operation" ref 877 insert_mode 1 000301 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 616 in procedure "insert_text" set ref 637* 647* interpret 0(01) based bit(1) level 3 packed unaligned dcl 867 ref 905 l_c_or_n 0(04) parameter fixed bin(2,0) level 2 packed unsigned unaligned dcl 964 ref 969 last_column parameter fixed bin(17,0) dcl 708 in procedure "delete_chars" ref 705 723 728 735 last_column parameter fixed bin(17,0) dcl 609 in procedure "insert_text" ref 606 643 665 685 693 last_column 000100 automatic fixed bin(17,0) dcl 144 in procedure "tc_request" set ref 219* 307* 321* last_mark_back 377 based fixed bin(9,0) level 3 unsigned dcl 2-21 set ref 181* 1387* lbound builtin function dcl 156 ref 242 least_cost 000222 automatic fixed bin(17,0) dcl 352 set ref 416* 417 420 424 len 1(15) based fixed bin(9,0) level 2 in structure "tty_video_seq" packed unsigned unaligned dcl 6-37 in procedure "tc_request" ref 833 835 len 1(15) based fixed bin(9,0) level 2 in structure "seq" packed unsigned unaligned dcl 867 in procedure "do_operation" ref 886 908 908 922 929 931 length builtin function dcl 156 ref 590 590 594 594 690 690 692 728 1082 1099 1106 1116 1127 1128 1140 1163 1188 1216 1239 1242 1325 1329 1400 line_speed 32 based fixed bin(17,0) level 3 dcl 2-21 ref 954 954 loop 000407 automatic fixed bin(17,0) dcl 884 set ref 917* 919* 920 min builtin function dcl 156 ref 416 1140 mowse_terminal_iocb_ptr 6 based pointer level 2 dcl 2-21 set ref 1199* 1259* 1348* msg 000570 automatic char(100) dcl 1307 set ref 1310* 1311 1311 must_be_on based bit(1) level 3 packed unaligned dcl 925 set ref 931 n_after 000263 automatic fixed bin(17,0) dcl 565 set ref 571* 576* 584 n_cols 000253 automatic fixed bin(17,0) dcl 475 set ref 495* 498 505 513* 516 529 535* 548 570 574* 584 594 594 n_left 000553 automatic fixed bin(21,0) dcl 1235 set ref 1242* 1255* 1259* 1262* 1269 1276* 1276 n_lines 13 based fixed bin(17,0) level 3 dcl 3-78 set ref 327 330* n_rows 000252 automatic fixed bin(17,0) dcl 475 in procedure "clear_region" set ref 494* 505 513* 516 534 551* 552 554* 573 n_rows parameter fixed bin(17,0) dcl 745 in procedure "scroll_region" ref 742 771 777 786 788 n_wrote 000630 automatic fixed bin(21,0) dcl 1319 in procedure "write_raw_text" set ref 1340* 1344* 1348* 1352* 1362 1366 1367 n_wrote 000546 automatic fixed bin(21,0) dcl 1232 in procedure "write_no_mark" set ref 1255* 1259* 1262* 1269 1276 1277 n_wrote 000532 automatic fixed bin(21,0) dcl 1186 in procedure "write_global_buffer" set ref 1193* 1196* 1199* 1203* 1216 network_type based fixed bin(17,0) level 2 dcl 2-21 ref 1196 1199 1218 1255 1259 1274 1344 1348 1364 new_state based structure level 1 dcl 159 noopt 000261 automatic bit(1) dcl 479 set ref 481* 486* 513 535 574 576 ns 000301 automatic structure level 1 dcl 616 in procedure "insert_text" set ref 627* 638* 639* 648* 649* 667* ns 000400 automatic structure level 1 dcl 865 in procedure "do_operation" set ref 874* 939 ns 000342 automatic structure level 1 dcl 753 in procedure "scroll_region" set ref 764* 774* 778* 780* 785* 790* ns 000255 automatic structure level 1 dcl 478 in procedure "clear_region" set ref 488* 508* 523* 538* 551* 554* 580* 588* ns 000321 automatic structure level 1 dcl 712 in procedure "delete_chars" set ref 716* 723* ns 000227 automatic structure level 1 dcl 354 in procedure "position_cursor" set ref 361* 379* 420* 427* 431* 436* 445* 450* 455* 460* nseq 10 based fixed bin(17,0) level 2 dcl 6-12 ref 903 num_digits 0(06) parameter fixed bin(2,0) level 2 packed unsigned unaligned dcl 964 ref 991 994 1006 1008 number parameter fixed bin(17,0) dcl 1135 in procedure "add_pad_to_buffer" ref 1133 1140 number parameter fixed bin(17,0) dcl 1150 in procedure "add_to_buffer_ltrim_char" ref 1148 1155 1169 1173 offset 000633 automatic fixed bin(21,0) dcl 1322 in procedure "write_raw_text" set ref 1328* 1344 1348 1352 1367* 1367 offset 0(09) parameter fixed bin(8,0) level 2 in structure "thing" packed unaligned dcl 964 in procedure "encode" ref 984 offset 000552 automatic fixed bin(21,0) dcl 1234 in procedure "write_no_mark" set ref 1245* 1249 1249 1255* 1259* 1262* 1277* 1277 offset_is_0 0(03) parameter bit(1) level 3 packed unaligned dcl 964 ref 981 ok_to_split 000470 automatic bit(1) dcl 1071 set ref 1084* 1096* 1099 op parameter fixed bin(17,0) dcl 861 in procedure "do_operation" set ref 846 872 898 942* op parameter fixed bin(17,0) dcl 815 in procedure "cost" ref 813 822 829 837 840 op_col parameter fixed bin(17,0) dcl 1035 in procedure "write_text" set ref 1032 1046 1048* op_col 000377 automatic fixed bin(17,0) dcl 861 in procedure "do_operation" set ref 892* 893 893* 898* 942* 975 op_n parameter fixed bin(17,0) dcl 861 set ref 846 907 915 919 942 942* 978 op_row 000376 automatic fixed bin(17,0) dcl 861 in procedure "do_operation" set ref 889* 890 890* 898* 942* 971 op_row parameter fixed bin(17,0) dcl 1035 in procedure "write_text" set ref 1032 1045 1048* operation 7 based fixed bin(17,0) level 2 dcl 3-22 ref 242 242 260 overwrite 000300 automatic bit(1) unaligned dcl 615 set ref 619* 625* 633 pad_length 000504 automatic fixed bin(17,0) dcl 1137 set ref 1140* 1142 pad_string 006372 constant char(254) initial unaligned dcl 1138 ref 1140 1143 1143 pay_attention 000227 automatic structure level 2 in structure "ns" dcl 354 in procedure "position_cursor" pay_attention parameter structure level 2 in structure "a_new_state" dcl 864 in procedure "do_operation" pay_attention 000301 automatic structure level 2 in structure "ns" dcl 616 in procedure "insert_text" pending 36 based structure level 3 dcl 2-21 pic_ 000516 automatic picture(4) unaligned dcl 1151 set ref 1155* 1156 1160 1173* position 0(02) parameter bit(1) level 3 in structure "a_new_state" packed unaligned dcl 864 in procedure "do_operation" ref 879 position 0(02) 000227 automatic bit(1) level 3 in structure "ns" packed unaligned dcl 354 in procedure "position_cursor" set ref 372* present based bit(1) level 3 in structure "seq" packed unaligned dcl 867 in procedure "do_operation" ref 900 present based bit(1) level 3 in structure "tty_video_seq" packed unaligned dcl 6-37 in procedure "tc_request" ref 831 841 prompt_length 22 based fixed bin(21,0) level 3 dcl 3-101 ref 279 prompt_ptr 20 based pointer level 3 dcl 3-101 ref 277 r_coords based structure level 1 dcl 3-34 rank builtin function dcl 156 ref 1016 1016 request_clear_region based structure level 1 dcl 3-50 request_col 000102 automatic fixed bin(17,0) dcl 145 set ref 258* 264* 281* 287* 296* 307* 314* 317* 321* 334* request_column_count 000104 automatic fixed bin(17,0) dcl 148 set ref 294* 296* request_count 000111 automatic fixed bin(17,0) dcl 151 set ref 328* request_delete_chars based structure level 1 dcl 3-70 request_header based structure level 1 dcl 3-22 request_ptr 000200 automatic pointer dcl 3-19 set ref 218* 222 222 228* 235 242 242 253 258 260 273* 277 279 284* 292 294 303 305 310 312 317 317 317 321 325 327 328 330 330 330 338 340 1299* 1375 request_read based structure level 1 dcl 3-101 request_row 000101 automatic fixed bin(17,0) dcl 145 set ref 253* 264* 281* 287* 296* 307* 314* 317* 321* 325* 334* request_row_count 000103 automatic fixed bin(17,0) dcl 147 set ref 292* 296* 327* request_scroll_region based structure level 1 dcl 3-78 request_string_length 000110 automatic fixed bin(21,0) dcl 150 set ref 279* 281* 305* 307* 312* 314* request_string_ptr 000106 automatic pointer dcl 149 set ref 277* 281* 303* 307* 310* 314* request_text based structure level 1 dcl 3-60 request_text_string based char unaligned dcl 3-66 set ref 317* row 2 000227 automatic fixed bin(17,0) level 3 in structure "ns" dcl 354 in procedure "position_cursor" set ref 373* 426* 430* 444* 449* row 000354 automatic fixed bin(17,0) dcl 803 in procedure "bell" set ref 805* 808* row 000276 automatic fixed bin(17,0) dcl 612 in procedure "insert_text" set ref 630* 671* 680* 681* 682* 690* 693* 694* 700* 701* row parameter fixed bin(17,0) dcl 1317 in procedure "write_raw_text" ref 1315 row 000250 automatic fixed bin(17,0) dcl 475 in procedure "clear_region" set ref 492* 500* 505 513* 516 522* 524* 534 534 541* 550* 552 555* 573 573 602* row 000316 automatic fixed bin(17,0) dcl 711 in procedure "delete_chars" set ref 718* 722* 726* 730* 735* 736* row 5 based fixed bin(17,0) level 3 in structure "request_header" dcl 3-22 in procedure "tc_request" set ref 253 338* row 000336 automatic fixed bin(17,0) dcl 748 in procedure "scroll_region" set ref 758* 771 773* 777 779* 784* 786 788 row 000220 automatic fixed bin(17,0) dcl 351 in procedure "position_cursor" set ref 358* 363 373 377 397 402 402 404 404 420* 428 430 431 442 444 445 447 449 450 row 374 based fixed bin(17,0) level 4 in structure "tc_data" dcl 2-21 in procedure "tc_request" set ref 338 363 402 402 404 404 442 445 447 450 766 890 1045* 1399* rows 12 based fixed bin(17,0) level 4 in structure "request_clear_region" dcl 3-50 in procedure "tc_request" ref 292 rows 30 based fixed bin(17,0) level 3 in structure "tc_data" dcl 2-21 in procedure "tc_request" set ref 468* 505 516 552 771 786 rtrim builtin function dcl 156 ref 590 590 594 594 690 690 692 728 1311 1311 save_col 000341 automatic fixed bin(17,0) dcl 751 set ref 767* 794* save_row 000340 automatic fixed bin(17,0) dcl 750 in procedure "scroll_region" set ref 766* 794* save_row 000113 automatic char(200) unaligned dcl 153 in procedure "tc_request" set ref 587* 590 590 590 590 593* 594 594 680* 685* 685 690 690 690 690 692 726* 728 730 730 saw_nonzero 000450 automatic bit(1) unaligned dcl 1001 set ref 1004* 1011 1017* screen_data_ptr 1002 based pointer level 2 dcl 2-21 set ref 513* 535* 574* 576* 587* 593* 671* 680* 726* 942* 1048* 1399* seq based structure level 1 dcl 867 seq_index 1(24) based fixed bin(12,0) level 2 packed unsigned unaligned dcl 867 ref 903 sequences 11 based structure array level 2 dcl 6-12 set ref 829 840 872 skip 000445 automatic fixed bin(17,0) dcl 966 set ref 968* 985* 1024 some_spaces defined char unaligned dcl 670 set ref 671* start 000451 automatic fixed bin(17,0) dcl 1002 set ref 1006* 1008* 1010 1011 start_line 12 based fixed bin(17,0) level 3 dcl 3-78 set ref 325 330* state 34 based structure level 2 dcl 2-21 set ref 874 939* state_async_same_window defined bit(1) array unaligned dcl 2-79 set ref 235* string parameter char unaligned dcl 1068 set ref 1062 1081 1082 stuff based char unaligned dcl 1079 ref 1099 1106 1108 1116 1117 1127 1127 1128 stuff_idx 000467 automatic fixed bin(17,0) dcl 1070 set ref 1104* 1106 1108 1112* 1112 1116 1117 stuff_length 000474 automatic fixed bin(21,0) dcl 1077 set ref 1082* 1094* 1099 1106 1108 1116 1117 1127 1127 1128 stuff_ptr 000472 automatic pointer dcl 1076 set ref 1081* 1093* 1099 1106 1108 1116 1117 1127 1127 1128 substr builtin function dcl 156 set ref 594 594 685 728 1108* 1108 1117* 1117 1127* tc_block 000044 constant entry external dcl 130 ref 1299 tc_data based structure level 1 dcl 2-21 tc_data_ptr 000176 automatic pointer dcl 2-20 set ref 177* 178 179 180 181 182 185 216* 220 228 228 228* 231 234 235 235 240 240 273* 284* 338 340 363 363 363 399 402 402 404 404 408 408 410 410 441 442 445 447 450 452 455 457 460 468 468 505 505 513 516 516 529 535 548 552 571 574 576 587 593 633 643 643 665 671 680 723 726 766 767 771 786 874 890 893 939 942 954 954 1045 1046 1048 1048 1099 1099 1106 1107 1107 1108 1108 1110 1110 1117 1117 1119 1119 1127 1127 1128 1128 1184 1188 1191 1191 1196 1196 1196 1199 1199 1199 1203 1203 1212 1216 1218 1224 1255 1255 1259 1259 1262 1265* 1274 1299* 1331 1331 1344 1344 1348 1348 1352 1356* 1364 1370 1384 1386 1387 1389 1389 1397* 1399 1399 1399 1400 1400 tc_disconnect$check 000036 constant entry external dcl 127 ref 1206 1265 1356 tc_error 000042 constant entry external dcl 129 ref 244 417 900 1311 tc_input 000034 constant entry external dcl 126 ref 273 284 tc_input$check_echnego 000040 constant entry external dcl 128 ref 228 tc_screen$get_in_line 000026 constant entry external dcl 120 ref 587 593 680 726 tc_screen$is_region_clear 000032 constant entry external dcl 122 ref 513 535 574 576 tc_screen$operation 000024 constant entry external dcl 119 ref 942 tc_screen$text 000030 constant entry external dcl 121 ref 671 1048 1399 terminal 30 based structure level 2 dcl 2-21 terminal_state based structure level 1 dcl 2-54 text based char unaligned dcl 1039 in procedure "write_text" set ref 1048* text parameter char unaligned dcl 1318 in procedure "write_raw_text" ref 1315 1325 1329 1344 1344 1348 1348 1352 1352 text parameter char unaligned dcl 1231 in procedure "write_no_mark" set ref 1229 1239 1242 1244 text_length parameter fixed bin(21,0) dcl 1037 in procedure "write_text" set ref 1032 1043* 1046 1048 1048 text_length parameter fixed bin(21,0) dcl 614 in procedure "insert_text" set ref 606 622 667 670 682* 685 690 692 694 701* text_length 14 based fixed bin(21,0) level 3 in structure "request_text" dcl 3-60 in procedure "tc_request" ref 305 312 317 317 text_length 000634 automatic fixed bin(21,0) dcl 1323 in procedure "write_raw_text" set ref 1329* 1338 1362 1366* 1366 text_ptr parameter pointer dcl 1036 in procedure "write_text" set ref 1032 1043* 1048 text_ptr 12 based pointer level 3 in structure "request_text" dcl 3-60 in procedure "tc_request" ref 303 310 317 text_ptr parameter pointer dcl 613 in procedure "insert_text" set ref 606 622 682* 701* text_to_echo parameter char unaligned dcl 1395 set ref 1392 1398* 1399* 1400 the_char defined char(1) unaligned dcl 924 set ref 929 931* thing parameter structure level 1 packed unaligned dcl 964 ref 959 this_window 10(01) based bit(1) level 3 packed unaligned dcl 3-22 set ref 222* 1375 to_write defined char unaligned dcl 1184 in procedure "write_global_buffer" set ref 1188 1196* 1199* 1203* 1216 to_write defined char unaligned dcl 1338 in begin block on line 1336 set ref 1344* 1348* 1352* ttt_video_ptr 22 based pointer level 2 dcl 2-21 ref 220 tty_handle 2 based fixed bin(35,0) level 2 dcl 2-21 set ref 1196* 1255* 1344* tty_numeric_encoding based structure level 1 packed unaligned dcl 6-69 tty_state 000632 automatic fixed bin(17,0) dcl 1321 in procedure "write_raw_text" set ref 1344* 1348* 1352* tty_state 000112 automatic fixed bin(17,0) dcl 152 in procedure "tc_request" set ref 1196* 1199* 1203* 1255* 1259* 1262* tty_video_seq based structure level 1 dcl 6-37 tty_video_table based structure level 1 dcl 6-12 ttyvseqp 000204 automatic pointer dcl 6-35 set ref 829* 831 833 833 835 840* 841 872* 886 900 903 905 908 908 917 922 929 931 950 952 952 954 954 ttyvtblp 000202 automatic pointer dcl 6-9 set ref 220* 829 840 872 903 unspec builtin function dcl 156 set ref 361* 488* 627* 639* 649* 716* 764* 1005* 1005 value 000444 automatic fixed bin(17,0) dcl 965 set ref 971* 975* 978* 984* 984 991* 994* 1005 1023 1023 vchars defined char unaligned dcl 886 set ref 903 verify builtin function dcl 156 ref 1156 video_chars based char level 2 packed unaligned dcl 6-12 ref 903 903 video_chars_len 5 based fixed bin(21,0) level 2 dcl 6-12 ref 903 video_et_$capability_lacking 000046 external static fixed bin(35,0) dcl 132 ref 1289 video_et_$tc_cannot_position 000052 external static fixed bin(35,0) dcl 132 set ref 417* video_et_$tc_illegal_request 000050 external static fixed bin(35,0) dcl 132 set ref 244* video_et_$tc_missing_operation 000054 external static fixed bin(35,0) dcl 132 set ref 900* video_et_$tc_tty_error 000056 external static fixed bin(35,0) dcl 132 set ref 1311* window_id 4 based bit(36) level 2 dcl 3-22 ref 235 write_length 000326 automatic fixed bin(21,0) dcl 714 set ref 728* 730* 734 ws_tty_$write 000016 constant entry external dcl 111 ref 1259 ws_tty_$write_whole_string 000014 constant entry external dcl 109 ref 1199 1348 wx 000210 automatic fixed bin(17,0) dcl 233 set ref 234* 235 235* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DSA_ATTENTION_MSG internal static fixed bin(8,0) initial unsigned dcl 1-83 DSA_DATA_ATTENTION_MSG internal static fixed bin(8,0) initial unsigned dcl 1-84 DSA_DATA_INPUT_MSG internal static fixed bin(8,0) initial unsigned dcl 1-100 DSA_DATA_OUTPUT_MSG internal static fixed bin(8,0) initial unsigned dcl 1-101 DSA_DEMAND_RELEASE_SRU_MSG internal static fixed bin(8,0) initial unsigned dcl 1-85 DSA_DEMAND_TURN_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 1-87 DSA_DEMAND_TURN_MSG internal static fixed bin(8,0) initial unsigned dcl 1-86 DSA_ESTABLISHMENT_MSG internal static fixed bin(8,0) initial unsigned dcl 1-97 DSA_MSG_TYPE_TO_PNAME internal static char(20) initial array unaligned dcl 1-103 DSA_PURGE_MSG internal static fixed bin(8,0) initial unsigned dcl 1-88 DSA_RECOVER_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 1-90 DSA_RECOVER_MSG internal static fixed bin(8,0) initial unsigned dcl 1-89 DSA_RELEASE_SRU_MSG internal static fixed bin(8,0) initial unsigned dcl 1-91 DSA_RESUME_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 1-93 DSA_RESUME_MSG internal static fixed bin(8,0) initial unsigned dcl 1-92 DSA_SUSPEND_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 1-95 DSA_SUSPEND_MSG internal static fixed bin(8,0) initial unsigned dcl 1-94 DSA_TERMINATED_MSG internal static fixed bin(8,0) initial unsigned dcl 1-98 DSA_TERM_ABNORMAL_MSG internal static fixed bin(8,0) initial unsigned dcl 1-96 DSA_UNSPECIFIED_MSG internal static fixed bin(8,0) initial unsigned dcl 1-82 DSA_USER_UNASSIGN_MSG internal static fixed bin(8,0) initial unsigned dcl 1-99 MAX_DSA_EVENT_MSG_TYPE internal static fixed bin(17,0) initial dcl 1-80 MAX_MCS_EVENT_MSG_TYPE internal static fixed bin(17,0) initial dcl 1-46 MCS_DIALOUT_MSG internal static fixed bin(17,0) initial dcl 1-54 MCS_DIALUP_MSG internal static fixed bin(17,0) initial dcl 1-50 MCS_HANGUP_MSG internal static fixed bin(17,0) initial dcl 1-52 MCS_LINE_STATUS_MSG internal static fixed bin(17,0) initial dcl 1-62 MCS_MASKED_MSG internal static fixed bin(17,0) initial dcl 1-64 MCS_MSG_TYPE_TO_PNAME internal static char(20) initial array unaligned dcl 1-67 MCS_NETWORK_TYPE internal static fixed bin(4,0) initial unsigned dcl 1-34 MCS_QUIT_MSG internal static fixed bin(17,0) initial dcl 1-56 MCS_READ_MSG internal static fixed bin(17,0) initial dcl 1-58 MCS_UNSPECIFIED_MSG internal static fixed bin(17,0) initial dcl 1-48 MCS_WRITE_MSG internal static fixed bin(17,0) initial dcl 1-60 NETWORK_TYPE_VALUES internal static varying char(8) initial array dcl 1-38 NET_EVENT_MESSAGE_VERSION_1 internal static bit(2) initial unaligned dcl 1-20 N_VIDEO_SEQUENCES internal static fixed bin(17,0) initial dcl 6-64 OP_BELL internal static fixed bin(17,0) initial dcl 3-86 OP_CLEAR_REGION internal static fixed bin(17,0) initial dcl 3-41 OP_CLEAR_SCREEN_NO_OPT internal static fixed bin(17,0) initial dcl 3-47 OP_DELETE_CHARS internal static fixed bin(17,0) initial dcl 3-68 OP_ERROR internal static fixed bin(17,0) initial dcl 3-38 OP_GET_CHARS_ECHO internal static fixed bin(17,0) initial dcl 3-87 OP_GET_CHARS_NO_ECHO internal static fixed bin(17,0) initial dcl 3-88 OP_GET_CURSOR_POSITION internal static fixed bin(17,0) initial dcl 3-118 OP_INSERT_TEXT internal static fixed bin(17,0) initial dcl 3-58 OP_OVERWRITE_TEXT internal static fixed bin(17,0) initial dcl 3-121 OP_POSITION_CURSOR internal static fixed bin(17,0) initial dcl 3-39 OP_READ_ONE internal static fixed bin(17,0) initial dcl 3-123 OP_READ_STATUS internal static fixed bin(17,0) initial dcl 3-120 OP_SCROLL_REGION internal static fixed bin(17,0) initial dcl 3-76 OP_WRITE_RAW internal static fixed bin(17,0) initial dcl 3-122 OP_WRITE_SYNC_GET_CHARS_NO_ECHO internal static fixed bin(17,0) initial dcl 3-90 REQUEST_SENTINEL internal static char(4) initial dcl 3-20 TC_ASYNCRONITY_CONDITION_NAME internal static char(15) initial unaligned dcl 5-6 condition_info_header_ptr automatic pointer dcl 4-4 net_event_message based structure level 1 dcl 1-22 net_event_message_arg automatic fixed bin(71,0) dcl 1-19 request_buffer based char unaligned dcl 3-116 request_prompt based char unaligned dcl 3-115 request_read_status based structure level 1 dcl 3-93 state_have_sent_protocol defined bit(1) array unaligned dcl 2-82 tc_async_info based structure level 1 dcl 5-10 tc_async_info_ptr automatic pointer dcl 5-9 tc_asyncronity_ 000000 stack reference condition dcl 5-5 tc_break_array defined bit(1) array unaligned dcl 2-52 tty_video_table_video_chars_len automatic fixed bin(21,0) dcl 6-10 tty_video_tables_version_1 internal static fixed bin(17,0) initial dcl 6-7 video_chars based char unaligned dcl 6-30 video_chars_ptr automatic pointer dcl 6-29 NAMES DECLARED BY EXPLICIT CONTEXT. RECOMPUTE_OPERATION 000521 constant label dcl 1375 REQUEST 000000 constant label array(16) dcl 244 ref 242 242 260 VALUE 000020 constant label array(0:2) dcl 971 ref 969 add_in_number 004066 constant label dcl 1160 ref 1175 add_pad_to_buffer 004013 constant entry internal dcl 1133 ref 952 954 add_to_buffer 003665 constant entry internal dcl 1062 ref 908 931 1011 1016 1023 1054 1143 1165 add_to_buffer_common 003717 constant label dcl 1099 ref 1085 1097 add_to_buffer_last_n 004112 constant entry internal dcl 1169 ref 994 add_to_buffer_ltrim_char 004037 constant entry internal dcl 1148 ref 991 add_to_buffer_splittable 003704 constant entry internal dcl 1087 ref 1043 available 002767 constant entry internal dcl 837 ref 377 505 520 529 548 548 569 643 665 723 755 755 bell 002644 constant entry internal dcl 798 ref 334 block 004572 constant entry internal dcl 1294 ref 1218 1274 1364 bump_mark 005143 constant entry internal dcl 1382 ref 1222 1371 capabilities_lacking 000515 constant label dcl 1289 ref 755 clear_region 001205 constant entry internal dcl 471 ref 296 693 735 clear_region_noopt 001211 constant entry internal dcl 484 ref 468 clear_screen 001163 constant entry internal dcl 466 ref 299 common 002021 constant label dcl 627 ref 620 cost 002656 constant entry internal dcl 813 ref 392 393 584 cost_common 002700 constant label dcl 829 ref 820 cost_repeat 002667 constant entry internal dcl 822 ref 397 397 402 404 408 410 delete_chars 002351 constant entry internal dcl 705 ref 321 do_operation 003012 constant entry internal dcl 846 ref 379 420 427 431 436 445 450 455 460 508 523 538 551 554 580 588 638 648 667 723 774 778 780 785 790 do_output 000171 constant label dcl 216 ref 94 echo_write 004433 constant label dcl 1255 ref 1278 encode 003402 constant entry internal dcl 959 ref 933 got_value 003425 constant label dcl 981 ref 973 977 init 000132 constant entry external dcl 174 insert_text 002011 constant entry internal dcl 606 ref 307 opt_common 001215 constant label dcl 488 ref 482 overwrite_text 002015 constant entry internal dcl 622 ref 281 314 pad 003352 constant entry internal dcl 948 ref 909 936 position_cursor 000623 constant entry internal dcl 346 ref 264 287 500 522 524 537 541 550 555 579 583 589 602 681 694 700 722 736 773 777 779 784 788 794 808 recompute_operation_here 000303 constant label dcl 253 ref 1378 request_done 000513 constant label dcl 1285 ref 246 274 286 289 297 301 308 315 319 323 332 336 341 1291 1375 scroll_region 002501 constant entry internal dcl 742 ref 330 shut 000160 constant entry external dcl 188 tc_request 000116 constant entry external dcl 92 tty_write_error 004607 constant entry internal dcl 1304 ref 1213 1267 1358 update_state 003312 constant label dcl 939 ref 911 write 004143 constant label dcl 1193 in procedure "write_global_buffer" ref 1220 write 004711 constant label dcl 1336 in procedure "write_raw_text" ref 1368 write_bell 003655 constant entry internal dcl 1051 ref 809 write_echo 000532 constant entry external dcl 1392 write_global_buffer 004131 constant entry internal dcl 1181 ref 269 283 1111 1123 1253 1334 write_no_mark 004362 constant entry internal dcl 1229 ref 1398 write_raw_text 004665 constant entry internal dcl 1315 ref 317 write_text 003573 constant entry internal dcl 1032 ref 590 594 682 690 701 730 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 7110 7176 6573 7120 Length 7604 6573 66 371 315 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME tc_request 818 external procedure is an external procedure. begin block on line 231 begin block shares stack frame of external procedure tc_request. position_cursor internal procedure shares stack frame of external procedure tc_request. clear_screen internal procedure shares stack frame of external procedure tc_request. clear_region internal procedure shares stack frame of external procedure tc_request. begin block on line 564 begin block shares stack frame of external procedure tc_request. insert_text internal procedure shares stack frame of external procedure tc_request. begin block on line 669 begin block shares stack frame of external procedure tc_request. delete_chars internal procedure shares stack frame of external procedure tc_request. scroll_region internal procedure shares stack frame of external procedure tc_request. bell internal procedure shares stack frame of external procedure tc_request. cost internal procedure shares stack frame of external procedure tc_request. do_operation internal procedure shares stack frame of external procedure tc_request. begin block on line 882 begin block shares stack frame of external procedure tc_request. begin block on line 923 begin block shares stack frame of external procedure tc_request. pad internal procedure shares stack frame of external procedure tc_request. encode internal procedure shares stack frame of external procedure tc_request. begin block on line 998 begin block shares stack frame of external procedure tc_request. write_text internal procedure shares stack frame of external procedure tc_request. add_to_buffer internal procedure shares stack frame of external procedure tc_request. add_pad_to_buffer internal procedure shares stack frame of external procedure tc_request. begin block on line 1141 begin block shares stack frame of external procedure tc_request. add_to_buffer_ltrim_char internal procedure shares stack frame of external procedure tc_request. begin block on line 1162 begin block shares stack frame of external procedure tc_request. write_global_buffer internal procedure shares stack frame of external procedure tc_request. write_no_mark internal procedure shares stack frame of external procedure tc_request. block internal procedure shares stack frame of external procedure tc_request. tty_write_error internal procedure shares stack frame of external procedure tc_request. write_raw_text internal procedure shares stack frame of external procedure tc_request. begin block on line 1336 begin block shares stack frame of external procedure tc_request. bump_mark internal procedure shares stack frame of external procedure tc_request. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME tc_request 000100 last_column tc_request 000101 request_row tc_request 000102 request_col tc_request 000103 request_row_count tc_request 000104 request_column_count tc_request 000106 request_string_ptr tc_request 000110 request_string_length tc_request 000111 request_count tc_request 000112 tty_state tc_request 000113 save_row tc_request 000175 code tc_request 000176 tc_data_ptr tc_request 000200 request_ptr tc_request 000202 ttyvtblp tc_request 000204 ttyvseqp tc_request 000210 wx begin block on line 231 000220 row position_cursor 000221 col position_cursor 000222 least_cost position_cursor 000223 cost_of_abs position_cursor 000224 cost_of_home position_cursor 000225 cost_of_cha_cha position_cursor 000226 cost_of_home_cha_cha position_cursor 000227 ns position_cursor 000250 row clear_region 000251 col clear_region 000252 n_rows clear_region 000253 n_cols clear_region 000254 i clear_region 000255 ns clear_region 000261 noopt clear_region 000263 n_after begin block on line 564 000264 first_after begin block on line 564 000265 have_cleol begin block on line 564 000276 row insert_text 000277 col insert_text 000300 overwrite insert_text 000301 ns insert_text 000305 clear_start insert_text 000316 row delete_chars 000317 col delete_chars 000320 count delete_chars 000321 ns delete_chars 000325 clear_start delete_chars 000326 write_length delete_chars 000336 row scroll_region 000337 distance scroll_region 000340 save_row scroll_region 000341 save_col scroll_region 000342 ns scroll_region 000354 row bell 000355 col bell 000364 count cost 000376 op_row do_operation 000377 op_col do_operation 000400 ns do_operation 000404 chars_ptr do_operation 000406 i begin block on line 882 000407 loop begin block on line 882 000410 cx begin block on line 882 000426 enc_ptr begin block on line 923 000444 value encode 000445 skip encode 000446 bits begin block on line 998 000447 ib begin block on line 998 000450 saw_nonzero begin block on line 998 000451 start begin block on line 998 000466 chunk_length add_to_buffer 000467 stuff_idx add_to_buffer 000470 ok_to_split add_to_buffer 000472 stuff_ptr add_to_buffer 000474 stuff_length add_to_buffer 000504 pad_length add_pad_to_buffer 000516 pic_ add_to_buffer_ltrim_char 000517 char_temp add_to_buffer_ltrim_char 000520 first_nonspace add_to_buffer_ltrim_char 000532 n_wrote write_global_buffer 000546 n_wrote write_no_mark 000550 buffer_ptr write_no_mark 000552 offset write_no_mark 000553 n_left write_no_mark 000570 msg tty_write_error 000630 n_wrote write_raw_text 000631 code write_raw_text 000632 tty_state write_raw_text 000633 offset write_raw_text 000634 text_length write_raw_text THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_l_a r_e_as alloc_char_temp call_ext_out_desc call_ext_out return_mac shorten_stack ext_entry ext_entry_desc divide_fx3 THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. add_char_offset_ char_offset_ convert_status_code_ dsa_tty_$write dsa_tty_$write_whole_string hcs_$tty_write hcs_$tty_write_whole_string tc_block tc_disconnect$check tc_error tc_input tc_input$check_echnego tc_screen$get_in_line tc_screen$is_region_clear tc_screen$operation tc_screen$text ws_tty_$write ws_tty_$write_whole_string THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. video_et_$capability_lacking video_et_$tc_cannot_position video_et_$tc_illegal_request video_et_$tc_missing_operation video_et_$tc_tty_error LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 92 000111 94 000126 174 000127 177 000137 178 000143 179 000144 180 000146 181 000147 182 000150 185 000151 186 000153 188 000154 212 000170 216 000171 218 000174 219 000177 220 000201 222 000203 228 000207 231 000224 234 000227 235 000237 237 000250 240 000252 242 000257 244 000265 246 000302 253 000303 258 000306 260 000310 264 000312 269 000314 273 000315 274 000330 277 000331 279 000334 281 000337 283 000341 284 000342 286 000355 287 000356 289 000360 292 000361 294 000364 296 000366 297 000370 299 000371 301 000372 303 000373 305 000376 307 000401 308 000403 310 000404 312 000407 314 000412 315 000414 317 000415 319 000440 321 000441 323 000456 325 000457 327 000462 328 000464 330 000466 332 000500 334 000501 336 000503 338 000504 340 000510 341 000512 1285 000513 1287 000514 1289 000515 1291 000520 1375 000521 1378 000525 1392 000526 1397 000545 1398 000551 1399 000562 1400 000617 1401 000622 346 000623 358 000625 359 000627 361 000631 363 000634 372 000647 373 000653 374 000655 375 000657 377 000661 379 000700 380 000706 392 000707 393 000711 395 000713 397 000715 399 000733 401 000737 402 000740 404 000752 408 000762 410 000775 416 001005 417 001015 420 001034 424 001044 426 001047 427 001052 428 001057 430 001062 431 001063 433 001071 435 001074 436 001075 438 001103 441 001104 442 001111 444 001114 445 001115 446 001123 447 001124 449 001125 450 001126 452 001135 454 001141 455 001142 456 001150 457 001151 459 001152 460 001153 463 001162 466 001163 468 001164 469 001204 471 001205 481 001207 482 001210 484 001211 486 001213 488 001215 492 001220 493 001223 494 001225 495 001227 498 001231 500 001232 501 001234 505 001235 508 001257 509 001265 513 001266 516 001320 520 001334 522 001341 523 001343 524 001351 525 001353 529 001354 534 001371 535 001403 537 001434 538 001436 540 001444 541 001446 542 001450 548 001451 550 001477 551 001503 552 001507 554 001515 555 001521 557 001523 569 001524 570 001526 571 001531 573 001537 574 001551 576 001602 579 001636 580 001640 581 001646 583 001647 584 001651 587 001664 588 001711 589 001717 590 001721 591 001737 593 001740 594 001765 600 002004 602 002006 603 002010 606 002011 619 002013 620 002014 622 002015 625 002017 627 002021 630 002024 631 002027 633 002031 636 002037 637 002041 638 002043 639 002051 641 002054 643 002055 646 002074 647 002076 648 002100 649 002106 651 002111 665 002112 667 002126 670 002134 671 002137 674 002174 680 002175 681 002221 682 002223 685 002240 690 002252 692 002273 693 002312 694 002322 695 002330 700 002331 701 002333 702 002350 705 002351 716 002353 718 002356 719 002360 720 002362 722 002364 723 002366 726 002407 728 002436 730 002456 734 002462 735 002465 736 002476 739 002500 742 002501 755 002503 758 002516 759 002521 761 002523 764 002525 766 002530 767 002533 769 002535 771 002537 773 002545 774 002551 775 002555 777 002556 778 002565 779 002571 780 002575 782 002601 784 002602 785 002606 786 002614 788 002624 790 002633 794 002641 795 002643 798 002644 805 002646 806 002650 808 002652 809 002654 810 002655 813 002656 819 002664 820 002666 822 002667 827 002675 829 002700 831 002706 833 002725 835 002746 837 002767 840 002772 841 003000 846 003012 872 003014 874 003021 875 003036 877 003046 879 003056 886 003065 889 003072 890 003075 892 003101 893 003103 898 003107 900 003115 903 003135 905 003151 907 003154 908 003165 909 003204 910 003205 911 003207 915 003210 917 003213 919 003221 920 003222 922 003231 929 003243 931 003255 933 003274 935 003305 936 003307 937 003310 939 003312 942 003327 945 003351 948 003352 950 003353 952 003356 954 003367 956 003401 959 003402 968 003404 969 003405 971 003414 973 003416 975 003417 977 003421 978 003422 981 003425 984 003431 985 003437 989 003441 991 003445 994 003457 995 003462 996 003463 1004 003467 1005 003470 1006 003472 1008 003506 1010 003512 1011 003517 1014 003540 1016 003541 1017 003554 1019 003556 1021 003560 1023 003561 1024 003567 1032 003573 1043 003575 1045 003606 1046 003612 1048 003615 1049 003654 1051 003655 1054 003656 1055 003664 1062 003665 1081 003676 1082 003701 1084 003702 1085 003703 1087 003704 1093 003706 1094 003712 1096 003714 1097 003716 1099 003717 1104 003725 1106 003727 1107 003737 1108 003742 1110 003750 1111 003752 1112 003753 1113 003755 1116 003756 1117 003761 1119 003775 1120 003777 1123 004000 1127 004001 1128 004010 1129 004012 1133 004013 1140 004015 1142 004022 1143 004024 1145 004036 1148 004037 1155 004041 1156 004051 1157 004063 1160 004066 1163 004070 1165 004074 1167 004111 1169 004112 1173 004114 1174 004125 1175 004130 1181 004131 1184 004132 1188 004135 1191 004137 1193 004143 1196 004144 1199 004212 1203 004260 1206 004322 1209 004336 1212 004340 1213 004343 1216 004345 1218 004351 1220 004355 1222 004356 1224 004357 1226 004361 1229 004362 1239 004373 1242 004376 1244 004377 1245 004402 1249 004413 1253 004432 1255 004433 1259 004463 1262 004512 1265 004536 1267 004551 1269 004555 1274 004560 1276 004564 1277 004566 1278 004570 1280 004571 1294 004572 1299 004573 1301 004606 1304 004607 1310 004611 1311 004626 1312 004663 1315 004665 1325 004676 1328 004701 1329 004702 1331 004703 1334 004710 1338 004711 1340 004713 1344 004714 1348 004765 1352 005036 1356 005103 1358 005116 1362 005122 1364 005125 1366 005131 1367 005133 1368 005135 1370 005136 1371 005141 1372 005142 1382 005143 1384 005144 1386 005150 1387 005152 1389 005153 1390 005154 ----------------------------------------------------------- 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