Text mode is a computer display mode in which content is internally represented on a computer screen in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of character cells, each of which contains one of the characters of a character set; at the same time, contrasted to graphics mode or other kinds of computer graphics modes.

Text mode applications communicate with the user by using command-line interfaces and text user interfaces. Many character sets used in text mode applications also contain a limited set of predefined semi-graphical characters usable for drawing boxes and other rudimentary graphics, which can be used to highlight the content or to simulate widget or control interface objects found in GUI programs. A typical example is the IBM code page 437 character set.

An important characteristic of text mode programs is that they assume monospaced fonts, where every character has the same width on screen, which allows them to easily maintain the vertical alignment when displaying semi-graphical characters. This was an analogy of early mechanical printers which had fixed pitch. This way, the output seen on the screen could be sent directly to the printer maintaining the same format.

Depending on the environment, the screen buffer can be directly addressable. Programs that display output on remote video terminals must issue special control sequences to manipulate the screen buffer. The most popular standards for such control sequences are ANSI and VT100.

Programs accessing the screen buffer through control sequences may lose synchronization with the actual display so that many text mode programs have a redisplay everything command, often associated with the key combination.

History

Text mode video rendering came to prominence in the early 1970s, when video-oriented text terminals started to replace teleprinters in the interactive use of computers.

Benefits

The advantages of text modes as compared to graphics modes include lower memory consumption and faster screen manipulation. At the time text terminals were beginning to replace teleprinters in the 1970s, the extremely high cost of random-access memory in that period made it exorbitantly expensive to install enough memory for a computer to simultaneously store the current value of every pixel on a screen, to form what would now be called a framebuffer. Early framebuffers were standalone devices which cost tens of thousands of dollars, in addition to the expense of the advanced high-resolution displays to which they were connected. For applications that required simple line graphics but for which the expense of a framebuffer could not be justified, vector displays were a popular workaround. But there were many computer applications (e.g., data entry into a database) for which all that was required was the ability to render ordinary text in a quick and cost-effective fashion to a cathode-ray tube.

Text mode avoids the problem of expensive memory by having dedicated display hardware re-render each line of text from characters into pixels with each scan of the screen by the cathode ray. In turn, the display hardware needs only enough memory to store the pixels equivalent to one line of text (or even less) at a time. Thus, the computer's screen buffer only stores and knows about the underlying text characters (hence the name "text mode") and the only location where the actual pixels representing those characters exist as a single unified image is the screen itself, as viewed by the user (thanks to the phenomenon of persistence of vision).

For example, a screen buffer sufficient to hold a standard grid of 80 by 25 characters requires at least 2,000 bytes.

Some text mode implementations also have the concept of line attributes. For example, the VT100-compatible line of text terminals supports the doubling of the width and height of the characters on individual text lines.

PC common text modes

Depending on the graphics adapter used, a variety of text modes are available on IBM PC–compatible computers. They are listed on the table below:

{| class="wikitable col1right"

! Text<br/> resolution

! Character<br/> size

! Graphics<br/> resolution

! Colors

! Adapters

|-

| 80×25

| 9×14

| 720×350

| B&W text

| MDA, Hercules

|-

| 40×25

| 8×8

| 320×200

| 16 colors

| CGA, EGA

|-

| 80×25

| 8×8

| 640×200

| 16 colors

| CGA, EGA

|-

| 80×25

| 8×14

| 640×350

| 16 colors

| EGA

|-

| 80×43

| 8×8

| 640×350

| 16 colors

| EGA

|-

| 80×25

| 9×16

| 720×400

| 16 colors

| VGA

|-

| 80×30

| 8×16

| 640×480

| 16 colors

| VGA

|-

| 80×50

| 9×8

| 720×400

| 16 colors

| VGA

|-

| 80×60

|

|

| 16 colors

| VESA-compatible Super VGA

|-

| 132×25

|

|

| 16 colors

| VESA-compatible Super VGA

|-

| 132×43

|

|

| 16 colors

| VESA-compatible Super VGA

|-

| 132×50

|

|

| 16 colors

| VESA-compatible Super VGA

|-

| 132×60

|

|

| 16 colors

| VESA-compatible Super VGA

|-

|}

MDA text could be emphasized with bright, underline, reverse and blinking attributes.

Video cards in general are backward compatible, i.e. EGA supports all MDA and CGA modes, VGA supports MDA, CGA and EGA modes.

By far the most common text mode used in DOS environments, and initial Windows consoles, is the default 80 columns by 25 rows, or 80×25, with 16 colors. This mode was available on practically all IBM and compatible personal computers. Several programs, such as terminal emulators, used only 80×24 for the main display and reserved the bottom row for a status bar.

Two other VGA text modes, 80×43 and 80×50, exist but were very rarely used. The 40-column text modes were never very popular outside games and other applications designed for compatibility with television monitors, and were used only for demonstration purposes or with very old hardware.

Character sizes and graphical resolutions for the extended VESA-compatible Super VGA text modes are manufacturer-dependent. Also on these display adapters, available colors can be halved from 16 to 8 when a second customized character set is employed (giving a total repertoire of 512 —instead the common 256— different graphic characters simultaneously displayed on the screen).

Some cards (e.g. S3) supported custom very large text modes, like 100×37 or even 160×120. In Linux systems, a program called SVGATextMode is often used with SVGA cards to set up very large console text modes, such as for use with split-screen terminal multiplexers.

Modern usage

Many modern programs with a graphical interface simulate the display style of text mode programs, notably when it is important to preserve the vertical alignment of text, e.g., during computer programming. There exist also software components to emulate text mode, such as terminal emulators or command line consoles. In Microsoft Windows, the Win32 console usually opens in emulated, graphical window mode. It can be switched to full screen, true text mode and vice versa by pressing the Alt and Enter keys together. This is no longer supported by the WDDM display drivers introduced with Windows Vista.

Linux virtual consoles operate in text mode. Most Linux distributions support several virtual console screens, accessed by pressing Ctrl, Alt and a function key together.

thumb|UEFI shell implemented with Simple Text Output Protocol

The AAlib open source library provides programs and routines that specialize in translating standard image and video files, such as PNG and WMV, and displaying them as a collection of ASCII characters. This enables a rudimentary viewing of graphics files on text mode systems, and on text mode web browsers such as Lynx.

UEFI-based systems provide Unicode text mode output support with Simple Text Output Protocol. Minimum supported text resolution is at least 80×25 and minimal recommended character set includes Basic Latin Unicode characters.

See also

  • Text-based user interface

<!--* Text mode demos — computer animations generated in text mode. Just for history: "Text mode demos", "tmdc11", "tmdc13" "32x" and "pcdemoscene" removed early (2014).-->

  • Teletext
  • Text semigraphics
  • ASCII art
  • Twin
  • Hardware code page
  • VGA text mode VGA-compatible text mode details
  • Line-oriented printer
  • Characters per line

References

  • High-Resolution console on Linux

Further reading

  • (NB. For example: Signetics 2513 MOS ROM.)