Home »

Vga text mode

The meaning of «vga text mode»

VGA text mode was introduced in 1987 by IBM as part of the VGA standard for its IBM PS/2 computers.[1] Its use on IBM PC compatibles was widespread through the 1990s and persists today for some applications on modern computers.[2] The main features of VGA text mode are colored (programmable 16 color palette) characters and their background, blinking, various shapes of the cursor (block/underline/hidden static/blinking),[3] and loadable fonts (with various glyph sizes).[4] The Linux console traditionally uses hardware VGA text modes,[5] and the Win32 console environment has an ability to switch the screen to text mode for some text window sizes.

  Distinctive features of VGA text as it commonly used:

  Light gray background (normally not white).

Each screen character is represented by two bytes aligned as a 16-bit word accessible by the CPU in a single operation. The lower, or character, byte is the actual code point for the current character set, and the higher, or attribute, byte is a bit field used to select various video attributes such as color, blinking, character set, and so forth.[6] This byte-pair scheme is among the features that the VGA inherited from the EGA, CGA, and ultimately from the MDA.

Colors are assigned in the same way as in 4-bit indexed color graphic modes (see VGA color palette). VGA modes have no need for the MDA's reverse and bright attributes because foreground and background colors can be set explicitly.

The VGA hardware has the ability to enable an underline on any character that has attribute bit 0 set. However, since this is an MDA-compatible feature,[7] the attribute bits not used by the MDA must be set to zero or the underline will not be shown.[6] This means that only bits 3 (intensity) and 7 (blink) can be set concurrently with bit 0 (underline).[8] With the default VGA palette, setting bit 0 to enable underline will also change the text colour to blue. This means text in only two colors can be underlined (5555FF and 0000AA with the default palette).

Despite all this, the underline is not normally visible in color modes, as the location of the underline defaults to a scanline below the character glyph, rendering it invisible.[6] If the underline location is set to a visible scanline (as it is by default when switching to an MDA-compatible monochrome text mode), then the underline will appear.

Screen fonts used in EGA and VGA are monospace raster fonts containing 256 glyphs. All glyphs in a font are the same size, but this size can be changed. Typically, glyphs are 8 dots wide and 8–16 dots high, however the height can be any value up to a maximum of 32. Each row of a glyph is coded in an 8-bit byte, with high bits to the left of the glyph and low bits to the right. Along with several hardware-dependent fonts stored in the adapter's ROM, the text mode offers 8[6] loadable fonts. Two active font pointers (font A and font B) select two of the available fonts, although they usually point to the same font. When they each point to different fonts, attribute bit 3 (see above) acts as a font selection bit instead of as a foreground color bit. On real VGA hardware, this overrides the bit's use for color selection, but on many clones and emulators, the color selection remains — meaning one font is displayed as normal intensity, and the other as high-intensity. This error can be overcome by changing the palette registers to contain two copies of an 8-color palette.

© 2015-2021, Wikiwordbook.info
Copying information without reference to the source is prohibited!
contact us mobile version