Next Previous Contents

9. Special Features/Types of Some Terminals

9.1 Terminal Uses a PC Monitor

One may use a PC (including it's monitor) to emulate a terminal. But PCs have become so powerful that only a small portion of the PC's capacity is utilized to run the emulation. So why not make a tiny PC that has low computing capability so it is barely able do the task of emulating a terminal. Then call this tiny device a text terminal and point out that one must supply and plug in a PC monitor in order to use this terminal. Such devices exist and are only about an inch high. They are sometimes referred to as small footprint terminals. Their advantage is that they are cheap, take up little space, and might be able to use surplus monitors that otherwise might be discarded.

9.2 Color

Emulated text terminals

In contrast to the monochrome or most real text terminals, an emulated text terminal usually has colors since it displays on a PC color monitor. See Colors on Emulated Terminals

Old real text terminal

Some real terminals had color displays but most had either no color or fixed "color" displays other than white such as green or amber. All terminals had 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.

Real color works like the color on a computer monitor or TV screen. The CRT has three colors of dots permanently on it with the brightness of each color controlled by its own electron beam (3 beams). The monochrome of real text terminals had inherently better resolution since it didn't depend on dots permanently fixed on the screen. For text terminals the only use of color is to differentiate text and this advantage was often not worth the cost of worse resolution. Thus monochrome may have historically been better since it also cost less. But today color displays have are ubiquitous and have improved in resolution since the olden days of the real text terminal.

9.3 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".

9.4 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 vtprint. 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.

9.5 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.

9.6 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)

In the 1960's, the ASCII 7-bit code was devised to map 7-bit bytes to English letters, numbers, punctuation marks, etc. Other countries adopted ASCII, but most of them had some additional letters which were not present in the ASCII code. What to do? Various people decided to purge certain symbols (such as ^, }) from ASCII and to substitute national letters (ones with dots over them, etc.) for the ASCII letters. In other words they replaced ASCII letters with "National Replacement Characters"

There were a lot of problems with this, since it was done mostly by companies which sold computer terminals with a resulting lack of standardization. Another problem was that sometimes the purged symbols were needed. This problem was solved in the 1980's and 1990's with the adoption of 8-bits/byte character sets which had many more letters.

Many West-European languages only needed several additional letters which were not in ASCII. To get them in 7-bit code, they borrowed 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 of these ASCII symbols since they now are used for the new non-ASCII letters. Now that 8-bit character codes have 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. There's also Unicode which replaces 8-bit codes with the same code scheme to cover all languages (well almost all significant ones).

ISO-646 (for 1972 and later) permitted using National Replacement Characters (7-bit). It specified 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 this support unless you have some old files to read. Very old terminals may only support the national characters 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     --------

9.7 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 is at at
http://www.ibiblio.org/pub/Linux/utils/terminal/
For mapping the keyboard (and screen) for use of various fonts see Character Mapping: mapchan

9.8 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).

  • BREAK sends a very long 0 bit (space = +12 V) of duration 300 to 700 milliseconds to the host. The host may interpret this as an interrupt if stty has set brkint or ignore it if ignbrk is set.
  • NO SCROLL stops the screen from scrolling like ^S does. Depressing it again resumes scrolling. Uses flow control signals to do this.
  • REPEAT if held down with an other key, forces repeated output of that other key even if the auto-repeat option is set to off.
  • LINE FEED sends the line feed character ^J to the host. Seldom used.
  • SET-UP allows the manual configuration of the terminal via menus. Sometimes purposely disabled by putting a block under it so it can't be pressed down. Sometimes another key such as shift or control must be pressed at the same time. See Getting Into Set-Up (Configuration) Mode.
  • LOCAL disconnects the terminal from the host. In local, what one types goes directly to the screen. Useful for testing.
  • RETURN is the same as the "enter" key on a PC. It usually sends a carriage return to the host which normally get translated to a new-line character by the host's device driver. On some terminals it may be set up to send something else.
  • F1, F2, ... or PF1, PF2, ... are function keys which sometimes may be programmed to send out a sequence of bytes (characters). See Function Keys

9.9 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 http://www.cs.utk.edu/~shuford/terminal/dec_vt_mouse.html These escape codes for mice are called "DEC Locator sequences". The FALCO Infinity Series of terminals, model ANSI-G supports it. Do any linux applications support this ??


Next Previous Contents
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout