Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Text mode
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Technical basis== {{redirect|Attribute byte|DOS filesystem attributes|Design of the FAT file system#Directory table}} A [[Graphics card|video controller]] implementing a text mode usually uses two distinct areas of [[video random-access memory|memory]]. ''Character memory'' or a ''pattern table'' contains a [[raster font]] in use, where each character is represented by a [[dot matrix]] (a [[matrix (mathematics)|matrix]] of [[bit]]s), 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 point]]s (so named ''character pointer table''), but it usually stores for each character position not only a code, but also ''attributes''. {| width=372 border=1 cellspacing=0 cellpadding=1 align=right style="margin-left: 16px" class="wikitable" |- bgcolor=#99CCFF ! {{diagonal split header|L|C|#FFFFFF}} |<span style="font-family: monospace">0<br>0<br>0<br>0<br>0</span>||<span style="font-family: monospace">0<br>0<br>0<br>0<br>1</span>||<span style="font-family: monospace">0<br>0<br>0<br>1<br>0</span>||<span style="font-family: monospace">0<br>0<br>0<br>1<br>1</span>||<span style="font-family: monospace">0<br>0<br>1<br>0<br>0</span>||<span style="font-family: monospace">0<br>0<br>1<br>0<br>1</span>||<span style="font-family: monospace">0<br>0<br>1<br>1<br>0</span>||<span style="font-family: monospace">0<br>0<br>1<br>1<br>1</span>||<span style="font-family: monospace">00000000<br>11111111<br>00001111<br>00110011<br>01010101</span>||<span style="font-family: monospace">11β¦<br>00β¦<br>00β¦<br>00β¦<br>01β¦</span> |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00000</span>|| ||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| || | rowspan=8 align=center | | rowspan=8 | |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00001</span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| || || ||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00010</span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| ||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00011</span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| ||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00100</span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| ||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00101</span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| || || || || || |- | bgcolor=#FFCC99 |<span style="font-family: monospace">00110</span>|| ||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>||<span style="color:#00C000; font-size:100%;">β </span>|| || || |- | bgcolor=#FFCC99 |00111|| || || || || || || || |- | bgcolor=#FFCC99 |<span style="line-height: 0.8em">01000<br>01001<br>β¦</span> | colspan=10 align=center |β¦ β¦ β¦ |- | colspan=12 |[[Image:Character generator scheme.svg|384px]]<small><br>A sample of character box and corresponding electronic scheme. The glyph is 8Γ8 pixels, with 3-bit low parts of scan line and dot counter. The screen is between 20Γ18 and 32Γ32 character cells, with 5-bit indices.</small> |} 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 [[character generator|devices with the same name used in video technology]]. The video controller has two [[processor register|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 [[modulo|remainder]] is an index in glyph matrix. If glyph size equals to [[power of two|2<sup><var>n</var></sup>]], then it is possible just to use <var>n</var> 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 [[Random-access memory|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 (computing)|palette]] of colors. These attributes can either coexist with the character indices or use a different memory area called ''color memory'' or ''attribute memory''.<ref>[http://wiki.osdev.org/Text_UI#Video_Memory Text mode layout and palette]</ref> 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)