VT100.DOC

(14 KB) Pobierz
                        ---------------------------------
                        VT100 Programming Reference Guide
                        ---------------------------------

                           VT100 (ANSI) COMPATIBLE MODE

        NOTE:  (This list was compiled by Dave Schmoldt, Sysop on the
                Flagship Commodore and Starship Amiga RoundTables on GEnie.  
                It includes the majority of VT100/ANSII escape sequences, 
                and some for the VT52 mode.  It does not include ASCII codes,
                since those can be found elsewhere.  It does not include
                the special graphics characters, as they are difficult to
                explain in a text file.  Contact Dave at GEnie mail address 
                D.SCHMOLDT for questions or comments.)


        (The spaces in the examples are for clarity and should not be
         included in the actual command strings.  Upper and lower case
         is important.)

                n = Number
                l = Line Number
                c = Column Number
                b = Bottom of Region
                t = Top of Region


        CURSOR MOVEMENT COMMANDS:
        ------------------------

                Cursor up                               ESC [nA
                Cursor down                             ESC [nB
                Cursor right                            ESC [nC
                Cursor left                             ESC [nD
                Direct Cursor Addressing                ESC [l;cH
                Direct Cursor Addressing                ESC [l;cf
                Index                                   ESC D
                Next Line                               ESC E
                Reverse Index                           ESC M
                Save Cursor and Attributes              ESC 7


        LINE SIZE (DOUBLE HEIGHT AND DOUBLE WIDTH) COMMANDS:
        ---------------------------------------------------

                Change line to double height top half           ESC #3
                Change line to double height bottom half        ESC #4
                Change line to single width single height       ESC #5
                Change line to double width single height       ESC #6


        CHARACTER ATTRIBUTES:
        --------------------

                ESC [s;s;s;...,s m

                        s   =   0 or none       All Attributes Off
                                1               Bold on
                                4               Underscore on
                                5               Blink on
                                7               Reverse video on


        ERASING:
        -------

                From cursor to end of line              ESC [ K
                From cursor to end of line              ESC [ 0 K
                From beginning of line to cursor        ESC [ 1 K
                Entire line containing cursor           ESC [ 2 K
                From cursor to end of screen            ESC [ J
                From cursor to end of screen            ESC [ 0 J
                From beginning of screen to cursor      ESC [ 1 J
                Entire screen                           ESC [ 2 J
                Home cursor                             ESC [ H


        PROGRAMMABLE LEDs:
        -----------------

                ESC [ s;s;...s q

                 s     =   0 or None    All LEDs Off
                           1            L1 on
                           2            L2 on
                           3            L3 on
                           4            L4 on


        TAB STOPS:
        ---------

                Set tab at current column               ESC H
                Clear tab at current columns            ESC [ g
                Clear tab at current columns            ESC [ 0 g
                Clear all tabs                          ESC [ 3 g


        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                    VT52      ESC [?2l
        Column mode             132 columns ESC [?3h    80 column 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 Proc. Option    On          ESC 1       Off       ESC 2
        Keypad mode             Application ESC =       Numeric   ESC >

                 * The last character of the sequence is a lowercase L


        REPORTS:
        -------

                Cursor Position Report

                        Invoked by                      ESC [6n
                        Response is                     ESC [l;c R

                What Are You

                        Invoked by                      ESC [ c
                        Invoked by                      ESC [ 0 c
                        Response is                     ESC [?1;s c

                         s   =          0       Base VT100, no options
                                        1       Processor option (STP)
                                        2       Advanced Video Option (AVO)
                                        3       AVO and STP
                                        4       Graphics Processor Option (GPO)
                                        5       GPO and STP
                                        6       GPO and AVO
                                        7       GPO, STP and AVO

                        Alternately invoked by ESC Z (not recommended).  
                        Response is the same.


        RESET:
        -----

                ESC c

        
        CONFIDENCE TESTS:
        ----------------

                Fill Screen with "Es"                        ESC #8

                Invoke Test(s)                               ESC [2;s y

                         s        =     1        Power-up self test
                                                (ROM checksum, RAM, NVR,
                                                 keyboard and AVO if installed)
                                        2        Data loop back
                                        4        EIA Modern Control Test
                                        8        Repeat selected test(s)
                                                indefinitely (until failure 
                                                or power off)


        AUXILIARY KEYPAD CODES:
        ----------------------

                VT52            VT52            VT100/ANSII     VT100/ANSII
                Numeric         Application     Numeric         Application
        Key     Mode            Mode            Mode            Mode
        ---     ---------------------------     ---------------------------
        0        0              ESC ? p         0               ESC O p
        1        1              ESC ? q         1               ESC O q
        2        2              ESC ? r         2               ESC O r
        3        3              ESC ? s         3               ESC O s
        4        4              ESC ? t         4               ESC O t
        5        5              ESC ? u         5               ESC O u
        6        6              ESC ? v         6               ESC O v
        7        7              ESC ? w         7               ESC O w
        8        8              ESC ? x         8               ESC O x
        9        9              ESC ? y         9               ESC O y
        ,        ,              ESC ? l         ,               ESC O l 
        -        -              ESC ? m         -               ESC O m
        .        .              ESC ? n         .               ESC O n
        ENTER   Same as         ESC ? M         Same as         ESC O M
                RETURN                          RETURN
        PF1     ESC P           ESC P           ESC O P         ESC O P
        PF2     ESC Q           ESC Q           ESC O Q         ESC O Q
        PF3     ESC R           ESC R           ESC O R         ESC O R
        PF4     ESC S           ESC S           ESC O S         ESC O S


        CURSOR CONTROL KEY CODES:
        ------------------------

                Cursor Key      VT52            VT100/Cursor    VT100/Cursor
                (arrow)         Mode            Key Mode Reset  Key Mode Set
                ----------      ----            --------------  ------------
                Up              ESC A           ESC [ A         ESC O A
                Down            ESC B           ESC [ B         ESC O B
                Right           ESC C           ESC [ C         ESC O C
                Left            ESC D           ESC [ D         ESC O D


        SCROLLING REGION:
        ----------------

                ESC [ t;b r


        -----------------------------------------------------------------------
                             Escape Sequences for VT100 Emulation:
        -----------------------------------------------------------------------
        
        Row Size Attributes:
        ------------------------------
        Double high, double wide - bottom:      ESC + "#3"
        Double high, double wide - top:         ESC + "#4"
        Single high, single wide:         ...
Zgłoś jeśli naruszono regulamin