The OpenNET Project / Index page

[ новости/++ | форум | wiki | теги | ]

Поиск:  Каталог документации

Next Previous Contents

8. Special Features of Some Terminals

8.1 Color

While the common monochrome terminal is not a color terminal it may have a fixed "color" display other than white such as green or amber. All terminals have black (electron beam turned off = zero brightness). A real color terminal can change the color of the text and background to many different colors while a monochrome terminal can only change the brightness of a fixed color.

However, changing the brightness, etc. gives a lot of possibilities. For example, a black and white (monochrome) terminal can have white, grey, and black by varying the brightness. Some words can be black on a light grey background while other are highlighted by black on white. In addition there is white on black, underlining, and blinking.

Color works like the color on a computer monitor or TV screen. The CRT has three colors of dots on it with each color controlled by its own electron beam (3 beams). Monochrome has inherently better resolution since it doesn't depend on dots permanently fixed on the screen. For text terminals the only use of color is to differentiate text and this advantage is not always worth the cost of worse resolution. Thus monochrome may be better since it also costs less.

8.2 Multiple Sessions

For dual sessions the terminal has two serial ports of equal status. Each port is connected to a serial port on a different computer. Thus one may log in to two different computers with each session displaying in a split-screen window. Alternatively, each session may run full-screen with a "hot" key (or the like) to switch between sessions. One could also connect to two different serial ports on the same computer and log in twice (similar to "virtual terminals" at the console). The program "screen" will make any ordinary terminal (single session) connected to a single computer run two or more "sessions".

8.3 Printer/Auxiliary Port

Many terminals have a connector on the rear for such a port. It may be labeled as "Aux" or "Printer", etc. Some printer ports are for parallel printers while others are for serial printers. If a printer is connected to the printer or auxiliary port, then pressing certain keys will print the screen. One may also have everything that displays on the screen go also to the printer. If the port is an auxiliary port, one may connect this to another computer and almost have dual sessions as above. However, the video memory inside the terminal may not retain both sessions so you may need to refresh the screen when switching to the other session. There will likely not be a hot key either but possibly a programmable function key may be programmed to do this. There exists various key combinations and escape sequences for controlling such a port. See Printer Esc.

There is a program called vtprint which is designed to send a print job (text only) to your terminal to be printed on a printer attached to the terminal. It's homepage is It's also included in the Debian distribution of Linux. xprt (also in Debian) seems to do something similar, but only for X Window terminals ??

Using the printer port to print may be useful if you don't have an extra port on your PC for a printer or for "point of sale" use in a store. "Transparent print mode" is where whatever the PC sends out to the terminal goes instead to the printer. If you want the printer to be able to send bytes to the PC (in the reverse direction) then (per Wyse) it's "bidirectional mode". The Wyse "auxiliary print mode" is just transparent print mode where the terminal screen monitors what's being printed.

8.4 Pages

Many terminals permit the storage of more than one page in their video memory. Sometimes the page size is the same as the screen, but sometimes it is larger so that scrolling will reveal unseen parts of a page. So when one looks at a screen, there may be hidden text on the same page above or below the display. In addition, if there is more than just one page, there may be hidden text on these other pages. One use for pages is on terminals that support dual sessions. Each session may have its own page and one may switch back and forth between them.

Even if you only have a one-page-terminal with the page sized equal to what is displayed on the screen, you will still see other pages of a file (etc.) as the host sends more data to the terminal. One advantage to having additional pages stored in the terminal memory is so that you can jump to them instantly without waiting a second or so for them to be transmitted from the host.

Multiple pages is supported by ncurses. There is also a commercial program called "Multiscreen" which supports multiple pages but probably not for Linux ?? Multiscreen is reported to be part of SCO and is something like the virtual terminals on a Linux PC console. The Linux program "screen" makes it look like you have multiple pages but they are stored in the computer and but you can have only one page-like window for each running program.

8.5 Character-Sets

A character-set is normally represented by a list (or table or chart) of characters along with the byte code assigned to each character. The codes for a byte range from 0 to 255 (00 to FF in hexadecimal). In MS-DOS, character-set tables are called "code-pages". You should examine such a table if you're not familiar with them. They are sometimes included in printer and terminal manuals but also are found on the Internet.

Many character sets include letters from foreign languages. But they may also include special characters used to draw boxes and other special characters.

ASCII was the traditional English character set used on text terminals It is a 7-bit code but will usually work OK even if your terminal is set to 8-bit mode. In 8-bit mode with ASCII, the high order bit is always set to zero. Other character-sets are usually available and usually use 8-bit codes (except on very old terminals where the only choice is ASCII). The first half of most character-sets are the conventional 128 ASCII characters and the second half (with the high-order bit set to 1) belong to a wide variety of character-sets. Character sets are often ISO standards. To get specialized character sets on a terminal, you may need to download a soft-font for that character-set into the memory of the terminal. Many terminals have a number of built-in character sets (but perhaps not the one you need).

