1 /* BEGIN INCLUDE FILE ... terminal_io_record.incl.pl1 */
 2 /* Created:  November 1979 by G. Palter */
 3 /* Modified: 26 March 1982 by G. Palter to make the structure more compatible with use of the like attribute */
 4 
 5 
 6 /* Record format used by I/O modules designed for communcation with remote I/O daemon stations */
 7 
 8 dcl 1 terminal_io_record aligned based (terminal_io_record_ptr),
 9       2 header,
10         3 version fixed binary,
11         3 device_type fixed binary,                         /* type of device sending/receiving this record --
12                                                                reader/printer/punch/teleprinter */
13         3 slew_control,                                     /* slew control data: used for printer and teleprinter only */
14           4 slew_type fixed binary (18) unaligned unsigned, /* type of slewing operation before/after this line --
15                                                                by-count/top-of-form/inside-page/outside-page/to-channel */
16           4 slew_count fixed binary (18) unaligned unsigned,/* # of lines if by count; channel # if to channel */
17         3 flags,
18           4 binary bit (1) unaligned,                       /* ON => data in record should be written in binary mode */
19           4 preslew bit (1) unaligned,                      /* ON => perform above slew before printing data;
20                                                                OFF => perform above slew after printing data */
21           4 pad bit (34) unaligned,
22         3 element_size fixed binary,                        /* # of bits in a data element */
23         3 n_elements fixed binary (24),                     /* # of elements in the record */
24       2 data,                                               /* force word alignment */
25         3 bits (terminal_io_record_n_elements refer (terminal_io_record.n_elements))
26             bit (terminal_io_record_element_size refer (terminal_io_record.element_size)) unaligned;
27 
28 dcl  terminal_io_record_ptr pointer;
29 
30 dcl  terminal_io_record_element_size fixed binary;          /* used for allocating terminal_io_record structures */
31 dcl  terminal_io_record_n_elements fixed binary (24);
32 
33 
34 /* Manifest constants */
35 
36 dcl  terminal_io_record_version_1 fixed binary static options (constant) initial (1);
37 
38 dcl (TELEPRINTER_DEVICE       initial (1),
39      READER_DEVICE            initial (2),
40      PRINTER_DEVICE           initial (3),
41      PUNCH_DEVICE             initial (4))
42           fixed binary static options (constant);
43 
44 dcl (SLEW_BY_COUNT            initial (1),
45      SLEW_TO_TOP_OF_PAGE      initial (2),
46      SLEW_TO_INSIDE_PAGE      initial (3),                  /* skip to top of next inside page (head sheet) */
47      SLEW_TO_OUTSIDE_PAGE     initial (4),                  /* skip to top of next outside page (tail sheet) */
48      SLEW_TO_CHANNEL          initial (5))                  /* skip to specified channel stop */
49           fixed binary static options (constant);
50 
51 
52 /* Data in record as a character string (terminal_io_record.element_size = 9) */
53 
54 dcl  terminal_io_record_data_chars character (terminal_io_record.n_elements) unaligned
55           based (addr (terminal_io_record.bits));
56 
57 dcl  terminal_io_record_data_chars_varying_max_len fixed binary (21);  /* Set this before using the varying string. */
58 dcl  terminal_io_record_data_chars_varying character (terminal_io_record_data_chars_varying_max_len) varying
59           based (addr (terminal_io_record.n_elements));     /* varying string consists of length and data */
60 
61 
62 /* Data in record as a bit string (terminal_io_record.element_size = 1) */
63 
64 dcl terminal_io_record_data_bits bit (terminal_io_record.n_elements) unaligned based (addr (terminal_io_record.bits));
65 
66 /* END INCLUDE FILE ... terminal_io_record.incl.pl1 */