BPXYTIOS — Map the termios structure

Use PREFIX to make the labels unique. The characters specified will be appended before each label.
                                                      
            BPXYTIOS   , PREFIX=                                                
** BPXYTIOS: Termios structure                                                  
**  Used By: TGA TSA TFH TFW                                                    
BPXYTIOS DSECT ,                   Define DSECT                                 
* baud rate values                                                              
B0          EQU    0               0     baud (hang-up)                         
B50         EQU    1               50    baud                                   
B75         EQU    2               75    baud                                   
B110        EQU    3               110   baud                                   
B134        EQU    4               134.5 baud                                   
B150        EQU    5               150   baud                                   
B200        EQU    6               200   baud                                   
B300        EQU    7               300   baud                                   
B600        EQU    8               600   baud                                   
B1200       EQU    9               1200  baud                                   
B1800       EQU   10               1800  baud                                   
B2400       EQU   11               2400  baud                                   
B4800       EQU   12               4800  baud                                   
B9600       EQU   13               9600  baud                                   
B19200      EQU   14               19200 baud                                   
B38400      EQU   15               38400 baud                                   
* c_cflag offsets for baud rate.  These values are                              
* used to refer to the correct byte within c_cflag.  For                        
* instance, "MVI   C_CFLAG+ISPEED_O,B50".                                       
OSPEED_O    EQU   0                Offset to OUTPUT baud rate                   
ISPEED_O    EQU   1                Offset to INPUT baud rate                    
* Values for c_cflag field are bitwise distinct except for                      
* character size bits - which form a number.                                    
CLOCAL      EQU   X'01'            Ignore modem status lines                    
CREAD       EQU   X'02'            Enable receiver                              
CSIZE       EQU   X'30'            Character size bits                          
CS5         EQU   X'00'              B'00' - 5 bits/character                   
CS6         EQU   X'10'              B'01' - 6 bits/character                   
CS7         EQU   X'20'              B'10' - 7 bits/character                   
CS8         EQU   X'30'              B'11' - 8 bits/character                   
CSTOPB      EQU   X'80'            Send two stop bits, else one                 
HUPCL       EQU   X'01'            Hang up on last close                        
PARENB      EQU   X'02'            Parity enable                                
PARODD      EQU   X'04'            Odd parity, else even                        
PACKET      EQU   X'08'            Packet mode enabled                          
PKT3270     EQU   X'10'            3270 Passthru mode allowed                   
PTU3270     EQU   X'20'            3270 Passthru mode enabled                   
PKTXTND     EQU   X'40'            Extended Packet mode enabled                 
* c_cflag offsets for bits defined above.  These values are                     
* used to refer to the correct byte within c_cflag.  For                        
* instance, "TM    C_CFLAG+HUPCL_O,HUPCL".                                      
CLOCAL_O    EQU   3                                                             
CREAD_O     EQU   3                                                             
CSIZE_O     EQU   3                                                             
CS5_O       EQU   3                                                             
CS6_O       EQU   3                                                             
CS7_O       EQU   3                                                             
CS8_O       EQU   3                                                             
CSTOPB_O    EQU   3                                                             
HUPCL_O     EQU   2                                                             
PARENB_O    EQU   2                                                             
PARODD_O    EQU   2                                                             
PACKET_O    EQU   2                                                             
PKT3270_O    EQU  2                                                             
PTU3270_O    EQU  2                                                             
PKTXTND_O    EQU  2                                                             
* Values for c_lflag field are bitwise distinct.                                
ECHO        EQU  X'08'             Enable echo                                  
ECHOE       EQU  X'02'             Echo ERASE as error correcting      X        
                                     backspace                                  
ECHOK       EQU  X'04'             Echo KILL                                    
ECHONL      EQU  X'01'             Echo new line                                
ICANON      EQU  X'10'             Canonical input                              
IEXTEN      EQU  X'20'             Enable extended functions                    
ISIG        EQU  X'40'             Enable signals                               
NOFLSH      EQU  X'80'             Disable flush after interrupt,      X        
                                     quit, or suspend                           
