Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* VT100 control codes
@ 1995-02-01  3:40 James D Rosemary
  1995-02-02  1:10 ` Kurt Wampler
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: James D Rosemary @ 1995-02-01  3:40 UTC (permalink / raw)


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. 

-Jim

BTW - I'm using the program right now, so it can't be THAT bad.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: VT100 control codes
  1995-02-01  3:40 VT100 control codes James D Rosemary
@ 1995-02-02  1:10 ` Kurt Wampler
  1995-02-03  5:54   ` bruce
  1995-02-02 16:24 ` Hein RMS van den Heuvel
  1995-02-09 13:03 ` Garry Page
  2 siblings, 1 reply; 8+ messages in thread
From: Kurt Wampler @ 1995-02-02  1:10 UTC (permalink / raw)


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
		Cursor up			ESC [ Pn A
		Cursor down			ESC [ Pn B
		Cursor forward (right)		ESC [ Pn C
		Cursor backward (left)		ESC [ Pn D
		Direct cursor addressing	ESC [ Pl; Pc H	or
						ESC [ Pl; Pc f
		Index				ESC D
		Next Line			ESC E
		Reverse index			ESC M
		Save cursor and attributes	ESC 7
		Restore cursor and attributes	ESC 8
		* Pn = decimal parameter in string of ASCII digits.(default 1)
		* Pl = line number (default 0); Pc = column number (default 0)

	Line Size (Double-Height and 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

	Character Attributes
		ESC [ Ps;Ps;Ps;...,Ps m
		Ps =	0 or None	All Attributes Off
			1		Bold on
			4		Underscore on
			5		Blink on
			7		Reverse video on
		Any other parameter values are ignored.

	Erasing
		From cursor to end of line		ESC [ K  or 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  or ESC [ 0 J
		From beginning of screen to cursor	ESC [ 1 J
		Entire screen				ESC [ 2 J

	Programmable LEDs
		ESC [ Ps;Ps;...Ps q
		Ps =	0 or None	All LEDs Off
			1		L1 on
			2		L2 on
			3		L3 on
			4		L4 on
		Any other parameter values are ignored.

	Character Set (G0 and G1 Designators)
		Charactor Set			G0 Designator	G1 Designator
		United Kingdom (UK)		ESC ( A		ESC ) A
		United States (USASCII)		ESC ( B		ESC ) B
		Special graphics characters	ESC ( 0		ESC ) 0
		 and line drawing set
		Alternate character ROM		ESC ( 1		ESC ) 1
		Alternate character ROM		ESC ( 2		ESC ) 2
		 special graphics characters

	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.

	TAB stops
		Set tab at current column		ESC H
		Clear tab at curent column		ESC [ g or ESC [ 0 g
		Clear all tabs				ESC [ 3 g

	Modes
	                          To Set                To Reset
	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        N/A        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 proc. option On          ESC 1      Off         ESC 2
	Keypad mode          Application ESC =      Numeric     ESC >

	Reports
		Cursor Position Report
		Invoked by			ESC [ 6 n
		Response is			ESC [ Pl; Pc R
		* Pl = line number; Pc = column number

	Status Report
		Invoked by			ESC [ 5 n
		Response is			ESC [ 0 n  (terminal ok)
						ESC [ 3 n  (terminal not ok)

	What Are You
		Invoked by			ESC [ c  or  ESC [ 0 c
		Response is			ESC [ ?1 ; Ps C
		Ps =	0	Base VT100, no options
			1	Processor option (STP)
			2	Advanced Video option (AVO)
			3	AVO and STP
			4	Graphocs processor option (GO)
			5	GO and STP
			6	GO and AVO
			7	GO, 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 ; Ps y
	Ps =	1				Power-up self test
						(ROM checksum, RAM, NVR,
						keyboard and AVO if installed)
		2(loop back connector required)	Data Loop Back
		4(loop back connector required)	ETA Modern Control Test
		8				Repeat selected test(s)
						indefinitely
						(until failure or power off)

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 home				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 Ylc		(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: Line and column numbers for direct cursor address are single
		character codes whose values are the desired number plus
		37 (in Octal). Line and column numbers start at 1.
	NOTE 2: Response to ESC Z is ESC / Z.


Auxiliary Keypad Codes

                VT52            VT52            ANSI            ANSI
                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
KP-             KP-             ESC ? m         KP-             ESC O m
KP,             KP,             ESC ? l         KP,             ESC O l
KP.             KP.             ESC ? n         KP.             ESC O n
ENTER           Same as RETURN  ESC ? M         Same as RETURN  ESC O M
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
================================================================================


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: VT100 control codes
  1995-02-01  3:40 VT100 control codes James D Rosemary
  1995-02-02  1:10 ` Kurt Wampler
