This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Text mode" – news ·newspapers ·books ·scholar ·JSTOR(October 2010) (Learn how and when to remove this message) |
Text mode is acomputer display mode in which content is internally represented on a computer screen in terms ofcharacters rather than individualpixels. Typically, the screen consists of a uniformrectangular grid ofcharacter cells, each of which contains one of the characters of acharacter set; at the same time, contrasted tographics mode or other kinds ofcomputer graphics modes.
Text mode applications communicate with the user by usingcommand-line interfaces andtext user interfaces. Many character sets used in text mode applications also contain a limited set of predefined semi-graphical characters usable fordrawing boxes and other rudimentary graphics, which can be used to highlight the content or to simulatewidget or control interface objects found inGUI programs. A typical example is theIBMcode page 437 character set.
An important characteristic of text mode programs is that they assumemonospaced 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, thescreen buffer can bedirectly addressable. Programs that display output on remotevideo terminals must issue specialcontrol sequences to manipulate the screen buffer. The most popular standards for such control sequences areANSI andVT100.
Programs accessing the screen buffer through control sequences may lose synchronization with the actual display so that many text mode programs have aredisplay everything command, often associated with theCtrl+L key combination.
Text mode video rendering came to prominence in the early 1970s, when video-orientedtext terminals started to replaceteleprinters in the interactive use of computers.
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.(December 2012) (Learn how and when to remove this message) |
The advantages of text modes as compared to graphics modes include lower memory consumption and faster screen manipulation.[1] At the time text terminals were beginning to replace teleprinters in the 1970s, the extremely high cost ofrandom-access memory in that period made it exorbitantly expensive to install enough memory for a computer to simultaneously store the current value ofevery pixel on a screen, to form what would now be called aframebuffer. 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.[2] 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 acathode-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 witheach 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'sscreen 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 ofpersistence of vision).
For example, a screen buffer sufficient to hold a standard grid of 80 by 25 characters requires at least 2,000 bytes.[1] Assuming amonochrome display, 8 bits per byte, and a standard size of 8 times 8 bits for each character, a framebuffer large enough to hold every pixel on the resulting screen would require at least 128,000 bits, 16,000 bytes, or just under 16 kilobytes. By the standards of modern computers, these may seem like trivial amounts of memory, but to put them in context, the originalApple II was released in 1977 with only four kilobytes of memory and a price of $1,300 in U.S. dollars (at a time when theminimum wage in the United States was only $2.30 per hour). Furthermore, from a business perspective, thebusiness case for text terminals made no sense unless they could be produced and operated more cheaply than the paper-hungry teleprinters they were supposed to replace.
Another advantage of text mode is that it has relatively low bandwidth requirements in remote terminal use. Thus, a text mode remote terminal can necessarily update the screen much faster than a graphics mode remote terminal linked to the same amount of bandwidth (and in turn will seem more responsive), since the remote server may only need to transmit a few dozen bytes for each screen update in text mode, as opposed to complex raster graphicsremote procedure calls that may require the transmission and rendering of entirebitmaps.
The border between text mode and graphical programs can sometimes be fuzzy, especially on the PC'sVGA hardware, because many later text mode programs tried to push the model to the extreme by playing with thevideo controller. For example, they redefined the character set in order to create custom semi-graphical characters, or even created the appearance of a graphical mouse pointer by redefining the appearance of the characters over which the mouse pointer was shown at a given time.
Text mode rendering with user-defined characters has also been useful for 2Dcomputer and video games because the game screen can be manipulated much faster than with pixel-oriented rendering.
Avideo controller implementing a text mode usually uses two distinct areas ofmemory.Character memory or apattern table contains araster font in use, where each character is represented by adot matrix (amatrix ofbits), so the character memory could be considered as a three-dimensionalbit array.Display matrix (atext buffer,screen buffer, ornametable) tracks which character is in each cell. In the simple case the display matrix can be just a matrix ofcode points (so namedcharacter pointer table), but it usually stores for each character position not only a code, but alsoattributes.
In the case ofraster scan output, which is the most common for computer monitors, the corresponding video signal is made by thecharacter generator, a special electronic unit similar todevices with the same name used in video technology. The video controller has tworegisters: scan line counter and dot counter, serving as coordinates in the screen dot matrix. Each of them must be divided by corresponding glyph size to obtain an index in the display matrix; theremainder is an index in glyph matrix. If glyph size equals to2n, then it is possible just to usen low bits of a binary register as an index in glyph matrix, and the rest of bits as an index in the display matrix — see the scheme.
The character memory resides in aread-only memory in some systems. Other systems allow the use ofRAM for this purpose, making it possible to redefine thetypeface and even thecharacter set for application-specific purposes. The use of RAM-based characters also facilitates some special techniques, such as the implementation of a pixel-graphics frame buffer by reserving some characters for a bitmap and writing pixels directly to their corresponding character memory. In some historical graphics chips, including theTMS9918, theMOS Technology VIC, and theGame Boy graphics hardware, this was actually the canonical way of doing pixel graphics.
Text modes often assignattributes to the displayed characters. For example, theVT100 terminal allows each character to be underlined, brightened, blinking or inverse. Color-supporting devices usually allow the color of each character, and often the background color as well, to be selected from a limitedpalette of colors. These attributes can either coexist with the character indices or use a different memory area calledcolor memory orattribute memory.[3]
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.
Depending on the graphics adapter used, a variety of text modes are available onIBM PC–compatible computers. They are listed on the table below:[4]
Text res. | Char. size | Graphics res. | 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-compatibleSuper 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 allIBM and compatible personal computers. Several programs, such asterminal emulators, used only 80×24 for the main display and reserved the bottom row for astatus 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 extendedVESA-compatibleSuper 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. InLinux systems, a program calledSVGATextMode is often used with SVGA cards to set up very large console text modes, such as for use with split-screenterminal multiplexers.
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., duringcomputer programming. There exist also software components toemulate text mode, such asterminal emulators or command lineconsoles. InMicrosoft Windows, theWin32 console usually opens in emulated, graphical window mode. It can be switched to full screen, true text mode and vice versa by pressing theAlt andEnter keys together.[5] This is no longer supported by the WDDM display drivers introduced with Windows Vista.[6]
Linuxvirtual consoles operate in text mode. Most Linux distributions support several virtual console screens, accessed by pressingCtrl, Alt and afunction key together.
TheAAlibopen source library provides programs and routines that specialize in translating standard image and video files, such asPNG andWMV, and displaying them as a collection ofASCII characters. This enables a rudimentary viewing of graphics files on text mode systems, and on text mode web browsers such asLynx.