Text Mode - Technical Basis

Technical Basis

A video controller implementing a text mode usually uses two distinct areas of memory. Character memory or a pattern table contains a raster font in use, where each character is represented by a dot matrix (a matrix of bits), so the character memory could be considered as a three-dimensional bit array. Display matrix (a text buffer, screen buffer, or nametable) tracks which character is in each cell. In the simple case the display matrix can be just a matrix of code points (so named character pointer table), but it usually stores for each character position not only a code, but also attributes.

L\C 0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
1
0
0
1
1
0
0
0
1
1
1
00000000
11111111
00001111
00110011
01010101
11…
00…
00…
00…
01…
00000
00001
00010
00011
00100
00101
00110
00111
01000
01001
… … …

In the case of raster scan output, which is the most common for computer monitors, the corresponding video signal is made by the character generator, a special electronic unit similar to devices with the same name used in video technology. The video controller has two registers: 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; the remainder is an index in glyph matrix. If glyph size equals to 2n, then it is possible just to use n 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 a read-only memory in some systems. Other systems allow the use of RAM for this purpose, making it possible to redefine the typeface and even the character 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 the TMS9918, the MOS Technology VIC, and the Game Boy graphics hardware, this was actually the canonical way of doing pixel graphics.

Text modes often assign attributes to the displayed characters. For example, the VT100 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 limited palette of colors. These attributes can either coexist with the character indices or use a different memory area called color memory or attribute memory.

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.

Read more about this topic:  Text Mode

Famous quotes containing the words technical and/or basis:

    The best work of artists in any age is the work of innocence liberated by technical knowledge. The laboratory experiments that led to the theory of pure color equipped the impressionists to paint nature as if it had only just been created.
    Nancy Hale (b. 1908)

    Far from being the basis of the good society, the family, with its narrow privacy and tawdry secrets, is the source of all our discontents.
    Sir Edmund Leach (20th century)