1 /* BEGIN INCLUDE FILE...  tty_video_tables.incl.pl1 */
 2 /* Created:  3 June 1979 by Bernard S. Greenberg */
 3 /* Modified: 9 June 1981 by G. Palter to switch to line/column orientation */
 4 
 5 /* Definition of the video operations supported by a terminal */
 6 
 7 dcl  tty_video_tables_version_1 fixed binary static options (constant) initial (1);
 8 
 9 dcl  ttyvtblp pointer;
10 dcl  tty_video_table_video_chars_len fixed binary (21);
11 
12 dcl 1 tty_video_table aligned based (ttyvtblp),
13       2 version fixed binary initial (tty_video_tables_version_1),
14       2 screen_height fixed binary,                         /* # of lines on screen */
15       2 screen_line_length fixed binary,                    /* # of characters on a line */
16       2 scroll_count fixed binary,                          /* # of lines scrolled by LF at bottom */
17       2 flags,
18         3 overstrike_available bit (1) unaligned,           /* ON => overstrike works */
19         3 automatic_crlf bit (1) unaligned,                 /* ON => automatically goes to next line from last column */
20         3 simulate_eol bit (1) unaligned,                   /* ON => program must simulate clear-to-end-of-line */
21         3 pad bit (33) unaligned,
22       2 video_chars_len fixed binary (21),                  /* combined length of all sequences used */
23       2 pad (2) bit (36),
24       2 nseq fixed binary,                                  /* # of video sequences defined */
25       2 sequences (N_VIDEO_SEQUENCES refer (tty_video_table.nseq)) like tty_video_seq aligned,
26                                                             /* the control sequences */
27       2 video_chars character (tty_video_table_video_chars_len refer (tty_video_table.video_chars_len)) unaligned;
28 
29 dcl  video_chars_ptr pointer;                               /* -> tty_video_table.video_chars */
30 dcl  video_chars character (tty_video_table.video_chars_len) based (video_chars_ptr);
31 
32 
33 /* A single video sequence: it may contain encoded screen coordinates or a repeat counter */
34 
35 dcl  ttyvseqp pointer;
36 
37 dcl 1 tty_video_seq based (ttyvseqp) aligned,
38       2 flags unaligned,                                    /* first 2 characters */
39         3 present bit (1) unaligned,                        /* ON => this feature is present */
40         3 interpret bit (1) unaligned,                      /* ON => sequence contains encoded coordinates/repeat count */
41         3 able_to_repeat bit (1) unaligned,                 /* ON => sequence contains a repeat count */
42         3 cpad_present bit (1) unaligned,                   /* ON => this operation must be padded */
43         3 cpad_in_chars bit (1) unaligned,                  /* ON => pad expressed in characters */
44         3 pad bit (7) unaligned,
45         3 general bit (6) unaligned,                        /* reserved for per-operation flags */
46       2 cpad fixed binary (18) unsigned unaligned,          /* padding in characters of .1 millisecond units */
47       2 pad bit (15) unal,
48       2 len fixed binary (9) unsigned unaligned,            /* # of valid characters in sequence */
49       2 seq_index fixed binary (12) unsigned unaligned;     /* start of string in character data */
50 
51 
52 /* Available operations */
53 
54 dcl (ABS_POS        initial (1),        CLEAR_SCREEN        initial (2),
55      CLEAR_TO_EOS   initial (3),        HOME                initial (4),
56      CLEAR_TO_EOL   initial (5),        CURSOR_UP           initial (6),
57      CURSOR_RIGHT   initial (7),        CURSOR_DOWN         initial (8),
58      CURSOR_LEFT    initial (9),        INSERT_CHARS        initial (10),
59      END_INSERT_CHARS   /* if not present, insert-chars opens up N spaces */
60                     initial (11),       DELETE_CHARS        initial (12),
61      INSERT_LINES   initial (13),       DELETE_LINES        initial (14))
62           fixed binary static options (constant);
63 
64 dcl  N_VIDEO_SEQUENCES fixed binary static options (constant) initial (14);
65 
66 
67 /* Encoding of special values (eg: coordinates or the repeat count) */
68 
69 dcl 1 tty_numeric_encoding based unaligned,
70       2 flags,
71         3 must_be_on bit (1) unaligned,                     /* ON => an encoding; not a character */
72         3 express_in_decimal bit (1) unaligned,             /* ON => express it as decimal digits */
73         3 express_in_octal bit (1) unaligned,               /* ON => express it as octal digits; both OFF => in binary */
74 
75         3 offset_is_0 bit (1) unaligned,                    /* ON => offset is not stored as it's zero */
76       2 l_c_or_n fixed binary (2) unsigned unaligned,       /* 0 = line, 1= column, 2 = repeat-count */
77       2 num_digits fixed bin (2) unsigned unaligned,        /* # of digits for decimal/octal; 0 => as many as needed */
78       2 pad bit (1) unaligned,
79       2 offset fixed bin (8) unaligned;                     /* offset to add to the number */
80 
81 /* END INCLUDE FILE tty_video_tables.incl.pl1 */