Here are some common 8-bit character sets. CP stands for Code Page character sets invented by IBM: CP-437 (DOS ECS), ISO-8859-1 (Latin-1), CP-850 (Multilingual Latin 1 --not the same as ISO Latin-1), CP-1252 (WinLatin1 = MS-ANSI). MS Windows uses CP-1252 (WinLatin1) while the Internet often uses Latin-1. There are several ISO-8859- character sets in addition to Latin-1. These include Greek (-7), Arabic (-6), Eastern European (-2), and a replacement for Latin-1 (-15) called Latin-9. There are many others. For example, KOI8-R is more commonly used for Russian than IS0-8859-5. Unicode is a very large character-set where each character is represented by 2 bytes instead on just one byte.

More info re character-sets are:

Once you've found the character set name (or alpha-numeric designation) you are interested in, you may search for more info about it on the Internet.

Graphics (Line Drawing, etc.)

There are special characters for drawing boxes, etc. There are also numerous non-ASCII symbols such as bullets. These may either be part of an 8-bit character set (such as WinLatin1 = CP-1252) or provided as a separate font (in vt100 terminals). Your terminfo may be set up to use them. But if you see a row of letters when there should be a line, it may mean that terminfo hasn't implemented them.

You need to know the following if your graphics don't work right. The default graphic character set is the vt-100 ANSI graphics. Otherwise the string acsc must be defined in your terminfo. It establishes a map between the vt-100 graphic characters codes and the actual codes used on your terminal. So even if your terminal doesn't have the vt-100 graphics, it can likely still generate such graphics with some other character set. If terminfo has it right, this will happen automatically.

If character sets must be switched then the terminfo variables: enacs, rmacs, and smacs should be defined. Note acs = Alternate Character Set. Even if the upper half of the normal character set contains the graphic characters it may be considered a separate 7-bit character set that needs to be switched to.

National Replacement Characters (obsolete)

These result in modified 7-bit ASCII codes. They became obsolete in the 1990's but exist on some older terminals. Many West-European languages only need several additional letters which are not in ASCII. To get them in 7-bit code, one may borrow the codes for seldom used ASCII symbols:
@ [ \ ] ^ ` { \ } ~
The symbols $ and # are sometimes used also. So when using these replacement character sets, you are deprived of using certain ASCII symbols since they now are used for the new non-ASCII letters. Now that 8-bit character codes have mostly replaced 7-bit ones, it's better to use an 8-bit code which has both all the ASCII symbols plus the non-ASCII characters for various languages.

ISO-646 (for 1972 and later) permits this. It specifies that the above mentioned character codes may be borrowed, but doesn't specify which national characters are to replace them. Some countries standardized the replacements by registering them with ECMA.

Many terminals exist which support these national replacement characters but you probably don't want to implement them unless you have some old files to read. Very old terminals may only support one language (for the country in which they were sold). Later terminals offered a choice of languages. Modem terminals are 8-bit and don't need "national replacements". Replacement characters exist for the following languages/countries: British, Cuba (Spanish), Dutch, Finnish, French, French Canadian, German, Hebrew, Hungarian, Italian, Norwegian/Danish, Portuguese, Spanish, Swedish, Swiss (German).

Here's tables for some character sets taken from Kermit and Unisys documents:

                              Swedish     Danish
ASCII           German        Finnish      Norwegian    French

@ at-sign       section       -------      -------      a-grave
[ left-bracket  A-diaeresis   A-diaeresis  AE-digraph   degree
/ backslash     O-diaeresis   O-diaeresis  O-slash      c-cedilla
] right-bracket U-diaeresis   A-circle     A-circle     section
^ circumflex    ------        U-diaeresis  -------      -------
` accent-grave  ------        e-acute      -------      -------
{ left-brace    a-diaeresis   a-diaeresis  ae-digraph   e-acute
| vertical-bar  o-diaeresis   o-diaeresis  o-circle     u-grave
} right-brace   u-diaeresis   a-circle     a-circle     e-grave
~ tilde         ess-zet       u-diaeresis  --------     diaeresis

ASCII            Italian     Spanish

@ at-sign        section     section
[ left-bracket   degree      inverted-exclamation
/ backslash      #-pound     N-tilde
] right-bracket  e-acute     inverted-question-mark
^ circumflex     -------     -------
` accent-grave   u-grave     -------
{ left-brace     a-grave     degree
| vertical-bar   o-grave     n-tilde
} right-brace    e-grave     --------
~ tilde          i-grave     --------

8.6 Fonts

Most terminals made after the mid 1980's can accept downloaded soft-font. This means that they can display almost any character set provided that you can find the soft-font for it. If you can't find the needed soft-font, you can always create your own. A free font editor for this is called BitFontEdit (written by the author of this document) and (in 1998) was at
N. America: For mapping the keyboard (and screen) for use of various fonts see Character Mapping: mapchan

8.7 Keyboards & Special Keys

Terminal keyboards often have a number of keys that one doesn't find on a PC keyboard. Few (if any) actual terminals will have all of these keys and most will have additional keys not listed here. Some have a large number of special purpose keys such as terminals made for use with cash registers. There are often many more key meanings than shown here since these keys often have extended meanings when used in conjunction with other keys (such as shift and control).

8.8 Mouse

A few text-terminals support a mouse. When the mouse is clicked, an escape sequence is sent to the host to tell it where the mouse is. For a mouse on VT terminals see These escape codes for mice are called "DEC Locator sequences". Do any linux applications support this ?? Which text-terminals have it ??

Next Previous Contents
  Закладки на сайте
  Проследить за страницей
Created 1996-2018 by Maxim Chirkov  
Hosting by Ihor