/*
			*************************
			*  Q I O T T D R V . H  *
			*************************
	This file contains all of the symbolic definitions needed
	to work with the RSX-11M Full and Half Duplex terminal
	drivers from 'C'. Refer to the RSX-11M/M-PLUS I/O DRIVERS
	REFERENCE MANUAL (AA-H269A-TC) sections 2 and 3. This file
	was produced by extracting and disassembling the QIOSYM
	module from SYSLIB.OLB, then using a TECO macro to reformat
	the definitions into 'C' form. So don't worry, it's correct.

	Bob Denny
	Creative System Design Co.
	Pasadena, Ca. 91107
	(213) 355-6836
	11-Apr-80

	Revised:
		24-Feb-82
		Bob Denny
		Make errors byte size so they don't sign extend
*/

/* Information returned by Get Terminal Support (IO.GTS) QIO */
#define		F1_ACR     1
#define		F1_BTW     2
#define		F1_BUF     4
#define		F1_CCO     16
#define		F1_ESQ     32
#define		F1_HLD     64
#define		F1_LWC     128
#define		F1_RNE     256
#define		F1_RPR     512
#define		F1_RST     1024
#define		F1_RUB     2048
#define		F1_SYN     4096
#define		F1_TRW     8192
#define		F1_UIA     8
#define		F1_UTB     16384
#define		F1_VBF     -32768
#define		F2_ALT     16
#define		F2_CUP     64
#define		F2_DCH     4
#define		F2_DKL     8
#define		F2_GCH     2
#define		F2_SCH     1
#define		F2_SFF     32

/* Success codes specific to terminal drivers */
#define		IS_CC      769
#define		IS_CR      3329
#define		IS_EOT     1025
#define		IS_ESC     6913
#define		IS_ESQ     -25855
#define		IS_PES     -32767
#define		IS_TAB     2305
#define		IS_TMO     2

/* Error codes specific to terminal driver */
#define		IE_IES     0256
#define		IE_PES     0255

/* Errors returned by SF_SMC and SF_GMC */
#define		SE_FIX     2
#define		SE_NIH     12
#define		SE_NSC     10
#define		SE_SPD     6
#define		SE_VAL     4

/* Terminal Driver Special I/O Function codes */
#define		IO_ATA     776
#define		IO_CCO     288
#define		IO_GTS     1280
#define		IO_RAL     520
#define		IO_RNE     528
#define		IO_RPR     2304
#define		IO_RST     513
#define		IO_RTT     2561
#define		IO_WAL     264
#define		IO_WBT     320
#define		SF_GMC     1392
#define		SF_SMC     1312

/* Comm speed values used with TT_RSP/TT_XSP characteristics */
#define		S_EXTA     19
#define		S_EXTB     20
#define		S_0        1
#define		S_100      4
#define		S_110      5
#define		S_1200     11
#define		S_134      6
#define		S_150      7
#define		S_1800     12
#define		S_200      8
#define		S_2000     13
#define		S_2400     14
#define		S_300      9
#define		S_3600     15
#define		S_4800     16
#define		S_50       2
#define		S_600      10
#define		S_7200     17
#define		S_75       3
#define		S_9600     18
/* Characteristics for SF_GMC and SF_SMC Functions */
#define		TC_ACR     20
#define		TC_ALT     25
#define		TC_BIN     53
#define		TC_BLK     34
#define		TC_BSP     19
#define		TC_CCF     24
#define		TC_CEQ     38
#define		TC_CTS     58
#define		TC_DLU     33
#define		TC_EPA     32
#define		TC_ESQ     29
#define		TC_FDX     52
#define		TC_FRM     35
#define		TC_HFF     15
#define		TC_HFL     11
#define		TC_HHT     17
#define		TC_HLD     36
#define		TC_IMG     26
#define		TC_ISL     6
#define		TC_LCP     30
#define		TC_LPP     2
#define		TC_LVF     16
#define		TC_MAX     59
#define		TC_NEC     39
#define		TC_NKB     27
#define		TC_NL      13
#define		TC_NPR     28
#define		TC_NST     18
#define		TC_PAR     31
#define		TC_PRI     41
#define		TC_P8B     56
#define		TC_RAT     7
#define		TC_REM     54
#define		TC_RSP     3
#define		TC_SCP     10
#define		TC_SCR     9
#define		TC_SFF     14
#define		TC_SLV     40
#define		TC_SMO     23
#define		TC_SMP     22
#define		TC_SMR     21
#define		TC_STB     5
#define		TC_TAP     37
#define		TC_TBF     57
#define		TC_TTP     8
#define		TC_UC0     42	/* User-definable Characteristics 0-9 */
#define		TC_UC1     43
#define		TC_UC2     44
#define		TC_UC3     45
#define		TC_UC4     46
#define		TC_UC5     47
#define		TC_UC6     48
#define		TC_UC7     49
#define		TC_UC8     50
#define		TC_UC9     51
#define		TC_VFL     12
#define		TC_WID     1
#define		TC_XSP     4
#define		TC_8BC     55

/* Terminal Driver subfunction bits */
#define		TF_AST     8
#define		TF_BIN     2
#define		TF_CBF     32
#define		TF_CCO     32
#define		TF_ESQ     16
#define		TF_NOT     2
#define		TF_RAL     8
#define		TF_RCU     1
#define		TF_RNC     32
#define		TF_RNE     16
#define		TF_RST     1
#define		TF_SYN     128
#define		TF_TMO     128
#define		TF_WAL     8
#define		TF_WBT     64
#define		TF_WMS     16
#define		TF_XCC     1
#define		TF_XOF     64

/* Values for terminal types used with TC.TPP characteristic */
#define		T_AS33     1
#define		T_AS35     3
#define		T_KS33     2
#define		T_LA36     6
#define		T_L120     14
#define		T_L180     12
#define		T_L30P     5
#define		T_L30S     4
#define		T_SCR0     15
#define		T_UNK0     0
#define		T_USR0     16
#define		T_USR1     17
#define		T_USR2     18
#define		T_USR3     19
#define		T_USR4     20
#define		T_VT05     7
#define		T_VT50     8
#define		T_VT52     9
#define		T_VT55     10
#define		T_VT61     11
#define		T_V100     13