@ 1995-02-02 16:24 ` Hein RMS van den Heuvel
  1995-02-04  6:22   ` John Wilson
  1995-02-09 13:03 ` Garry Page
  2 siblings, 1 reply; 8+ messages in thread
From: Hein RMS van den Heuvel @ 1995-02-02 16:24 UTC (permalink / raw)



In article <3gmvr7$ef6@chopin.udel.edu>, 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. 

Someone already kindly posted a transcript of the programmers reference card.
For any DEC Terminal that is often the the most convenient printed reference.
All DEC terminals also come with a 'programmers reference manual' describing
all supported escape sequences in gory details.

Finally, all VMS systems come with a file SYS$SYSTEM:SMGTERMS.TXT which 
contains (modestly) code up description of the most terminals for use
with SMG. The layout (substitute field encoding) of that file is documented.

Hope this helps,		+--------------------------------------+
Hein van den Heuvel, Digital.	| All opinions expressed are mine, and |
  "Makers of VMS and other	| may not reflect those of my employer |
   fine Operating Systems."	+--------------------------------------+


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: VT100 control codes
  1995-02-02  1:10 ` Kurt Wampler
@ 1995-02-03  5:54   ` bruce
  0 siblings, 0 replies; 8+ messages in thread
From: bruce @ 1995-02-03  5:54 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: VT100 control codes
  1995-02-02 16:24 ` Hein RMS van den Heuvel
@ 1995-02-04  6:22   ` John Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: John Wilson @ 1995-02-04  6:22 UTC (permalink / raw)


In article <3gr0oi$p5c@jac.zko.dec.com>,
Hein RMS van den Heuvel <vandenheuvel@eps.enet.dec.com> wrote:
>Someone already kindly posted a transcript of the programmers reference card.
>For any DEC Terminal that is often the the most convenient printed reference.

Note that the VT100 prog ref card is slightly buggy, the "restore cursor
attributes" command is listed as ESC B when it's really ESC 8, I think there
were one or two other things but that's all I can remember.

John Wilson


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: VT100 control codes
  1995-02-01  3:40 VT100 control codes James D Rosemary
  1995-02-02  1:10 ` Kurt Wampler
  1995-02-02 16:24 ` Hein RMS van den Heuvel
@ 1995-02-09 13:03 ` Garry Page
  2 siblings, 0 replies; 8+ messages in thread
From: Garry Page @ 1995-02-09 13:03 UTC (permalink / raw)


In article <3gmvr7$ef6@chopin.udel.edu>,
James D Rosemary <31457@chopin.udel.edu> wrote:
>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. 

Try Digital for a copy of the VT100 User Guide, Part No. EK-VT100-UG, 
VT100 Mini Maintenence Manual EK-VT100-J1 or VT100 Technical Manual 
EK-VT100-TM. The User Guide should be all you need.

Regards,
Garry Page






^ permalink raw reply	[flat|nested] 8+ messages in thread

* vt100 control codes
@ 1995-05-05  4:00 Brian Lo Bue
  1995-05-05  4:00 ` Stephen Hoffman
  0 siblings, 1 reply; 8+ messages in thread
From: Brian Lo Bue @ 1995-05-05  4:00 UTC (permalink / raw)


would someone please mail me a list of vt100 control codes? I can't seem
to find one.  Thanks in advance.

Brian

#include <disclaimer.h>




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: vt100 control codes
  1995-05-05  4:00 vt100 " Brian Lo Bue
@ 1995-05-05  4:00 ` Stephen Hoffman
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Hoffman @ 1995-05-05  4:00 UTC (permalink / raw)



In article <blobue.799689219@cisco.com>, blobue@cisco.com (Brian Lo Bue) writes:
:would someone please mail me a list of vt100 control codes? I can't seem
:to find one.  Thanks in advance.

   For a full list, look in the VT100 manual, or in a manual for a more
   recent VT-series terminal.  For a partial list, look in /etc/termcap
   or in sys$system:smgterms.txt.

   VT330 text programming manual: EK-VT3XX-TP, pocket card: EK-VT3XX-HR.
   (I happened to have these part numbers handy.  Folks at 1-800-DIGITAL
   can get you this or other manuals.)

  ------------------------------ Opinionative -------------------------------
   Stephen Hoffman, NR EMT-I, WEMT, N1THN        hoffman@xdelta.enet.dec.com
   General Info: info@digital.com     OpenVMS Info: openvms-info@digital.com
        OpenVMS Engineering, Digital Equipment Corporation, Nashua NH




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1995-05-05  4:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-02-01  3:40 VT100 control codes James D Rosemary
1995-02-02  1:10 ` Kurt Wampler
1995-02-03  5:54   ` bruce
1995-02-02 16:24 ` Hein RMS van den Heuvel
1995-02-04  6:22   ` John Wilson
1995-02-09 13:03 ` Garry Page
  -- strict thread matches above, loose matches on Subject: below --
1995-05-05  4:00 vt100 " Brian Lo Bue
1995-05-05  4:00 ` Stephen Hoffman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox