From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 27-SEP-1989 18:21
To:	MRGATE::"ARISIA::EVERHART"
Subj:	RE: ANSI/VT escape codes

Message-Id:  <8909272209.AA22074@crdgw1.ge.com>
Received: From ARRAY.FIBG.WPAFB.AF.MIL by CRVAX.SRI.COM with TCP; Wed, 27 SEP 89 14:18:54 PDT
Date: 27 Sep 89 16:55:00 EDT
From: "Jeffrey D. Pound" <jeff@array.fibg.wpafb.af.mil>
Subject: RE: ANSI/VT escape codes
To: "lizak98" <lizak98%snybufva.bitnet@cornellc.cit.cornell.edu>
Cc: "info-vax" <info-vax@sri.com>

Hello netters and Rob,
	inclosed you'll find my solution to the problem of codes for VT 
	terminals.  First a com subroutine and then a text file.
******************************************************************************
* Jeffrey D. Pound  -  Electronics Engineer  (513)255-5200    Fax: 255-4127  *
* Disclaimer - I don't believe half of what I say, so how could you.         *
*US Mail:                             *Internet:                             *
* WRDC/FIBGA Rm 218 Bldg. 24C         *         Jeff@array.fibg.wpafb.af.mil *
* Wright-Patterson AFB, Oh 45433-6523 *             Poundjd@wpafb-fdl.af.mil *
******************************************************************************
*    What ever your moral's are,  be true to them.  :-)    Have a Happy Day. *
******************************************************************************
*************************cut here*********************************************
$!		Subroutine		Escape_sequences	1
$ESCAPE_SEQUENCES:SUBROUTINE
$!
$!      SUBROUTINE ::>> ESCAPE_SEQUENCES
$!
$!	7 BIT CODES IN OCTAL.....
$	NUL[0,8]==%X00
$	SOH[0,8]==%X01
$	STX[0,8]==%X02
$	ETX[0,8]==%X03
$	EOT[0,8]==%X04
$	ENQ[0,8]==%X05
$	ACK[0,8]==%X06
$	BEL[0,8]==%X07
$	BS[0,8]==%X08
$	HT[0,8]==%X09
$	LF[0,8]==%X0A
$	VT[0,8]==%X0B
$	FF[0,8]==%X0C
$	CR[0,8]==%X0D
$	SO[0,8]==%X0E
$	SI[0,8]==%X0F
$	DLE[0,8]==%X10
$	DC1[0,8]==%X11
$	XON[0,8]==%X11
$	DC2[0,8]==%X12
$	DC3[0,8]==%X13
$	XOFF[0,8]==%X13
$	DC4[0,8]==%X14
$	NAK[0,8]==%X15
$	SYN[0,8]==%X16
$	ETB[0,8]==%X17
$	CAN[0,8]==%X18
$	EM[0,8]==%X19
$	SUB[0,8]==%X1A
$	ESC[0,8]==%X1B
$	FS[0,8]==%X1C
$	GS[0,8]==%X1D
$	RS[0,8]==%X1E
$	US[0,8]==%X1F
$	DEL[0,8]==%X7F
$!		Subroutine		Escape_sequences	2
$!
$!	8 BIT CONTROL CHARACTERS.	
$!
$	IND[0,8]==%X84
$	NES[0,8]==%X85
$	SSA[0,8]==%X86
$	ESA[0,8]==%X87
$	HTS[0,8]==%X88
$	HTJ[0,8]==%X89
$	VTS[0,8]==%X8A
$	PLD[0,8]==%X8B
$	PLU[0,8]==%X8C
$	RI[0,8]==%X8D
$	SS2[0,8]==%X8E
$	SS3[0,8]==%X8F
$	DCS[0,8]==%X90
$	PU1[0,8]==%X91
$	PU2[0,8]==%X92
$	STS[0,8]==%X93
$	CCH[0,8]==%X94
$	MW[0,8]==%X95
$	SPA[0,8]==%X96
$	EPA[0,8]==%X97
$	CSI[0,8]==%X9B
$	ST[0,8]==%X9C
$	OSC[0,8]==%X9D
$	PM[0,8]==%X9E
$	APC[0,8]==%X9F
$!		Subroutine		Escape_sequences	3
$!
$!	Define the symbols to do terminal setup...
$!
$	application_cursor_keys		==	esc + "[?1h"
$	ansi_cursor_keys		==	esc + "[?1l"
$	ansi_mode			==	esc + "[?2h"
$	vt52_mode			==	esc + "[?2l"
$	column_132			==	esc + "[?3h"
$	column_80			==	esc + "[?3l"
$	scroll_smooth			==	esc + "[?4h"
$	scroll_jump			==	esc + "[?4l"
$	reverse_video_whole		==	esc + "[?5h"
$	normal_video_whole		==	esc + "[?5l"
$	auto_wrap			==	esc + "[?7h"
$	noauto_wrap			==	esc + "[?7l"
$	auto_repeat			==	esc + "[?8h"
$	noauto_repeat			==	esc + "[?8l"
$!
$! setup symbols for selecting video attributes for output characters.
$!
$	bold_intensity			==	esc + "[1m"
$	nobold_intensity		==	esc + "[22m"
$	underscore			==	esc + "[4m"
$	nounderscore			==	esc + "[24m"
$	blinking			==	esc + "[5m"
$	noblinking			==	esc + "[25m"
$	reverse_video			==	esc + "[7m"
$	noreverse_video			==	esc + "[27m"
$	double_height_top		==	esc + "#3"
$	double_height_bottom		==	esc + "#4"
$	single_height_single_wide	==	esc + "#5"
$	single_height_double_wide	==	esc + "#6"
$!		Subroutine		Escape_sequences	4
$!
$!	setup symbols for functions.
$!
$	clear_screen			==	esc +"[2J"
$	home_cursor			==	esc + "[0;0H"
$    	exit
$      ENDSUBROUTINE
******************************************************************************
******************************************************************************
					Terminal_information	1
CODES SENT:
      CODES GENERATED BY THE EDITING KEYPAD.
	KEY		VT200		VT100	VT52
	find		CSI  1 ~	----	----
	insert here	CSI  2 ~	----	----
	remove		CSI  3 ~	----	----
	select		CSI  4 ~	----	----
	prev screen	CSI  5 ~	----	----
	next screen	CSI  6 ~	----	----
      CODES GENERATED BY THE CURSOR CONTROL KEYS.
	KEY		VT200		VT100	VT52
	up arrow	CSI  A		CSI  A	<ESC> A
	down arrow	CSI  B		CSI  B	<ESC> B
	right arrow	CSI  C		CSI  C	<ESC> C
	left arrow	CSI  D		CSI  D	<ESC> D
       APPLICATION MODE:
	up arrow	SS3 A		SS3 A   <ESC> A
	down arrow	SS3 B		SS3 B   <ESC> B
	right arrow	SS3 C		SS3 C   <ESC> C
	left arrow	SS3 D		SS3 D   <ESC> D
      CODES GENERATED BY THE AUXILIARY KEYPAD KEYS.
		   VT200/VT100		    VT52
		NUMERIC	KEY PAD		NUMERIC	KEY PAD
	KEY	MODE	APP. MODE	MODE	APP. MODE
	0	0	SS3 p		0	<ESC> ? p
	1	1	SS3 q		1	<ESC> ? q
	2	2	SS3 r		2	<ESC> ? r
	3	3	SS3 s		3	<ESC> ? s
	4	4	SS3 t		4	<ESC> ? t
	5	5	SS3 u		5	<ESC> ? u
	6	6	SS3 v		6	<ESC> ? v
	7	7	SS3 w		7	<ESC> ? w
	8	8	SS3 x		8	<ESC> ? x
	9	9	SS3 y		9	<ESC> ? y
	-	-	SS3 m		-	<ESC> ? m  *
	,	,	SS3 l		,	<ESC> ? l  *
	.	.	SS3 n		.	<ESC> ? n
	enter	return	SS3 M		return	<ESC> ? M
	PF1	SS3 P	SS3 P		<ESC> P	<ESC> P
	PF2	SS3 Q	SS3 Q		<ESC> Q	<ESC> Q
	PF3	SS3 R	SS3 R		<ESC> R	<ESC> R
	PF4	SS3 S	SS3 S		<ESC> S	<ESC> S

		* NOTE:		THESE SEQUENCES CAN NOT BE GENERATED ON 
				A VT52 TERMINAL.
					Terminal_information	2
CODES SENT:
     CODES GENERATED BY THE FUNCTION KEYS ON A VT200 SERIES TERMINAL.
	NAME ON		GENERIC	CODE		VT100,VT52
	THE KEY		NAME	SEQUENCE	MODES

	HOLD SCREEN	(F1)	---------	----------
	PRINT SCREEN	(F2)	---------	----------
	SET-UP		(F3)	---------	----------
	DATA/TALK	(F4)	---------	----------
	BREAK		(F5)	---------	----------
	F6		F6	CSI  1 7 ~	----------
	F7		F7	CSI  1 8 ~	----------
	F8		F8	CSI  1 9 ~	----------
	F9		F9	CSI  2 0 ~	----------
	F10		F10	CSI  2 1 ~	----------
	F11	(ESC)	F11	CSI  2 3 ~	<ESC>
	F12	(BS)	F12	CSI  2 4 ~	BACK SPACE
	F13	(LF)	F13	CSI  2 5 ~	LINE FEED
	F14		F14	CSI  2 6 ~	----------
	HELP		(F15)	CSI  2 8 ~	----------
	DO		(F16)	CSI  2 9 ~	----------
	F17		F17	CSI  3 1 ~	----------
	F18		F18	CSI  3 2 ~	----------
	F19		F19	CSI  3 3 ~	----------
	F20		F20	CSI  3 4 ~	----------
					Terminal_information	3
RECEIVED CODES:
     C0 (ASCII) Control Characters Recognized: VT240
	Mnemonic	Code	Name	Action Taken
	NUL	0/0	Null	Ignored when received.
	ENQ	0/5	Enquiry	Generates answerback message.
	BEL	0/7	Bell	Generates a Bell tone if bell enabled.	
	BS	0/8	Backspace
				Moves cursor to the left one character 
				position. If cursor is at left margin, 
				no action occurs.
	HT	0/9	Horizonal Tabulation
				Moves cursor to next tab stop, or to 
				right margin if there are no more tab 
				stops. Does not cause auto wrap.
	LF	0/10	Line Feed
				Causes a line feed or a new line 
				operation, depending on the setting of 
				new line mode. 
	VT	0/11	Vertical Tabulation
				Processed as LF.
	FF	0/12	Form Feed
				Processed as LF.
	CR	0/13	Carriage return
				Moves cursor th left margin on current 
				line.
	SO	0/14	Shift out
	 (LS1)		( Lock shift G1 )
				Invokes G1 character set into GL. G1 is 
				designated by a select character set 
				(SCS) sequence.
	SI	0/15	Shift in
	 (LS0)		( Lock shift G0 )
				Invokes G0 character set into GL. G0 is 
				designated by a select character set 
				(SCS) sequence.
	DC1	1/1	Device Control 1
				Also referred to as XON. If XOFF support
				is enabled, DC1 clears DC3 (XOFF); this 
				causes the terminal to continue sending 
				characters (keyboard unlocks), unless 
				KAM mode is currently set.
 					Terminal_information	4
	DC3	1/3	Device Control 3
				Also referred to as XOFF. If XOFF 
				support is enabled, DC3 causes the 
				terminal to stop sending characters 
				until a DC1 control character is 
				received.
	CAN	1/8	Cancel	If received during an escape or control 
				sequence, terminates and cancels the 
				sequence, No error character is 
				displayed. if received during a device 
				control string, the DCS is terminated 
				and no error character is displayed.
	SUB	1/10	Substitute
				If received during an escape or control 
				sequence, terminates and cancels the 
				sequence. Also displays a reverse 
				question mark. If received during a 
				device control sequence, terminates the 
				DCS and displays reverse question mark.
	ESC	1/11	Escape	Processed as escape sequence introducer.
				Terminates any escape, control or 
				device control sequence in progress.
	DEL	7/15	Delete	Ignored when received. Cannot be used as
				a time fill character.
 					Terminal_information	5