TOSTOP      EQU  X'40'             Send SIGTTOU for background         X        
                                     output                                     
XCASE       EQU  X'80'             Canonical Upper/Lower               X        
                                     presentation                               
* c_lflag offsets for bits defined above.  These values are                     
* used to refer to the correct byte within c_lflag.  For                        
* instance, "TM    C_LFLAG+TOSTOP_O,TOSTOP".                                    
ECHO_O      EQU  3                                                              
ECHOE_O     EQU  3                                                              
ECHOK_O     EQU  3                                                              
ECHONL_O    EQU  3                                                              
ICANON_O    EQU  3                                                              
IEXTEN_O    EQU  3                                                              
ISIG_O      EQU  3                                                              
NOFLSH_O    EQU  0                                                              
TOSTOP_O    EQU  1                                                              
XCASE_O     EQU  3                                                              
* Values for c_iflag field are bitwise distinct.                                
BRKINT      EQU  X'01'             Signal interrupt on break                    
ICRNL       EQU  X'02'             Map CR to NL on input                        
IGNBRK      EQU  X'04'             Ignore break condition                       
IGNCR       EQU  X'08'             Ignore CR                                    
IGNPAR      EQU  X'10'             Ignore characters with parity       X        
                                     errors                                     
INLCR       EQU  X'20'             Map NL to CR in input                        
INPCK       EQU  X'40'             Enable input parity check                    
ISTRIP      EQU  X'80'             Strip character                              
IXOFF       EQU  X'01'             Enable start/stop input             X        
                                     control                                    
IXON        EQU  X'02'             Enable start/stop output            X        
                                     control                                    
PARMRK      EQU  X'04'             Mark parity errors                           
IUCLC       EQU  X'08'             Map UC->LC on input                          
IXANY       EQU  X'10'             Any char restarts output                     
* c_iflag offsets for bits defined above.  These values are                     
* used to refer to the correct byte within c_iflag.  For                        
* instance, "TM    C_IFLAG+BRKINT_O,BRKINT".                                    
BRKINT_O    EQU  3                                                              
ICRNL_O     EQU  3                                                              
IGNBRK_O    EQU  3                                                              
IGNCR_O     EQU  3                                                              
IGNPAR_O    EQU  3                                                              
INLCR_O     EQU  3                                                              
INPCK_O     EQU  3                                                              
ISTRIP_O    EQU  3                                                              
IXOFF_O     EQU  2                                                              
IXON_O      EQU  2                                                              
PARMRK_O    EQU  2                                                              
IUCLC_O     EQU  2                                                              
IXANY_O     EQU  2                                                              
* Values for c_oflag are bitwise distinct.                                      
OPOST       EQU X'01'              Perform output processing                    
OLCUC       EQU X'02'              Map LC->UC on output                         
ONLCR       EQU X'04'              Map NL->CR on output                         
OCRNL       EQU X'08'              Map CR->NL on output                         
ONOCR       EQU X'10'              No CR at column 0                            
ONLRET      EQU X'20'              NL performs CR function                      
OFILL       EQU X'40'              Use fill chars for delay                     
OFDEL       EQU X'80'              Use DEL, not NUL, for fill                   
NLDLY       EQU X'01'              Newline delay type                           
NL0         EQU X'00'                NL delay type 0                            
NL1         EQU X'01'                NL delay type 1                            
TABDLY      EQU X'0C'              Tab delay type                               
TAB0        EQU X'00'                Tab delay type 0                           
TAB1        EQU X'04'                Tab delay type 1                           
TAB2        EQU X'08'                Tab delay type 2                           
TAB3        EQU X'0C'                Expand tabs to spaces                      
CRDLY       EQU X'30'              CR delay type                                
CR0         EQU X'00'                CR delay type 0                            
CR1         EQU X'10'                CR delay type 1                            
CR2         EQU X'20'                CR delay type 2                            
CR3         EQU X'30'                CR delay type 3                            
FFDLY       EQU X'40'              Form-feed delay type                         
FF0         EQU X'00'                FF delay type 0                            
FF1         EQU X'40'                FF delay type 1                            
BSDLY       EQU X'80'              Backspace delay type                         
BS0         EQU X'00'                BS delay type 0                            
BS1         EQU X'80'                BS delay type 1                            
VTDLY       EQU X'01'              Vertical-tab delay type                      
VT0         EQU X'00'                VT delay type 0                            
VT1         EQU X'01'                VT delay type 1                            
*                                                                               
* c_oflag offsets for bits defined above.  These values are                     
* used to refer to the correct byte within c_oflag.  For                        
* instance, "TM    C_OFLAG+OPOST_O,OPOST".                                      
*                                                                               
OPOST_O     EQU 3                                                               
OLCUC_O     EQU 3                                                               
ONLCR_O     EQU 3                                                               
OCRNL_O     EQU 3                                                               
ONOCR_O     EQU 3                                                               
ONLRET_O    EQU 3                                                               
OFILL_O     EQU 3                                                               
OFDEL_O     EQU 3                                                               
NLDLY_O     EQU 2                                                               
NL0_0       EQU 2                                                               
NL1_0       EQU 2                                                               
TABDLY_O    EQU 2                                                               
TAB0_O      EQU 2                                                               
TAB1_O      EQU 2                                                               
TAB2_O      EQU 2                                                               
TAB3_O      EQU 2                                                               
CRDLY_O     EQU 2                                                               
CR0_0       EQU 2                                                               
CR1_0       EQU 2                                                               
CR2_0       EQU 2                                                               
CR3_0       EQU 2                                                               
FFDLY_O     EQU 2                                                               
FF0_0       EQU 2                                                               
FF1_0       EQU 2                                                               
BSDLY_O     EQU 2                                                               
BS0_0       EQU 2                                                               
BS1_0       EQU 2                                                               
VTDLY_O     EQU 1                                                               
VT0_0       EQU 1                                                               
VT1_0       EQU 1                                                               
* Optional actions used by tcsetattr()                                          
TCSANOW       EQU  0               Change occurs immediately                    
TCSADRAIN     EQU  1               Change occurs after all output      X        
                                     has been written                           
