Terminal – Extent of VT100 Basis in Xterm, Xterm-Color, and Linux Terminal Emulators

historyterminalterminal-emulatorxterm

My understanding is that all of these terminal emulators derive the ASCII control code behaviors and ANSI escape sequences from the VT100 standard. I also understand that there is an ANSI standard for terminal behavior that is based on either VT100 or VT102. Am I correct in this understanding? Also, what other features or behaviors are derived from VT100?

Best Answer

While there were several popular terminals during the 1970s and 1980s, for whatever reason the original developers of xterm starting in the late 1980s chose to use vt100 as a model. From the outset there were differences (such as the alternate screen mode, which may have been influenced by Hewlett Package terminals).

ANSI x3.64 was not based on vt100; DEC was one of several manufacturers who participated in developing the standard. Like most standards, it is compromise. Much of vt100 corresponds to the ANSI x3.64 standard, replaced long ago by ISO-6429 (ECMA-48). It implements perhaps a quarter of ECMA-48, and provides some features not in the standard.

Some features of vt100 not in the standard include:

  • scrolling (and scrolling margins)
  • double-size characters
  • save/restore cursor position

You've used two of those three, knowing or not. ECMA-48 describes different controls for scrolling which vt100 did not implement, but are supported in xterm (and some of the xterm imitators).

Other ANSI-compliant terminals such as Sun's console emulator did not implement these features (and sending the scrolling region escape there has interesting results).

Strictly speaking, the vt100 did not support the controls for inserting and deleting lines. That was done in vt102 (which is what most people think of as "vt100"). They're part of a series: a complete vt100 emulator can emulate vt52, vt220 can emulate vt100, vt420 can emulate vt220 / vt100 / vt52.

By the mid-1990s, xterm had some of the character-set switching features associated with vt220. Further development added all but soft fonts from the vt220 repertoire (like double-sized characters, this is not used from many programs other than vttest). This is summarized in the manual page section on Emulations.

While ISO-6429 defined color escape sequences, those were not supported by the vt100/vt220 models. Those were supported in the vt525 model, which I've been told was designed and manufactured by Wyse. Neither DEC nor Wyse has made terminals for quite a while, and the behavior of colors in that terminal had no impact on the development of xterm. That had some influence from Linux console — but Linux console's color palette escapes fall completely outside any standard. Its color selection escapes are based on ANSI, but likely in imitation of AT&T (and SCO) consoles rather than by reading the standard itself.