RECEIVED CODES:
     C1 (ASCII) Control Characters Recognized: VT240
		8-bit	7-bit
      Mnemonic	Code	Code		Name	Action Taken
	IND	8/4	1/11 	4/4	Index	moves cursor down one 
			<ESC>	D		line in same column.
	NEL	8/5	1/11	4/5	Next Line
			<ESC>	E		Moves cursor to first 
						position on the next 
						line.  If cursor is at 
						bottom margin, screen 
						performs an scroll up.
	HTS	8/8	1/11	4/8	Horizontal Tab Set.
			<ESC>	H		Sets one horizontal tab
						stop at the column where
						the cursor is.
	RI	8/13	1/11	4/13	Reverse	moves cursor up one line
			<ESC>	M	Index	in same column. if 
						cursor is at top margin,
						screen performs a scroll
						down.
	SS2	8/14	1/11	4/14	Single shift G2.
			<ESC>	N		Temporarily invokes G2 
						Character set into GL 
						for the next graphic 
						character. G2 is 
						designated by a select 
						character Set (SCS) 
						sequence.
	SS3	8/15	1/11	4/15	Single Shift G3.
			<ESC>	O		Temporarily invokes G3 
						Character set into GL 
						for the next graphic 
						character. G3 is 
						designated by a select 
						character Set (SCS) 
						sequence.
	DCS	9/0	1/11	5/0	Device Control String.
			<ESC>	P		Processed as a opening
						delimiter of a device 
						control string for 
						device control use.
	CSI	9/11	1/11	5/11	Control Sequence Introducer.
			<ESC>	[		Processed as a Control
						Sequence introducer.
	ST	9/12	1/11	5/12	String Terminator.
			<ESC>	\		Processed as the Closing
						delimiter of a string 
						opened by DCS.

					Terminal_information	6
RECEIVED CODES:
      MODE SELECTION:
            ANSI STANDARDIZED MODES:
             setting          CSI  Ps ; Ps ; ..... ; Ps h
             resetting        CSI  Ps ; Ps ; ..... ; Ps l
              NAME                  MNEMONIC  (PS)    SET/RESET
              error                 --         0
              Keyboard action       KAM        2      locked/unlocked*
              insert/replace        IRM        4      insert/replace*
              send/receive          SRM        12    *host/local echo
              line feed/new line    LNM        20     LF=LF,CR/LF=LF*
            ANSI-COMPATIBLE DEC private Modes:
             setting          CSI  ? Ps ; Ps ; ..... ; Ps h
             resetting        CSI  ? Ps ; Ps ; ..... ; Ps l
              NAME                  MNEMONIC  (PS)
              error (ignored)       --         0      SET/RESET
              cursor key            DECCKM     1      application/ANSI*
              ansi/vt52             DECANM     2            /vt52 mode
              column                DECCOLM    3      132/80 column wide
              scroll                DECSCLM    4      smooth/jump
              screen background     DECSCNM    5      reverse/normal
              origin                DECOM      6      
              auto wrap             DECAWM     7      on/off
              auto repeat           DECARM     8      on/off
              printer form feed     DECPFF     18     send/nosend
                                                      termination char.
              printer extent        DECPEX     19     full/scroll_region
              text cursor enable    DECTCEM    25     *visible/invisible
              tektronix 4010/4014   DECTEK     38     401X/VT200( 7bit )
              National replacement  DECNRCM    42     7/8 bit character
                  character sets                                    set.
              graphics expanded
                           print    DECGRPM    43     12X8/6X3
              graphics print
                           color    DECGPCM    44     color/monochrome
              graphics print
                    color syntax    DECGPCS    45     RGB/HLS
              graphics print 
                      background    DECGPBM    46     include/exclude
              graphics rotated
                           print    DECGRPM    47     large_rotate/small
					Terminal_information	7
      CURSOR MOVEMENT CONTROL
            ONE DIRECTION:
                  CSI  parameter direction
                  CSI  parameter direction
                  <ESC> direction for the vt52
                        direction:
                           D = left, C = right, A = up, B = down
                               Parameter is the decimal number of 
                               lines/columns to move movement of 0 or 
                               1 will move the cursor one line/column
            SPECIFIC:
                   these codes cause the cursor to move to the asked for
                      line and column.
                   CSI  line# ; col# H - this is the one that DEC says to use
                   CSI  line# ; col# f
                   <ESC> Y line# col# for the vt52
                           line# is the required line on the screen
                           col# is the required column on the screen

                   CSI  line# ; col# R
                         reports the cursor current position
            SPECIAL:
                   <ESC> 7    Save the current cursor position.
                   <ESC> 8    restore the cursor position.
                These codes cause the window to move if needed
                   IND or <ESC> D    one line down
                   NEL or <ESC> E    one line down and to the first column
                   RI  or <ESC> M    one line up
            TAB COMMANDS:
                   HTS or <ESC> H    set tab at current cursor location.
                   CSI g             clear tab at current cursor location.
                   CSI  parameter g
                         parameter    description
                         0    clear tab at current cursor location
                         3    clear all tabs
					Terminal_information	8
      PROGRAMMING DISPLAY FEATURES.
            ADVANCED VIDEO OPTION:
                   CSI  parameter;....;parameter m
                   parameters   descriptions
                   0            no special graphics selected
                   1            increased intensity ( bold face )
                   4            underscore
                   5            blinking
                   7            reverse video
                   22           display normal intensity
                   24           display not underlined.
                   25           display not blinking.
                   27           display positive image.
            CHARACTER SIZE:
                   <ESC> # 6      change to single height/double width
                   <ESC> # 3      change to double height top half
                   <ESC> # 4      change to double height bottom half
                   <ESC> # 5      change to single height height/width
	Select character attributes (DECSCA)
		CSI Ps " q
			Ps	action
			0	All attributes off. ( does not apply to
				SGR.)
			1	Designate character as not erasable by
				DECSEL/DECSED (attribute on)
			2	Designate character as erasable by
				DECSEL/DECSED (attribute off)
	EDITING:
		CSI Pn L	inserts Pn Blank Lines at the cursor.
				(only to end of scrolling region, all
				data moved out of scrolling region is 
				lost)
		CSI Pn M	Deletes Pn Blank Lines at the cursor.
				(only to end of scrolling region)
		CSI Pn @	Inserts Pn Blank characters.
		CSI Pn P	Deletes Pn Characters and moves from right.
 					Terminal_information	9
	ERASING:
		CSI Pn X	Erases characters at the cursor.
	   ERASING IN LINE.
		CSI K		Erases from cursor to end of line.
		CSI Pn K	
			Pn = 0	same as CSI K	
			Pn = 1	Erases from beginning of line to cursor
			Pn = 2	Erases the entire line.
	   ERASING IN DISPLAY.
		CSI J		Erases for cursor to end of screen.
		CSI 0 J		Same as above.
		CSI 1 J		erase from beginning of screen to cursor.
		CSI 2 J		Erases entire screen, cursor does not move.
	   SELECTIVE ERASE IN LINE.
		CSI ? K		Erases all erasable characters from cursor
				to end of line.
		CSI ? 0 K	same as above.
		CSI ? 1 K	Erase all erasable characters from 
				beginning of line to cursor.
		CSI ? 2 K	Erase all erasable characters in line.
	   SELECTIVE ERASE IN SCREEN.
		CSI ? J		Erases all erasable characters from cursor
				to end of Screen.
		CSI ? 0 J	same as above.
		CSI ? 1 J	Erase all erasable characters from 
				beginning of Screen to cursor.
		CSI ? 2 J	Erase all erasable characters in Screen.
					Terminal_information	10
            SCROLLING MARGINS:
		CSI  firstline ; lastline r
			firstline   first line of the scrolling region
			lastline    last line of the scrolling region
	    PRINTING:
		CSI ? 5 i	selects auto print mode
		CSI ? 4 i	de-selects auto print mode
		CSI 5 i		Turns on printer controller mode.
		CSI 4 i		Turns off printer controller mode.
		CSI ? 1 i	Prints the cursor line.
		CSI i		Prints the screen.
		CSI 0 i		prints the screen.
		CSI ? i		select graphics to printer.
		CSI ? 0 i	select graphics to printer.
		CSI ? 2 i	select graphics to host.
		CSI ? 8 i	No printer to host communication.
		CSI ? 9 i	printer to host communication is ok.
	    USER-DEFINED KEYS ( DECUDK ):
		DECUDK DEVICE CONTROL STRING FORMAT:
		    DCS Pc;Pl | Ky1/st1;Ky2/st2;...Kyn/stn ST
			Pc  -	Clear Parameter,
				0 = Clear all keys before doing this string.
				1 = Load new values clear only when redefined.
			Pl  -	Lock Parameter,
				0 = Lock the keys (can not be redefined )
				1 = Do not lock the keys (can be redefined )
			|   -	Final character ( a vertical Bar (7/12))
				This designates this control string as
				a DECUDK
			Kyn/stn	Key numbers and string parameters:
				Kyn is a number that maps to the functions keys.
						F6=17...F10=21,F11=23...F14=26
						F15 or HELP = 28, F16 or DO =29
						F17=31...F20=34
				stn is the hex numbers that form the text for
				the key function.
			ST  -	String Terminator	
            CHARACTER SET:
                   <ESC> ( B  selects the standard ASCII characters
                   <ESC> G for the vt52
                   <ESC> ( 0  selects the special graphics character set
                   <ESC> F for the vt52
            BUSINESS GRAPHICS: can only be selected when ASCII is active
                   <ESC> ~ g 0      enable business graphics
                   <ESC> ~ g 8      disable business graphics
            PROGRAMMABLE LED DISPLAY:
                   CSI  parameter q
                      parameter description
                      0         clear all positions in the status line
                      1         clear the first position
                      2         clear the second position
                      3         clear the third position
                      4         clear the forth position
					Terminal_information	11
      CONTROLLING KEYBOARD FUNCTIONS
            SPECIAL KEYPAD CODES:
                   <ESC> =    enables special keypad codes.
                   <ESC> >    return keypad to normal.
                   soft keys PF1 thu PF4 are not changed when keypad 
                       is enabled.
      TEXT MANIPULATION
            SINGLE CHARACTER COMMANDS:
                   <ESC> ~   W    deletes a character at the current
                                      cursor position
                   <ESC> ~   Q    inserts a character at the current
                                      cursor position
            LINE COMMANDS:
                   CSI  parameter K
                  parameter
                      0   erase data form cursor position to end of line
                                     <ESC> K for the vt52
                      1   erase data from column one to cursor position.
                      2   erase entire line.
                   <ESC> ~ E    inserts a line of spaces in the current
                                line.
            SCREEN COMMANDS:
                   CSI  parameter J      erases data from the screen
                   parameter
                       0     from cursor position to end of screen
                                          <ESC> J for the vt52
                       1     from beginning of screen to cursor position
                       2     entire screen

                   <ESC> ~ ,   erase screen to reduced intensity spaces
                   <ESC> ~ :   clear screen to nulls.
      SPECIAL DISPLAY MODES
            DISPLAY ONLY:
                   does not execute the control codes.
                   <ESC> ~ U     enable display only.
                   <ESC> ~ u     disable display only.
            REDUCED INTENSITY:
                   reduces the intensity of the screen
                   <ESC> ~ )      enable reduced intensity.
                   <ESC> ~ (      disable reduced intensity.
            DISPLAY INTENSITY:
                   <ESC> ~ e value
                   value can be any ASCII character that generates
                    a hex value between 00 and 7F. This value will
                    be the intensity of the screen.
					Terminal_information	12
      PERSONALITY CODES
                   <ESC> ~ o      causes the personality codes to be
                                      displayed on the screen.
                   <ESC> ~ . controlcharacter newcharacter
                   controlcharacter is an ASCII control code from 00
                       (NUL) to 0F (SI) in hexadecimal. the CONTROL
                       key is used to inter the value from the keyboard.
                   Newcharacter is any ASCII character.

        Display  Default  Supported   Change       Definition
        column   value               character
            0      1B      yes         @    escape lead-in character
            1      0D      yes         A    end of block character
            2      00      yes         B    2nd end of block character
            3      1F      yes         C    end of line character
            4      00      yes         D    2nd end of line character
            5      1C      yes         E    field delimiter character
            6      01      no          F    function lead-in character
            7      00      no          G    parity error placement char.
            8      20      yes         H    erase replacement char.
            9      00      no          I    RTS ON delay
            A      50      no          J    RTS OFF delay
            B      FF      no          K    pulling addressing control
            C      FF      no          L    transmission limit number
            D      FF      no          M    reserved.
            E      FF      no          N    reserved.
            F      FF      no          O    reserved.
					Terminal_information	13
      DATA TRANSMISSION COMMANDS
	    PRIMARY DA:
		CSI c		causes the terminal to respond with service
				code and attributes.
		CSI 0 c		causes the terminal to respond with service
				code and attributes.
			then the terminal responds with
		CSI ? An;An;...;An c
	    SECONDARY DA:
		CSI > c		terminal responds with id code,firmware
				version level, and hardware options installed.
		CSI > 0 c	terminal responds with id code,firmware
				version level, and hardware options installed.
			Then the terminal responds with
		CSI > Id; Pv; Po c
	    DEVICE STATUS REPORT:
		CSI 5 n		report operating status.
                                        <ESC> Z for the vt52
			terminal responds with
				CSI 0 n		no malfunction
				CSI 3 n		terminal is malfunctioning.
		CSI 6 n		report cursor position.
			terminal responds with
				CSI Pv;Ph R	Pv=vertical position   (row)
						Ph=horizontal position (col)
	    DEVICE STATUS REPORT -PRINTER PORT:
		CSI ? 15 n	report printer status.
			terminal responds with
				CSI ? 10 n	Printer is ready.
				CSI ? 11 n	Printer is not ready.
				CSI ? 13 n	I have no printer.
	    DEVICE STATUS REPORT -USER-DEFINED KEYS:
		CSI ? 25 n	report lock status of user-defined keys.
			terminal responds with
				CSI ? 20 n	unlocked.
				CSI ? 21 n	locked.
					Terminal_information	14
	    DEVICE STATUS REPORT -KEYBOARD LANGUAGE:
		CSI ? 26 n	report keyboard language
			terminal responds with
				CSI ? 27; Pn n	My language is Pn
					Pn	Language
					0	Unknown
					1	North American
					2	British
					3	Flemish
					4	Canadian (French)
					5	Danish
					6	Finnish
					7	German
					8	Dutch
					9	Italian
					10	Swiss (French)
					11	Swiss (German)
					12	Swedish
					13	Norwegian
					14	French/Belgian
					15	Spanish
	    TERMINAL RESET:
		CSI ! p		soft reset back to power up conditions.
		<ESC> c			Hard reset
					Terminal_information	15
		CSI  solicit x
                   solicit
                      0    Please report and make unsolicited reports
                               after exiting the SETUP menu
                      1   Please report but make no additional reports 
                               until requested.
                   the terminal responds with:
                   CSI  sol ; par ; nbits ; xspeed ; rspeed ;
                                                        clkmul ; flags x
                         sol = 2  a parameter report
                             = 3  a parameter report from terminal
                                      only on request

                         par = 1  no parity
                             = 4  odd parity set
                             = 5  even parity set

                       nbits = 1  8 bits/character
                             = 2  7 bits/character
                  baud rate (bits per second transmitting and receiving)
                         xspeed      = 0            50
                           or        = 8            75
                         rspeed      = 16           110
                                     = 24           134.5
                                     = 32           150
                                     = 40           200
                                     = 48           300
                                     = 56           600
                                     = 64           1200
                                     = 72           1800
                                     = 80           2000
                                     = 88           2400
                                     = 96           3600
                                     = 104          4800
                                     = 112          9600
                                     = 120          19200

                         clkmul      = 1   the bit rate multiplier = 16
                         flags       = 0   always equals 0
					Terminal_information	16
            BLOCK OR CONVERSION MODE
                   <ESC> ~ C  enter conversation mode
                   <ESC> ~ B  enter block mode
            TEXT TO SCREEN
                   <ESC> ~ 4  send a line of unprotected characters
                   <ESC> ~ 6  send a line including protected characters
                   <ESC> ~ 5  send a page of unprotected characters
                   <ESC> ~ 7  send a page including protected characters
            CURSOR DISPLAY: ts100sp
                   <ESC> ~ d value
                         value  description
                         0      no cursor display ( blank )
                         1      cursor position underline
                         2      no cursor display, blinking character
                         3      cursor position underline and blinking
                                                               character
                         4      reverse video display block
                         5      reverse video underlined display block
                         6      reverse video display block with
                                                      blinking character
                         7      reverse video underline display
                                                block/blinking character
            SOFT KEY COMMANDS:
                   to program a soft key  on a ts100sp terminal.:
                   1) sent a carriage return,
                   2) enter the 2-dig number of the key to be programmed
                   3) enter the character string to be stored.
                   4) use <ESC> ~ k to store the character string.
                         note to erase a soft key exclude step 3.
                         to examine all of the soft key definitions
                         use <ESC> ~ j
            KEYBOARD DISABLE COMMANDS:
                TS100-SP
                   <ESC> ~ #      completely disables keyboard.
                   <ESC> ~ "      reenables the keyboard.
                   <ESC> ~ %      disables special function keys.
                   <ESC> ~ $      reenables special function keys.
            RESETING THE TERMINAL:
                   <ESC> c   TS100SP first level reset. 
                             Does not clear title,clock,soft key memory,
                                 or setup menu values for a ts100sp but
                                 is listed as a hard reset for a vt240
                                 and for ANSI.
                   CSI  ! p vt200 soft reset.
					Terminal_information	17
      STATUS LINE PROGRAMMING.      ts100sp
            CLOCK:
                   <ESC> ~ H and then one of the following codes.
               CODE   COMMAND             DESCRIPTION
               0      clock on            displays time
               1      clock off           does not display time
               2      increment hour      advances clock 1 hour
               3      increment minute    advances clock 1 minute
               4      real time indicator get time from host computer.
               5      write hour          number -20 is written to the
                                          hour field.
               6      write minute        number -20 is written to the
                                          minute field.
               7      write second        number -20 is written to the
                                          second field.
            TITLE:
                   <ESC> ~ ] and then 10 characters to replace the
                             current title.
                   <ESC> ~ n will read the title.
            PROTECTED FIELDS:
                   The protected fields feature of the TS-100SP is
                     controlled by the following escape sequences:
                   <ESC> ~ &      enable protected fields.
                   <ESC> ~ '      disable protected fields.

                   The protected fields feature is used in conjunction
                     with the reduced intensity feature. Reduced
                     intensity Characters sent to the screen when
                     protected fields are enabled become protected
                     characters.

                   The protected field feature disables the INS LINE key,
                     DEL LINE key, and scrolling functions. The TAB key
                     moves the cursor across the protected characters to
                     the next unprotected field.
******************************************************************************


