From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,d28165b85ce8e131 X-Google-Attributes: gid1164f8,public X-Google-Thread: 10cebf,d28165b85ce8e131 X-Google-Attributes: gid10cebf,public X-Google-ArrivalTime: 1995-02-02 21:54:25 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!gatech!concert!ais.com!bruce From: bruce@ais.com Newsgroups: comp.sys.dec,comp.sys.dec.micro Subject: Re: VT100 control codes Message-ID: <1995Feb3.005425.7201@ais.com> Date: 3 Feb 95 00:54:25 EST References: <3gmvr7$ef6@chopin.udel.edu> <1995Feb2.011036.5972@microunity.com> Organization: Applied Information Systems, Chapel Hill, NC Xref: nntp.gmd.de comp.sys.dec:21497 comp.sys.dec.micro:2715 In article <1995Feb2.011036.5972@microunity.com>, wampler@microunity.com (Kurt Wampler) writes: > 31457@chopin.udel.edu (James D Rosemary) writes: > >>I am writing a VT100 emulator (for my own personal use - I am the sole >>owner of a machine that it will run on). Does anyone know where I can >>find info on escape sequences, etc? I've found a few by scripting vi, >>but I need more info. > > Here's a list of VT100 escape sequences. > > - Kurt > ================================================================================ > Taken from VT100 Programming Reference Card (DIGITAL) > > ANSI Compatible Mode > > Cursor Movement Commands > [...] > Direct cursor addressing ESC [ Pl; Pc H or > ESC [ Pl; Pc f > * Pn = decimal parameter in string of ASCII digits.(default 1) > * Pl = line number (default 0); Pc = column number (default 0) Note: if Pl or Pc is 0, the corresponding cursor coordinate is unchanged. > Scrolling Region > ESC [ Pt ; Pb r > Pt is the number of the top line of the scrolling region; > Pb is the number of the bottom line of the scrolling region > and must be greater than Pt. Note: If Pt is 0 or omitted, it defaults to 1. If Pb is 0 or omitted, it defaults to the end of the screen (24 on a real VT100). You may also want to implement some of the additional parameters for the ESC [ pn m sequence - for example, to clear individual attributes and/or to set colors. Quite a few programs like to be able to use them: Clear bold ESC [ 22 m Clear underline ESC [ 24 m Clear Blink ESC [ 25 m Clear Reverse ESC [ 27 m Black foreground ESC [ 30 m Red foreground ESC [ 31 m Green foreground ESC [ 32 m Yellow foreground ESC [ 33 m Blue foreground ESC [ 34 m Magenta foreground ESC [ 35 m Cyan foreground ESC [ 36 m White foreground ESC [ 37 m Black background ESC [ 40 m Red background ESC [ 41 m Green background ESC [ 42 m Yellow background ESC [ 43 m Blue background ESC [ 44 m Magenta background ESC [ 45 m Cyan background ESC [ 46 m White background ESC [ 47 m As with other values for Pn, these can be combined together with ;'s. Note that Clear Bold is 22, not 21 as you might expect. On some non-DEC hardware, there is a Dim attribute which is attribute 2, and Pn=22 clears both the Bold and Dim attributes. Good luck, Bruce C. Wright