TCSAFLUSH     EQU  2               Change occurs after all output      X        
                                     has been written and input        X        
                                     has been discarded                         
* queue selector values for tcflush                                             
TCIFLUSH     EQU   0               Flush data received but not read             
TCOFLUSH     EQU   1               Flush data written but not sent              
TCIOFLUSH    EQU   2               Flush both data received but not    X        
                                     read and data written but not sent         
* action values for tcflow()                                                    
TCOOFF      EQU 0                  Suspend output                               
TCOON       EQU 1                  Restart suspended output                     
TCIOFF      EQU 2                  Transmit STOP character                      
TCION       EQU 3                  Transmit START character                     
* Special Control Characters subscripts for cc_c                                
*   field                                                                       
VINTR       EQU  0                 INTR  character                              
VQUIT       EQU  1                 QUIT  character                              
VERASE      EQU  2                 ERASE character                              
VKILL       EQU  3                 KILL  character                              
VEOF        EQU  4                 EOF   character                              
VEOL        EQU  5                 EOL   character                              
VMIN        EQU  6                 MIN   value                                  
VSTART      EQU  7                 START character                              
VSTOP       EQU  8                 STOP  character                              
VSUSP       EQU  9                 SUSP  character                              
VTIME       EQU 10                 TIME  value                                  
                                                                                
NCCS     EQU   11                  Number of special control chars              
C_CFLAG    DC  F'0'                Control modes                                
C_IFLAG    DC  F'0'                Input modes                                  
C_LFLAG    DC  F'0'                Local modes                                  
C_OFLAG    DC  F'0'                Output modes                                 
C_CC       DC  (NCCS)X'0'          Control characters and values                
BPXYTIOS#LENGTH      EQU   *-BPXYTIOS Length of this structure                  
** BPXYTIOS End