1 VT100
 This help category contains information on the syntax of various
 escape sequences used for VT100 compatible terminals.

 ESC = CHR$(27%) = CHR$(155%) signals a terminal control sequence
2 Line_size 
 LINE SIZE (DOUBLE-HEIGHT CND DOUBLE-WIDTH) COMMANDS
                                                    
 Change this line to double-height top half          <ESC>#3
 Change this line to double-height bottom half       <ESC>#4
 Change this line to single-width single-height      <ESC>#5
 Change this line to double-width single-height      <ESC>#6
                                                    
 For example:  PRINT ESC;"#3ABCDEFG"
               #3ABCDEFG
               PRINT ESC;"#4ABCDEFG"
               #4ABCDEFG
               PRINT ESC;"#5ABCDEFG"
               #5ABCDEFG
               PRINT ESC;"#6ABCDEFG" 
               #6ABCDEFG
2 Character_attributes
 CHARACTER ATTRIBUTES             <ESC>[ps;ps;ps;...;psm
 ps =       0 or None   All Attributes Off
                 1      Bold on
                 4      Underscore on
                 5      Blink on
                 7      Reverse video on
2 Examples
	               PRINT ESC;"[1m";"Bold"
	               [1mBold[0m
	               PRINT ESC;"[4m";"Underscore"
                       [4mUnderscore[0m
                       PRINT ESC;"[5m";"Blink on"
	               [5mBlink on[0m
	               PRINT ESC;"[7m";"Reverse video on"
                       [7mReverse video on[0m
                       PRINT ESC;"[1;4;5;7m";"ALL"
                       [1;4;5;7mALL[0m
  These features are only available on advance video terminals.
2 Programmable_LEDs
 PROGRAMMABLE LEDs             <ESC>[ps;ps;ps;...;psq
 ps =       0 or None   All LEDs Off
                 1      L1 on
                 2      L2 on
                 3      L3 on
                 4      L4 on
 
 note: LEDs on keyboard above numeric keys <RETURN to continue>
 These features are only available on terminals with LEDs.
3 L1_example
		PRINT ESC;"[0q";"turn on just L1";ESC;"[1q"

                [0qturn on just L1[1q
3 L2_example

                PRINT ESC;"[0q";"turn on just L2";ESC;"[2q"

                [0qturn on just L2[2q
3 L3_example

                PRINT ESC;"[0q";"turn on just L3";ESC;"[3q"

                [0qturn on just L3[3q
3 L4_example
                PRINT ESC;"[0q";"turn on just L4";ESC;"[4q"

                [0qturn on L4[4q
3 LEDs_off
                PRINT ESC;"[0q";"turns off LEDs

                [0qturn off LEDs
2 ANSI_compatible_mode
 CURSOR MOVEMENT COMMANDS                                 
 Cursor up                         <ESC>[pnA              
 Cursor down                       <ESC>[pnB              
 Cursor forward (right)            <ESC>[pnC              
 Cursor backward (left)            <ESC>[pnD              
 Direct cursor addressing          <ESC>[pl;pcH           
 Direct cursor addressing          <ESC>[pl;pcf           
 Index                             <ESC>D                 
 Next line                         <ESC>E                 
 Reverse index                     <ESC>M                 
 Save cursor and attributes        <ESC>7                 
 Restore cursor and attributes     <ESC>8                 
 
 pc (column parameter), pl (line parameter), pn (number parameter),
 ps (selective parameter) are variables which default to zero but  
 may be included in the control sequence by the programmer.        
 i.e. PRINT ESC;"[0;0H";   !position cursor in upper left of screen', &
      PRINT ESC;"[24;80H"; !position cursor in lower right of screen', &
2 ERASING

 From cursor to end of line           <ESC>[K
 From cursor to end of line           <ESC>[0K
 From beginning of line to cursor     <ESC>[1K
 Entire line containing cursor        <ESC>[2K
 From cursor to end of screen         <ESC>[J
 From cursor to end of screen         <ESC>[0J
 From beginning of screen to cursor   <ESC>[1J
 Entire screen                        <ESC>[2J
                                                                  
 i.e. PRINT ESC;"[2J";   !clear entire screen     ',&
                                                                  
      PRINT ESC;"[K";    !clear from cursor to end of line', &

2 Character_sets
 CHARACTER SETS (G0 AND G1 DESIGNATORS)
                                                                  
 Character Set                    G0 Designator   G1 Designator    
 United Kingdom(UK)                 <ESC>(A         <ESC>)A        
 United States (USASCII)            <ESC>(B         <ESC>)B        
 Special graphics characters                                       
  and line drawing set              <ESC>(0         <ESC>)0        
 Alternate character ROM            <ESC>(1         <ESC>)1        
 Alternate character ROM                                           
  special graphics characters       <ESC>(2         <ESC>)2        
2 Scrolling_region
                                                                   
 <ESC>[pt;pbr                                                      
                                                                   
 pt (top parameter) and pb (bottom parameter) are variables which  
 default to 0 and 24 respectively but may be included in the       
 control sequence by the programmer.                               
2 Tab_stops
                                                                   
 Set tab at current column          <ESC>H                         
 Clear tab at current column        <ESC>[g                        
 Clear tab at current column        <ESC>[0g                       
 Clear all tabs                     <ESC>[3g                       
2 Modes
                                                                   
 Mode Name            Mode        Sequence     Mode      Sequence  
 Line feed/new line   New line    <ESC>[20h    Line feed <ESC>[20l*
 Cursor key mode      Application <ESC>[?1h    Cursor    <ESC>[?1l*
 ANSI/VT52 mode       ANSI        <ESC>[?2h    VT52      <ESC>[?2l*
 Column mode          132 Col     <ESC>[?3h    80 Col    <ESC>[?3l*
 Scrolling mode       Smooth      <ESC>[?4h    Jump      <ESC>[?4l*
 Screen mode          Reverse     <ESC>[?5h    Normal    <ESC>[?5l*
 Origin mode          Relative    <ESC>[?6h    Absolute  <ESC>[?6l*
 Wraparound           On          <ESC>[?7h    Off       <ESC>[?7l*
 Auto repeat          On          <ESC>[?8h    Off       <ESC>[?8l*
 Interlace            On          <ESC>[?9h    Off       <ESC>[?9l*
 Graphic option       On          <ESC>1       Off       <ESC>2    
 Keypad mode          Application <ESC>=       Numeric   <ESC>>    
                                                                   
 * The last character of the sequence is a lowercase L (108)       
2 Reports
   Cursor Position Report Invoked by  <ESC>[6n                    
                          Response is <ESC>[pl;pcR                
            Status Report Invoked by  <ESC>[5n                    
                          Response is <ESC>[0n  (terminal ok)     
                                      <ESC>[3n  (terminal not ok) 
             What are you Invoked by  <ESC>[c                     
                                      <ESC>[0c                    
                          Response is <ESC>[?1;psc                
 ps = 0  Base VT100, no options                                    
      1  Processor option (STP)                                    
      2  Advanced video option(AVO)                                
      3  AVO and STP                                               
      4  Graphics processor optin (GPO)                            
      5  GPO and STP                                               
      6  GPO and AVO                                               
      7  GPO, STO and AVO                                          
 Alternately invoked by <ESC>Z (not recommended).                  
 Response is the same.                                             
2 Reset
 
 Reset default terminal characteristics

 <ESC>c                                                            
2 Confidence_tests

 Fill Screen with "E"s        <ESC>#8
 Invoke Test(s)               <ESC>[2;psy                          
 ps = 1                       Power-up self test                   
                              (ROM checksum, RAM, NVR,             
                              keyboard and AVO if installed)       
      2*                      Data Loop Back                       
      4*                      EIA Modem Control Test               
      8                       Repeat selected test(s)              
                              indefinitely                         
                              (until failure or power off)         
                                                                   
 * (Loop back connector required)                                  
2 VT52_compatible_mode
    Cursor Up                             <ESC>A                  
    Cursor Down                           <ESC>B                  
    Cursor Right                          <ESC>C                  
    Cursor Left                           <ESC>D                  
    Select Special Graphics character set <ESC>F                  
    Select ASCII character set            <ESC>G                  
    Cursor to hme                         <ESC>H                  
    Reverse line feed                     <ESC>I                  
    Erase to end of screen                <ESC>J                  
    Erase to end of line                  <ESC>K                  
    Direct cursor address                 <ESC>plpc (see note 1)  
    Identify                              <ESC>Z    (see note 2)  
    Enter alternate keypad mode           <ESC>=                  
    Exit alternate keypad mode            <ESC>>                  
    Enter ANSI mode                       <ESC><                  
                                                                  
 NOTE 1:  pl and pc are direct cursor addresses, use desired number
          plus 31.
 NOTE 2:  Response to <ESC>Z is <ESC>/Z                            
2 Aux._keypad codes:
                       VT52 Modes                 ANSI Modes        
 Key             Numeric        Application Numeric     Application
 0                0             <ESC>?p     0           <ESC>?Op   
 1                1             <ESC>?q     1           <ESC>?Oq   
 2                2             <ESC>?r     2           <ESC>?Or   
 3                3             <ESC>?s     3           <ESC>?Os   
 4                4             <ESC>?t     4           <ESC>?Ot   
 5                5             <ESC>?u     5           <ESC>?Ou   
 6                6             <ESC>?v     6           <ESC>?Ov   
 7                7             <ESC>?w     7           <ESC>?Ow   
 8                8             <ESC>?x     8           <ESC>?Ox   
 9                9             <ESC>?y     9           <ESC>?Oy   
 -(minus)         -(minus)       <ESC>?m     -(minus)    <ESC>?Om   
 ,(comma)         ,(comma)       <ESC>?l *   ,(comma)    <ESC>?Ol * 
 .(period)        .(period)      <ESC>?n     .(period)   <ESC>?On   
 ENTER            Same as RETURN <ESC>?M  Same as RETURN <ESC>?OM   
 PF1              <ESC>P      <ESC>P      <ESC>OP      <ESC>OP      
 PF2              <ESC>Q      <ESC>Q      <ESC>OQ      <ESC>OQ      
 PF3              <ESC>R      <ESC>R      <ESC>OR      <ESC>OR      
 PF4              <ESC>S      <ESC>S      <ESC>OS      <ESC>OS      
 *The last character of the sequence is a lowercase L (108)    
2 ASCII_codes
 000 NUL | 020     | 040 (    | 060 <   | 080 P   | 100 d   | 120 x   
 001 SOH | 021     | 041 )    | 061 =   | 081 Q   | 101 e   | 121 y   
 002 STX | 022     | 042 *    | 062 >   | 082 R   | 102 f   | 122 z   
 003 ETX | 023     | 043 +    | 063 ?   | 083 S   | 103 g   | 123 {   
 004 EOT | 024     | 044 ,    | 064 @   | 084 T   | 104 h   | 124 |   
 005 ENQ | 025     | 045 -    | 065 A   | 085 U   | 105 i   | 125 }   
 006 ACK | 026     | 046 .    | 066 B   | 086 V   | 106 j   | 126 ~   
 007 BEL | 027     | 047 /    | 067 C   | 087 W   | 107 k   | 127 DEL 
 008 BS  | 028     | 048 0    | 068 D   | 088 X   | 108 l   |         
 009 HT  | 029     | 049 1    | 069 E   | 089 Y   | 109 m   |         
 010 LF  | 030     | 050 2    | 070 F   | 090 Z   | 110 n   |         
 011 VT  | 031     | 051 3    | 071 G   | 091 [   | 111 o   |         
 012 FF  | 032 SP  | 052 4    | 072 H   | 092 \   | 112 p   |         
 013 CR  | 033 !   | 053 5    | 073 I   | 093 ]   | 113 q   |         
 014 SO  | 034 "   | 054 6    | 074 J   | 094 ^   | 114 r   |         
 015 SI  | 035 #   | 055 7    | 075 K   | 095 _   | 115 s   |         
 016 DLE | 036 $   | 056 8    | 076 L   | 096 `   | 116 t   |         
 017 DC1 | 037 %   | 057 9    | 077 M   | 097 a   | 117 u   |         
 018 DC2 | 038 &   | 058 :    | 078 N   | 098 b   | 118 v   |         
 019 DC3 | 039 '   | 059 ;    | 079 O   | 099 c   | 119 w   |         
3 note
 The following control characters are generated differently
 from previous DIGITAL terminals                           
                                                                  
                        Previous                                  
 Code   VT100            Terminal                                  
 NUL    CTRL-Space bar   CTRL-@                                    
 RS     CTRL-~           CTRL-^                                    
 US     CTRL-?           CTRL--                                    
                                                                  
2 Cursor_control_key_codes
      Cursor Key   VT52   ANSI/Cursor      ANSI/Cursor            
      (arrow)      Mode   Key Mode Reset   Key Mode Set           
      Up           <ESC>A <ESC>[A          <ESC>[OA               
      Down         <ESC>B <ESC>[B          <ESC>[OB               
      Right        <ESC>C <ESC>[C          <ESC>[OC               
      Left         <ESC>D <ESC>[D          <ESC>[OD               
2 Graphics_characters
 <ESC>(B    SELECT U.S. CHAR SET FOR G0(B)0
 <ESC>)0    SELECT GRAPHICS SET FOR G1

      ^N    SHIFT TO ALTERNATE CHAR SET (G1)
  in BASIC:  PRINT SO; "abc"    or    PRINT CHR$(14); "abc"

      ^O    RETURN TO DEFAULT CHAR SET (G0)
  in BASIC:  PRINT SI; "abc"    or    PRINT CHR$(15); "abc"

 G0 = ` a b c d e f g h i j k l m n
 G1 = ` a b c d e f g h i j k l m n

 G0 = o p q r s t u v w x y z { | } ~ 
 G1 = o p q r s t u v w x y z { | } ~
