%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                           %
% UniTerm Users Guide, Copyright 1986, 1987 Simon Poole     %
%                                                           %
% This file may not be changed without permission, all      %
% rights reserved.                                          %
%                                                           %
% Simon Poole                                               %
% Bahnhofstr. 51 b                                          %
% CH-5430 Wettingen                                         %
% Switzerland                                               %
%                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Control Codes and Escape Sequences}



   This appendix  list  control  codes  and escape sequences that 
complete  implementations  of VT102/VT2XX and Tektronix 4014/4105 
terminals  should  interpret  and  the  functions   they   should  
initiate. * marks  functions  that  are redundant or not possible 
on  an  Atari ST  computer,   *NI  marks  other  not  implemented 
functions (due to my  laziness?),   *RI  uncomplete  implementation
of  a function,  please read the implementation  notes  for 
details.  


  Consult the  ASCII  table  for  numeric  values of the  control 
codes,  {\it Ps\/},  {\it Pn\/},  {\it Pc\/}  and  {\it Pl\/} denote decimal  values  (\ASCII{ESC}[10;10f 
postion cursor at text coordinates (10,10)).  


  The following  control codes and commands,  the syntax and  the 
command  interfaces as a whole could possibly be patented  or/and 
copyrighted, please consider this list as ``for information only''. 
Commercial use is strictly forbidden.  




\section{ANSI/VT2XX/VT102/VT100 Mode}     


\subsection{Set Mode}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[2h   \>            Keyboard locked \\
\>    \ASCII{ESC}[4h   \>            Insert mode \\
\>    \ASCII{ESC}[12h  \>            Local echo off \\
\>    \ASCII{ESC}[20h  \>            New line mode on \\
\>    \ASCII{ESC}[?1h  \>            Cursor key application mode \\
\>    \ASCII{ESC}[?3h  \>            *RI 132 column mode \\
\>    \ASCII{ESC}[?4h  \>            *RI Smooth scrolling \\
\>    \ASCII{ESC}[?5h  \>            Screen reverse \\
\>    \ASCII{ESC}[?6h  \>            Origin mode relative \\
\>    \ASCII{ESC}[?7h  \>            Auto wrap on \\
\>    \ASCII{ESC}[?8h  \>            * Auto repeat on \\
\>    \ASCII{ESC}[?9h  \>            * Interlace on \\
\>    \ASCII{ESC}[?18h \>            Print form feed on \\
\>    \ASCII{ESC}[?19h \>            Print extent full screen \\
\end{tabbing}


\subsection{Reset Mode}       

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[2l   \>            Keyboard unlocked \\ 
\>    \ASCII{ESC}[4l   \>            Replace mode \\
\>    \ASCII{ESC}[12l  \>            Local echo on \\
\>    \ASCII{ESC}[20l  \>            New line mode off \\
\>    \ASCII{ESC}[?1l  \>            Cursor key cursor mode \\
\>    \ASCII{ESC}[?2l  \>            VT52 mode \\
\>    \ASCII{ESC}[?3l  \>            80 column mode \\
\>    \ASCII{ESC}[?4l  \>            Jump scrolling \\
\>    \ASCII{ESC}[?5l  \>            Screen normal \\
\>    \ASCII{ESC}[?6l  \>            Origin mode absolute \\
\>    \ASCII{ESC}[?7l  \>            Auto wrap off \\
\>    \ASCII{ESC}[?8l  \>            * Auto repeat off \\
\>    \ASCII{ESC}[?9l  \>            * Interlace off \\
\>    \ASCII{ESC}[?18l \>            Print form feed on \\
\>    \ASCII{ESC}[?19l \>            Print extent scrolling region \\
\end{tabbing}

\subsection{Select Character Sets}     

The format is:  \ASCII{ESC}{\em primary} {\em final}

Where {\em primary} selects one of the four logical character sets
(G0 to G3) and {\em final} selects the actual character set to be mapped
into the logical set.

\subsubsection{Primary selector}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>   (     \> G0 \\
\>   )     \> G1 \\
\end{tabbing}

\subsubsection{Final selector}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>  A  \> UK national \\
\>  B  \> US-ASCII \\
\>  0  \> Special graphics \\
\>  1  \> *NI Alternate character set ROM \\
\>  2  \> *NI Alternate special graphics set ROM \\
\end{tabbing}
 
\subsection{Shift into Character Sets }    

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{SO} \>                 Locked shift G1 \\
\>    \ASCII{SI} \>                 Locked shift G0 \\
\end{tabbing}

\subsection{Character Attributes }      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[m  \>              No attributes  \\
\>    \ASCII{ESC}[0m \>              No attributes \\
\>    \ASCII{ESC}[1m \>              Bold \\
\>    \ASCII{ESC}[4m \>              Underline \\
\>    \ASCII{ESC}[5m \>              Blink (Light) \\
\>    \ASCII{ESC}[7m \>              Reverse \\
\end{tabbing}


\subsection{Scrolling Region  }     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[{\it Pt\/};{\it Pb\/}r \>  Set scrolling region \\
\end{tabbing}

\subsection{Cursor Movement Commands }     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[{\it Pn\/}A \>             Cursor up \\
\>    \ASCII{ESC}[{\it Pn\/}B \>             Cursor down \\
\>    \ASCII{ESC}[{\it Pn\/}C \>             Cursor right \\
\>    \ASCII{ESC}[{\it Pn\/}D \>             Cursor left \\
\>    \ASCII{ESC}[{\it Pl\/};{\it Pc\/}H \>  Cursor position \\
\>    \ASCII{ESC}[{\it Pl\/};{\it Pc\/}f \\
\>    \ASCII{ESC}D    \>            Index \\
\>    \ASCII{ESC}M    \>            Reverse Index \\
\>    \ASCII{ESC}E    \>            Next line \\
\>    \ASCII{ESC}7    \>            Save cursor \\
\>    \ASCII{ESC}8    \>            Restore cursor \\
\end{tabbing}

\subsection{Tab Stops }      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}H   \>              Horizontal tab set  \\
\>    \ASCII{ESC}[g  \>              Tab clear \\
\>    \ASCII{ESC}[0g \>              Tab clear \\
\>    \ASCII{ESC}[3g \>              Clear all tabs \\
\end{tabbing}

\subsection{Line Attributes }      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}{\#}3 \>      Double-height top half \\
\>    \ASCII{ESC}{\#}4 \>      Double-height bottom half \\
\>    \ASCII{ESC}{\#}5 \>      Single-width single-height \\
\>    \ASCII{ESC}{\#}6 \>      *RI Double-width single-height \\
\end{tabbing}

\subsection{Erasing}    

\subsubsection{In Line}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[K  \>   Cursor to end of line \\
\>    \ASCII{ESC}[0K \>  \\
\>    \ASCII{ESC}[1K \>   Beginning of line to cursor \\
\>    \ASCII{ESC}[2K \>   Entire line \\
\end{tabbing}


\subsubsection{In Screen}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[J  \>  Cursor to end of screen \\
\>    \ASCII{ESC}[0J \> \\
\>    \ASCII{ESC}[1J \>  Beginning of screen to cursor \\
\>    \ASCII{ESC}[2J \>  Entire screen \\
\end{tabbing}

\subsection{Requests/Reports}       

\begin{tabular}{llll}
    \multicolumn{2}{c}{Requests from host} & \multicolumn{2}{c}{Reports to host} \\
    \ASCII{ESC}[5n   &  Status        & \ASCII{ESC}[0n & Terminal OK   \\
                     &                & \ASCII{ESC}[3n & * Terminal not OK \\
    \ASCII{ESC}[6n   & Cursor pos.    & \ASCII{ESC}[{\it Pl\/};{\it Pc\/}R & Cursor position \\
    \ASCII{ESC}[c    & What are you?  & \ASCII{ESC}[?1;{\it Ps\/}c & VT100, Ps options \\
    \ASCII{ESC}[0c   &                & \ASCII{ESC}[?6;{\it Ps\/}c & VT102, Ps options \\
    \ASCII{ESC}Z     &                & \ASCII{ESC}[?62;{\it Ps\/}c & VT200, Ps options \\
    \ASCII{ESC}[?15n & Printer status & \ASCII{ESC}[?10n & Printer ready \\
                     &                & \ASCII{ESC}[?11n & Printer not ready \\
                     &                & \ASCII{ESC}[?13n & No printer \\
\end{tabular}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>  \ASCII{ESC}[0x \> Send terminal parameter report after setup \\ 
\>  \ASCII{ESC}[1x \> Send only on request \\
\end{tabbing}

\subsection{Reset}       

\begin{tabbing}
1234\=123456789123456789\= \kill
\>   \ASCII{ESC}c  \> Reset to default values \\
\end{tabbing}

\subsection{Tests}       

\begin{tabbing}
1234\=123456789123456789\= \kill
\> \ASCII{ESC}{\#}8 \> Fill screen with E's \\
\> \ASCII{ESC}[2;{\it Ps\/}y \> * Invoke tests \\
\end{tabbing}


\subsection{Keyboard LED's}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\> \ASCII{ESC}[0q \> All off \\
\> \ASCII{ESC}[{\it Ps\/}q \>  LED Ps on \\
\end{tabbing}

\subsection{VT52 Mode}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}\ \>    Enter ANSI Mode \\
\>    \ASCII{ESC}=     \>    Enter alternate keypad mode \\
\>    \ASCII{ESC}\Rangle \>    Exit alternate keypad mode \\
\>    \ASCII{ESC}F     \>    Select  special graphics  character set \\
\>    \ASCII{ESC}G     \>    Select US/UK character set \\
\>    \ASCII{ESC}A     \>    Cursor up \\
\>    \ASCII{ESC}B     \>    Cursor down \\
\>    \ASCII{ESC}C     \>    Cursor right \\
\>    \ASCII{ESC}D     \>    Cursor left \\
\>    \ASCII{ESC}H     \>    Cursor home \\
\>    \ASCII{ESC}Y{\it PlPc\/} \>  Direct cursor address \\
\>    \ASCII{ESC}I     \>    Reverse line feed \\
\>    \ASCII{ESC}K     \>    Erase to end of line \\
\>    \ASCII{ESC}J     \>    Erase to end of screen \\
\>    \ASCII{ESC}Z     \>    What are you? \\
\>    \ASCII{ESC}/Z    \>    I am a VT52 (Response) \\
\>    \ASCII{ESC}\Caret\>    Enter auto print mode \\
\>    \ASCII{ESC}-     \>    Exit auto print mode \\
\>    \ASCII{ESC}W     \>    Enter printer controller mode \\
\>    \ASCII{ESC}X     \>    Exit printer controller mode \\
\>    \ASCII{ESC}]     \>    Print screen \\
\>    \ASCII{ESC}V     \>    Print cursor line \\
\end{tabbing}

\subsection{Editing Functions}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[{\it Pn\/}P  \> Delete character \\
\>    \ASCII{ESC}[{\it Pn\/}L  \> Insert Line \\
\>    \ASCII{ESC}[{\it Pn\/}M  \> Delete Line \\
\end{tabbing}

\subsection{Print Commands}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[?5i \>  Enter auto print \\
\>    \ASCII{ESC}[?4i \>  Exit  auto print \\
\>    \ASCII{ESC}[5i  \>  Enter printer controller \\
\>    \ASCII{ESC}[4i  \>  Exit printer controller \\
\>    \ASCII{ESC}[i   \>  Print screen \\
\>    \ASCII{ESC}[0i  \> \\
\>    \ASCII{ESC}[?1i \>  Print cursor line \\
\end{tabbing}


\subsection{Other Control Characters}    

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{NUL} \>       Ignored \\
\>    \ASCII{SOH} \>       Ignored \\
\>    \ASCII{ETX} \>       Ignored \\
\>    \ASCII{EOT} \>       Ignored \\
\>    \ASCII{ENQ} \>       Transmit answerback message \\
\>    \ASCII{BEL} \>       Bell \\
\>    \ASCII{BS}  \>       Backspace \\
\>    \ASCII{HT}  \>       Horizontal tab \\
\>    \ASCII{LF}  \>       Linefeed or \ASCII{CR} \ASCII{LF} \\
\>    \ASCII{VT}  \>       same as \ASCII{LF} \\
\>    \ASCII{FF}  \>       same as \ASCII{LF} \\
\>    \ASCII{CR}  \>       Carriage Return \\
\>    \ASCII{SO}  \>       Shift to G1 character set \\
\>    \ASCII{SI}  \>       Shift to G0 character set \\
\>    \ASCII{DC1} \>       Ignored (Alternate XOn) \\
\>    \ASCII{DC3} \>       Ignored (Alternate XOff) \\
\>    \ASCII{CAN} \>       Cancel \\
\>    \ASCII{SUB} \>       Cancel \\
\>    \ASCII{DEL} \>       Ignored \\
\>    \ASCII{US}  \>       Ignored \\
\>    \ASCII{RS}  \>       Ignored \\
\>    \ASCII{FS}  \>       Ignored \\
\>    \ASCII{SYN} \>       Ignored \\
\>    \ASCII{EM}  \>       Ignored \\
\>    \ASCII{ETB} \>       Ignored \\
\>    \ASCII{NAK} \>       Ignored \\
\>    \ASCII{DLE} \>       Ignored \\
\>    \ASCII{XON} \>       In XOn/XOff flow control mode \\
\>    \ASCII{XOFF}\>       intercepted by ST bios, otherwise ignored \\
\end{tabbing}

\subsection{Nonstandard Functions}
     
\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[`           \>     Lock Keyboard \\
\>    \ASCII{ESC}[b           \>     Unlock Keyboard \\
\>    \ASCII{ESC}[{\it Pn\/}I \>     Move Pn tabs right \\
\>    \ASCII{GS}              \>     Enter 4014 Vector mode \\
\>    \ASCII{ESC}{\%}!0       \>     Enter Tektronix alpha mode (4105) \\
\>    \ASCII{ESC}{\#}!0       \>     Report terminal mode (4105) \\
\>    {\%}!\ASCII{SPSP}1      \>     Report: I am a ANSI terminal (4105)\\
\>    \ASCII{ESC}[?39h        \>     Set 49 line mode \\
\>    \ASCII{ESC}[?39l        \>     Set 24 line mode \\
\>    \ASCII{ESC}[?40h        \>     Set meta mode \\
\>    \ASCII{ESC}[?40l        \>     Reset meta mode \\
\>    \ASCII{ESC}[*c          \>     Inquire  UniTerm version and  mode \\ 
\>Response: \\
\>    \ASCII{ESC}[*{\it major\/};{\it minor\/};{\it release\/};{\it max-row\/};{\it max-col\/}c \\
\>    \ASCII{ESC}Pu{\it string\/}\ASCII{ESC}\verb+\+ \\
\>Execute {\it string\/} with UniTerm's macro processor \\
\end{tabbing}

\section{VT2XX Functions}      

\subsection{Character Sets}      

The format is:  \ASCII{ESC}{\em primary} {\em final}

\subsubsection{Primary selector}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>   (     \> G0 \\
\>   )     \> G1 \\
\>   *     \> G2 \\
\>   +     \> G3 \\
\end{tabbing}

\subsubsection{Final selector}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>  \Langle  \> DEC International \\
\>  B        \> US-ASCII \\
\>  0        \> Special graphics \\
\end{tabbing}

\subsubsection{Logical character set selection}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}\Tilde       \> Lock shift G1 -\Rangle GR \\
\>    \ASCII{ESC}n            \> Lock shift G2 -\Rangle GL \\
\>    \ASCII{ESC}{\}}         \> Lock shift G2 -\Rangle GR \\
\>    \ASCII{ESC}o            \> Lock shift G3 -\Rangle GL \\
\>    \ASCII{ESC}\Vbar        \> Lock shift G3 -\Rangle GR \\
\>    \ASCII{ESC}N            \> Single shift G2 -\Rangle GL \\
\>    \ASCII{ESC}O            \> Single shift G3 -\Rangle GL \\
\end{tabbing}

\subsection{Terminal Modes}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{CSI}61"p   \>       VT100 mode \\
\>    \ASCII{CSI}62"p   \>       VT200 mode, 8-bit \\
\>    \ASCII{CSI}62;0"p \>          "         " \\
\>    \ASCII{CSI}62;1"p \>       VT200 mode, 7-bit \\
\>    \ASCII{CSI}62;2"p \>       VT200 mode, 8-bit \\
\>    \ASCII{ESCSP}F    \>       *NI Send only C0 codes \\
\>    \ASCII{ESCSP}G    \>       *NI Send C1 codes \\
\end{tabbing}

\subsection{Selective Erasing and Attributes}    

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{CSI}22m \>          Bold off \\
\>    \ASCII{CSI}24m \>          Underline off \\
\>    \ASCII{CSI}25m \>          Blink off \\
\>    \ASCII{CSI}27m \>          Inverse off \\
\>    \ASCII{CSI}0"q \>          Erase protection off \\
\>    \ASCII{CSI}1"q \>          Non-erasable \\
\>    \ASCII{CSI}2"q \>          Erasable \\
\>    \ASCII{CSI}?K  \>          Cursor to EOL \\
\>    \ASCII{CSI}?0K \> \\
\>    \ASCII{CSI}?1K \>          SOL to Cursor \\
\>    \ASCII{CSI}?2K \>          Whole line \\
\>    \ASCII{CSI}?J  \>          Cursor to EOP \\
\>    \ASCII{CSI}?0J \> \\
\>    \ASCII{CSI}?1J \>          SOP to Cursor \\
\>    \ASCII{CSI}?2J \>          Whole screen \\
\end{tabbing}

\subsection{Reports}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    From host \\
\>    \ASCII{CSI}{\Rangle}0c \>  Secondary device attribute response \\
\>    From terminal \\
\>    \ASCII{CSI}{\Rangle}1;17;0c \> VT220, Software version 1.7 \\
\>    From host \\
\>    \ASCII{CSI}?25n \>  Are the function-keys locked? \\
\>    From terminal \\
\>    \ASCII{CSI}?20n \> Unlocked \\
\>    \ASCII{CSI}?21n \> *NI Locked \\
\end{tabbing}

\subsection{Misc}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[{\it Pn\/}X \>        Erase Pn characters \\
\>    \ASCII{ESC}[{\it Pn\/}P \>        Delete Pn characters \\
\>    \ASCII{ESC}[{\it Pn\/}@ \>        Insert Pn blanks \\
\>    \ASCII{CSI}!p           \>        Soft reset \\
\>    \ASCII{CSI}?38h         \>        Tektronix mode \\
\>    \ASCII{CSI}?38l         \>        VT200 mode \\
\>    \ASCII{CSI}?25h         \>        Cursor on \\
\>    \ASCII{CSI}?25l         \>        Cursor off \\
\end{tabbing}

\subsection{Downloadable Function Keys}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>  \ASCII{DCS}{\it Pc\/};{\it Pl\/}\Vbar{\it Ky1\/}/{\it St1\/};..\ASCII{ST} \\
\>   \>   Pc = 0 clear all keys (ignored) \\
\>   \>   Pc = 1 don't clear keys (ignored) \\
\>   \>   Pl = 0 lock keys (ignored) \\
\>   \>   Pl = 1 don't lock keys (ignored) \\
\>   \>   Ky1 Key number (decimal) \\
\>   \>   St1 String (hex) \\
\end{tabbing}

\subsection{Downloadable Character Sets}     


    Not implemented! Sorry.



\subsection{Control Codes}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{IND} \>                Index \\
\>    \ASCII{NEL} \>                Next line \\
\>    \ASCII{SSA} \>                Ignored \\
\>    \ASCII{ESA} \>                Ignored \\
\>    \ASCII{HTS} \>                Horizontal tab set \\
\>    \ASCII{HTJ} \>                Ignored \\
\>    \ASCII{VTS} \>                Ignored \\
\>    \ASCII{PLD} \>                Ignored \\
\>    \ASCII{PLU} \>                Ignored \\
\>    \ASCII{RI}  \>                Reverse index \\
\>    \ASCII{SS2} \>                Single shift G2 -\Rangle GL \\
\>    \ASCII{SS3} \>                Single shift G3 -\Rangle GL \\
\>    \ASCII{DCS} \>                Device control string introducer \\
\>    \ASCII{PU1} \>                Ignored \\
\>    \ASCII{PU2} \>                Ignored \\
\>    \ASCII{STS} \>                Ignored \\
\>    \ASCII{CCH} \>                Ignored \\
\>    \ASCII{MW}  \>                Ignored \\
\>    \ASCII{SPA} \>                Ignored \\
\>    \ASCII{EPA} \>                Ignored \\
\>    \ASCII{CSI} \>                Control sequence introducer \\
\>    \ASCII{ST}  \>                String terminator \\
\>    \ASCII{OSC} \>                Ignored \\
\>    \ASCII{PM}  \>                Ignored \\
\>    \ASCII{APC} \>                Ignored \\
\end{tabbing}

\section{VT3XX Functions}

Currently only the implemented control sequences are listed.

\subsection{Set Mode}


\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}?67h  \> \key{Backspace}\ sends \ASCII{BS}\ and \key{Delete}\ sends \ASCII{DEL}
\end{tabbing}   

\subsection{Reset Mode}


\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}?67l  \> \key{Backspace}\ sends \ASCII{DEL}\ and \key{Delete}\  sends \ASCII{BS}
\end{tabbing}

\subsection{National Replacement Character Sets}

In this mode the ASCII characters:
\begin{verbatim}
 # @ [ \ ] ^ _ ` { | } ~
\end{verbatim}
are mapped into characters of the international character set.
Only one NRC can be active at one time, the format to select one is: 

 \ASCII{ESC}{\em primary} {\em final}


\subsubsection{Primary selector}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>   (     \> G0 \\
\>   )     \> G1 \\
\>   *     \> G2 \\
\>   +     \> G3 \\
\end{tabbing}

\subsubsection{Final selector}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>  A            \> British \\
\>  4            \> *RI Dutch \\
\>  5 or C       \> Finnish \\
\>  R            \> *RI French \\
\>  9 or Q       \> French Canadian \\
\>  K            \> German \\
\>  Y            \> Italian \\
\>  ' or E or 6  \> Norwegian/Danish \\
\>  \%6          \> *NI Portugese \\
\>  Z            \> Spanish \\
\>  7 or H       \> Swedish \\
\>  =            \> Swiss \\
\end{tabbing}

\subsection{Statusline control}

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}[0\$-  \> No stausline \\
\>    \ASCII{ESC}[1\$-  \> Indicator statusline \\
\>    \ASCII{ESC}[2\$-  \> Hostwritable statusline \\
\\        
\>    \ASCII{ESC}[0\$\}  \> Enter main display \\
\>    \ASCII{ESC}[1\$\}  \> Enter statusline \\
\end{tabbing}

If the statusline is not set to ``hostwritable'', entering the statusline
will cause no text to be displayed.

Nearly all commands of the text terminal emulation work in the status-
line, changing attributes, modes and character sets effect
the main display too (like they do on a real VT3XX).

Commands that do not work:
\begin{quote}
save and restore cursor, \\
test pattern, \\
all DEC private mode set and reset commands, \\
set scrolling region. \\
\end{quote}

\section{4014 Mode}       


\subsection{Alpha Mode}       


\subsubsection{Cursor Movement}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{BS} \>    Cursor left \\
\>    \ASCII{HT} \>    Cursor right \\
\>    \ASCII{LF} \>    Cursor down \\
\>    \ASCII{VT} \>    Cursor up \\
\>    \ASCII{CR} \>    Cursor to left margin \\
\end{tabbing}

\subsubsection{Character Set Sizes}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}8 \>  Normal   35x76 (lines x columns) \\
\>    \ASCII{ESC}9 \>  Small    38x81 \\
\>    \ASCII{ESC}: \>  Smaller  50x120 \\
\>    \ASCII{ESC}; \>  Smallest 58x133 \\
\>    \ASCII{ESC}6 \>  *NI Enter Italics ? \\
\>    \ASCII{ESC}7 \>  *NI Exit Italics  ? \\
\end{tabbing}


\subsubsection{Mode Changing}      

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{GS}              \>    Vector mode \\
\>    \ASCII{ESC}\ASCII{SUB}  \>    GIN mode \\
\>    \ASCII{FS}              \>    Point plot mode \\
\>    \ASCII{ESC}\ASCII{FS}   \>    *NI Special point plot mode \\
\>    \ASCII{RS}              \>    Incremental mode \\
\>    \ASCII{CAN}             \>    Return to text terminal \\
\end{tabbing}

\subsection{Other Functions and Extended Escape Codes} 

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{ESC}\ASCII{ETB} \>      Hardcopy \\
\>    \ASCII{ESC}\ASCII{ENQ} \>      Transmit status \\
\>    \ASCII{ESC}\ASCII{STX} \>      Enable block fill/erase \\
\>    \ASCII{ESC}\ASCII{ETX} \>      Disable block fill/erase \\
\>    \ASCII{ESC}\Bslash R  \>       Enable rectangle draw \\
\>    \ASCII{ESC}\Bslash r  \>       Disable rectangle draw \\
\>    \ASCII{ESC}x       \>          Enable selective erase \\
\>    \ASCII{ESC}/0d     \>          Dots on \\
\>    \ASCII{ESC}/1d     \>          Dots off \\
\>    \ASCII{ESC}/2d     \>          Dots complemented \\
\end{tabbing}

\subsection{Vector Mode}       

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{GS} \>                 Next vector is dark \\
\>    address    \>                 Draw vector, next vector is visible \\
\>    \ASCII{ESC}` \>               Solid vector \\
\>    \ASCII{ESC}a \>               Dotted \\
\>    \ASCII{ESC}b \>               Dot-dashed \\
\>    \ASCII{ESC}c \>               Short-dashed \\
\>    \ASCII{ESC}d \>               Long-dashed \\
\>    \ASCII{ESC}p \>               Solid vector, XOR \\
\>    \ASCII{ESC}q \>               Dotted, XOR \\
\>    \ASCII{ESC}r \>               Dot-dashed, XOR \\
\>    \ASCII{ESC}s \>               Short-dashed, XOR \\
\>    \ASCII{ESC}t \>               Long-dashed, XOR \\
\>    \ASCII{ESC}\ASCII{SUB} \>     GIN mode \\
\>    \ASCII{US}  \>                Alpha mode, don't move \\
\>    \ASCII{CR}   \>               Alpha mode \\
\>    \ASCII{ESC}\ASCII{FF} \>      Alpha mode, clear screen \\
\end{tabbing}


\subsection{Point Plot/Special Point Plot Mode }   

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    address               \>     Plot point  \\
\>    intensity address     \>     *NI Special plot point \\
\>    \ASCII{CR}            \>     Alpha mode \\
\>    \ASCII{ESC}\ASCII{FF} \>     Alpha mode \\
\end{tabbing}

\subsection{Incremental Point Plot Mode}     

\begin{tabbing}
1234\=123456789123456789\= \kill
\>    \ASCII{SP} \>         Pen up \\
\>    P        \>           Pen down \\
\>    D        \>           North \\
\>    E        \>           North east \\
\>    A        \>           East \\
\>    I        \>           South east \\
\>    H        \>           South \\
\>    J        \>           South west \\
\>    B        \>           West \\
\>    F        \>           North west \\
\>    \ASCII{CAN} \>        Alpha mode \\
\>    \ASCII{ESC}\ASCII{SUB} \>  GIN mode \\
\end{tabbing}

\section{4105 Commands }      


   In the  following list capital letters are part of the command
sequences  and  lower  case  identifiers denote Tektronix encoded
parameters.  

\begin{tabbing}
1234\=123456789123456789\= \kill
\> \ASCII{ESC}IQ code \> *NI Report terminal settings \\
\> \ASCII{ESC}IJ normal shifted \\ 
\> \> *NI Change GIN cursor speed \\
 \\
\> \ASCII{ESC}JC                  \> *NI Copy \\
 \\
\> \ASCII{ESC}KC                  \> *NI Cancel \\
\> \ASCII{ESC}KR mode   \> *NI  Change  carriage   return/line feed mode \\
\> \ASCII{ESC}KD number contents \\   
\> \> *NI Define macro \\
\> \ASCII{ESC}KO number contents \\  
\>  \> *NI Define nonvolatile macro \\
\> \ASCII{ESC}KA mode              \> *NI Enable dialog area \\
\> \ASCII{ESC}KW mode              \> *NI Enable key expansion \\
\> \ASCII{ESC}KX number            \> *NI Expand macro \\
\> \ASCII{ESC}KH mode              \> *NI Hardcopy \\
\> \ASCII{ESC}KI mode           \>     Ignore deletes mode \\
\> \ASCII{ESC}KF mode                 \> *NI   Change   line   feed/carriage 
                             return mode \\
\> \ASCII{ESC}KL mode              \> *NI Lock keyboard \\
\> \ASCII{ESC}KQ                  \> *NI Report errors \\
\> \ASCII{ESC}KV                  \> *NI Reset \\
\> \ASCII{ESC}KU                  \> *NI Save nonvolatile parameters \\
\> \ASCII{ESC}KE mode              \> *NI Change echo mode \\
\> \ASCII{ESC}KZ char-delete line-delete literal \\
                      \> \> *NI Change edit characters \\
\> \ASCII{ESC}KT threshold          \> *NI Change error threshold \\
\> \ASCII{ESC}KY char              \> *NI Change key execute character \\
\> \ASCII{ESC}KS mode              \> *NI Change transparent mode \\
\> \ASCII{ESC}KB positions          \> *NI Change tab stops \\
 \\
\> \ASCII{ESC}LL number               \> *NI Change number of lines in  dialog area \\
\> \ASCII{ESC}LP start-point fill-boundary \\
                        \>      \> *NI Start panel boundary \\
\> \ASCII{ESC}LZ                  \> *NI Clear dialog area \\
\> \ASCII{ESC}LG position          \> *NI Draw to position \\
\> \ASCII{ESC}LH position          \> *NI Draw marker at position  \\
\> \ASCII{ESC}LE                  \> *NI Finish panel \\
\> \ASCII{ESC}LT text              \> *NI Graphic text \\
\> \ASCII{ESC}LF position          \> *NI Move to position \\
\> \ASCII{ESC}LB number               \> *NI  Change  number  of  lines  for 
                             dialog buffer \\
\> \ASCII{ESC}LI char-color char-background-color dialog-background-color  \\
                  \>    \> *NI Change dialog area color \\
\> \ASCII{ESC}LV mode              \> *NI Change dialog area visibility \\
\> \ASCII{ESC}LM writing-mode  \\  
\>   \> *NI Change dialog area writing mode \\
 \\
\> \ASCII{ESC}MP number            \> *NI Choose fill pattern \\
\> \ASCII{ESC}MG writing-mode \\
\>       \> *NI Change graphics area writing mode \\
\> \ASCII{ESC}MN direction          \> *NI Change graphtext direction \\
\> \ASCII{ESC}MR mantissa power-of-two \\
\> \> *NI Change graphtext rotation \\
\> \ASCII{ESC}MC width height spacing \\
\> \> *NI Change graphtext size \\
\> \ASCII{ESC}ML color             \> *NI Change line color \\
\> \ASCII{ESC}MV style         \>      Change line style \\
\> \ASCII{ESC}MM type          \>      Change marker type \\
\> \ASCII{ESC}MT text-color         \> *NI Change text color \\
\end{tabbing}
\begin{tabbing}
1234\=123456789123456789\= \kill
\> \ASCII{ESC}NM mode              \> *NI Prompt mode \\
\> \ASCII{ESC}NR transmit receive \\  
\> \> *NI Change baud rates \\
\> \ASCII{ESC}NK time              \> *NI Change break time \\
\> \ASCII{ESC}NU char                 \> *NI Change echo suppression  cancel 
                             character \\
\> \ASCII{ESC}NE string            \> *NI Change EOF string \\
\> \ASCII{ESC}NT string            \> *NI Change EOL string \\
\> \ASCII{ESC}NC first-char second-char \\
\> \> *NI Change EOM characters \\
\> \ASCII{ESC}NF mode              \> *NI Change flow control mode \\
\> \ASCII{ESC}NP string            \> *NI Change prompt string \\
\> \ASCII{ESC}NQ size              \> *NI Change input buffer size \\
\> \ASCII{ESC}NB stopbits          \> *NI Change number of stop bits \\
\> \ASCII{ESC}ND delay             \> *NI Change transmit delay \\
 \\
\> \ASCII{ESC}QI values               \> *NI Map color to monochrome  values 
                             for print \\
\> \ASCII{ESC}QU density              \> *NI  Choose  color  hardcopy  image 
                             density \\
\> \ASCII{ESC}QD type              \> *NI Choose printer type \\
\> \ASCII{ESC}QL pages page-origin ff-mode \\
                      \>     \> *NI    Change    dialog    hardcopy 
                             attributes \\
\> \ASCII{ESC}QE attributes             *Ni   Change  hardcopy   monochrome 
                             attributes \\
\> \ASCII{ESC}QO orientation \\    
\>   \> *NI Change image orientation \\
 \\
\> \ASCII{ESC}RU plane writing-mode bits-per-pixel \\
                    \>  \> *NI Begin pixel operations \\
\> \ASCII{ESC}RX dest.-plane d.-lower-left-corner \\
  \>    first-source-corner second-s.-corner   \\  
  \>                    \> *NI Copy pixels \\
\> \ASCII{ESC}RP number color \\  
\>     \> *NI Write pixels \\
\> \ASCII{ESC}RR lower-left-corner upper-right-corner fill-color \\
                \>      \> *NI Fill rectangle \\
\> \ASCII{ESC}RL array             \> *NI ? \\
\> \ASCII{ESC}RH position          \> *NI Move to pixel position \\
\> \ASCII{ESC}RS lower-left-corner upper-right-corner  \\ 
                   \>        \> *NI  Change coordinates  for  pixel 
                             operations \\
\> \ASCII{ESC}RW first-corner opposite-corner \\
                   \>        \> *NI  Change  window  on   4096*4096 
                             coordinates \\
 \\
\> \ASCII{ESC}TD first-color second-color \\
                   \>       \>*NI Change alpha cursor colors \\
\> \ASCII{ESC}TF colors               \> *NI Change color indices for dialog 
                             area \\
\> \ASCII{ESC}TG plane colors       \> *NI Change color indices for plane \\
\> \ASCII{ESC}TC first-color second-color third-color \\
               \>       \> *NI Change GIN cursor color \\
 \\
\> \ASCII{ESC}SX number position \\ 
\>    \> *NI Change GIN cursor position \\
 \\
\> \ASCII{ESC}\ASCII{SUB}   \>        Enter 4010 GIN mode \\
\> \ASCII{ENQ}              \>        *NI Inquire 4105 status \\
\> \ASCII{US}               \>        *NI Enter 4105 alpha mode \\
\> \ASCII{ESC}\ASCII{CAN}   \>        Enter echo suppression mode \\
\> \ASCII{FS}               \>        Enter marker mode \\
\> \ASCII{GS}               \>        Enter vector mode \\ 
\> \ASCII{ESC}\ASCII{FF}    \>        Clear screen, enter alpha mode  \\
\> \ASCII{ESC}{\#}!0        \>        Report terminal mode \\
\> \ASCII{ESC}\ASCII{ENQ}   \>        Report 4010 status \\
\> \ASCII{ESC}{\%}! mode    \>        Change to a different terminal mode \\
\> \ASCII{ESC} font         \>        Change fonts \\
\> \ASCII{ESC} style        \>        Change 4014 line style \\
\> \ASCII{ESC}\ASCII{ETB}   \>        4014 hardcopy \\
\end{tabbing}

