1 /* BEGIN INCLUDE FILE tc_operations_.incl.pl1 BIM May 1981 */
  2 
  3 /* Modified 7 February 1985 by Jon Rochlis to add saved_ips_mask to
  4    request_header. */
  5 
  6 /* format: style3 */
  7 
  8 /* These are the operations that the "virtual video terminal" is expected to
  9 provide.  These are the primitive operation.  For example, the various
 10 flavors of region clearing are collapsed into "clear region".  The particular
 11 operations of clear screen, clear to end of screen, and clear to end of line
 12 are special cases which will be used when terminal functionality permits.  Of
 13 course, at the user interface level, these are provided as convienience.
 14 This introduces the innefficiency of mapping CLEOL -> CL-REGION -> CLEOL.
 15 However, CLEOL _^Hi_^Hn _^Ha _^Hw_^Hi_^Hn_^Hd_^Ho_^Hw does not always mean CLEOL on the screen.  It will
 16 not unless the window is full width, or happens to be rightmost.  Similiarly,
 17 a user call of CLEAR_WINDOW is just a region to the terminal.  */
 18 
 19 declare   request_ptr         pointer;
 20 declare   REQUEST_SENTINEL    character (4) aligned init ("RqqS") internal static options (constant);
 21 
 22 declare   1 request_header    aligned based (request_ptr),
 23             2 sentinel        character (4) aligned,
 24             2 request_id      fixed bin (71),               /* Clock Value */
 25             2 window_id       bit (36) aligned,
 26             2 coords          aligned like r_coords,
 27             2 operation       fixed bin,
 28             2 flags           aligned,
 29               3 async_interruption
 30                               bit (1) unaligned,            /* Output */
 31               3 this_window   bit (1) unaligned,            /* ditto */
 32             2 saved_ips_mask  bit (36) aligned;             /* so tc_block can restore mask from window_io_ */
 33 
 34 declare   1 r_coords          aligned based,
 35             2 row             fixed bin,
 36             2 col             fixed bin;
 37 
 38 declare   OP_ERROR            fixed bin initial (0) internal static options (constant);
 39 declare   OP_POSITION_CURSOR  fixed bin initial (1) internal static options (constant);
 40 
 41 declare   OP_CLEAR_REGION     fixed bin initial (2) internal static options (constant);
 42 
 43 /* This next one is for the TC operation of clearing terminal without
 44    any assumptions, used when the user indicates screen damage, or on
 45    reconnection. */
 46 
 47 declare   OP_CLEAR_SCREEN_NO_OPT
 48                               fixed bin init (4) internal static options (constant);
 49 
 50 declare   1 request_clear_region
 51                               aligned based (request_ptr),
 52             2 header          aligned like request_header,
 53             2 by_name         aligned,
 54               3 extent        aligned,
 55                 4 rows        fixed bin,
 56                 4 columns     fixed bin;
 57 
 58 declare   OP_INSERT_TEXT      fixed bin initial (3) internal static options (constant);
 59 
 60 declare   1 request_text      aligned based (request_ptr),
 61             2 header          aligned like request_header,
 62             2 by_name         aligned,
 63               3 text_ptr      pointer,
 64               3 text_length   fixed bin (21);
 65 
 66 declare   request_text_string character (request_text.text_length) based (request_text.text_ptr);
 67 
 68 declare   OP_DELETE_CHARS     fixed bin initial (6) internal static options (constant);
 69 
 70 declare   1 request_delete_chars
 71                               aligned based (request_ptr),
 72             2 header          aligned like request_header,
 73             2 by_name         aligned,
 74               3 count         fixed bin;
 75 
 76 declare   OP_SCROLL_REGION    fixed bin initial (7) internal static options (constant);
 77 
 78 declare   1 request_scroll_region
 79                               aligned based (request_ptr),
 80             2 header          aligned like request_header,
 81             2 by_name         aligned,
 82               3 start_line    fixed bin,
 83               3 n_lines       fixed bin,
 84               3 distance      fixed bin;
 85 
 86 declare   OP_BELL             fixed bin initial (8) internal static options (constant);
 87 declare   OP_GET_CHARS_ECHO   fixed bin initial (9) internal static options (constant);
 88 declare   OP_GET_CHARS_NO_ECHO
 89                               fixed bin initial (10) internal static options (constant);
 90 declare   OP_WRITE_SYNC_GET_CHARS_NO_ECHO
 91                               fixed bin initial (11) internal static options (constant);
 92 
 93 declare   1 request_read_status
 94                               aligned based (request_ptr),
 95             2 header          aligned like request_header,
 96             2 by_name         aligned,                      /*  not used as such */
 97               3 returned_length
 98                               fixed bin,
 99               3 event_channel fixed bin (71);
100 
101 declare   1 request_read      aligned based (request_ptr),
102             2 header          aligned like request_header,
103             2 by_name         aligned,
104               3 buffer_ptr    pointer,
105               3 buffer_length fixed bin (21),
106               3 returned_length
107                               fixed bin (21),
108               3 returned_break_flag
109                               bit (1) aligned,
110               3 prompt_ptr    pointer,
111               3 prompt_length fixed bin (21),
112               3 breaks        bit (128) unaligned;
113 
114 
115 declare   request_prompt      character (request_read.prompt_length) based (request_read.prompt_ptr);
116 declare   request_buffer      character (request_read.buffer_length) based (request_read.buffer_ptr);
117 
118 declare   OP_GET_CURSOR_POSITION
119                               fixed bin initial (12) internal static options (constant);
120 declare   OP_READ_STATUS      fixed bin initial (13) internal static options (constant);
121 declare   OP_OVERWRITE_TEXT   fixed bin initial (14) internal static options (constant);
122 declare   OP_WRITE_RAW        fixed bin initial (15) internal static options (constant);
123 declare   OP_READ_ONE         fixed bin initial (16) internal static options (constant);
124 
125 /* use request_read, and return the character in the buffer there */
126 /* pass the BLOCK flag in in break_flag. Well... */
127 
128 /* END INCLUDE FILE tc_operations_.incl.pl1 */