Color Graphics Adapter - Standard Text Modes

Standard Text Modes

CGA offers four BIOS text modes (called alphanumeric modes in IBM's documentation):

  • 40×25 characters in up to 16 colors. Each character is a pattern of 8×8 dots. The effective screen resolution in this mode is 320×200 pixels (a pixel aspect ratio of 1:1.2), though individual pixels cannot be addressed independently. The choice of patterns for any location is thus limited to one of the 256 available characters, the patterns for which are stored in a ROM chip on the card itself. The display font in text mode (the code page 437 character set) is therefore fixed and cannot be changed (although when using the original IBM CGA, it is possible to select one of two different fonts—normal or thin—by changing a jumper. Many clones didn't offer this possibility). The card has sufficient video RAM for eight different text pages in this mode.

BIOS Modes 0 & 1 select 40 column text modes. The difference between these two modes can only be seen on a composite monitor; mode 0 disables the color burst, making colors appear in grayscale. Mode 1 enables the color burst, allowing for color. Mode 0 and Mode 1 are functionally identical on RGB monitors and on later adapters that emulate CGA without supporting composite color output.

  • 80×25 characters in up to 16 colors. Each character is again an 8×8 dot pattern (the same character set is used as for 40×25), in a pixel aspect ratio of 1:2.4. The effective screen resolution of this mode is 640×200 pixels. Again, the pixels cannot be individually addressed. Since there are twice as many characters on the screen in this mode, the card has enough video RAM for just four different text pages.

BIOS Modes 2 & 3 select 80 column text modes. As with the 40-column text modes, Mode 2 disables the color burst in the composite signal and Mode 3 enables it.

In every text mode, each character has a background and a foreground color—e.g. red on yellow text for one character, white on black for the next, etc. While the same 4-bit nybble used for the foreground color would normally allow all 16 colors to be used for the background color, the most significant bit of the background nybble is alternatively used to denote whether or not the character should blink (a hardware effect offered by CGA independent of the CPU). The blinking attribute effect is enabled by default and the high-intensity background effect is disabled; disabling blinking is the only way to freely choose the latter eight-color indexes (8-15) for the background color.

Notably, the GW-BASIC and, later, Microsoft QBASIC (a lesser derivative of Microsoft QuickBASIC) programming language interpreters included with MS-DOS (which was the de facto PC OS while the CGA was popular) supported all the text modes of the CGA with full color control, but did not provide a normal means through the BASIC language to switch the CGA from blink mode to 16-background-color mode, though it would be possible by directly programming the hardware registers using the OUT statement. In BASIC, foreground text color numbers 16-31 are the blinking versions of colors 0-15, respectively, but background colors 8-15 are identical to colors 0-7 respectively.

Read more about this topic:  Color Graphics Adapter

Famous quotes containing the words standard, text and/or modes:

    There is a certain standard of grace and beauty which consists in a certain relation between our nature, such as it is, weak or strong, and the thing which pleases us. Whatever is formed according to this standard pleases us, be it house, song, discourse, verse, prose, woman, birds, rivers, trees, room, dress, and so on. Whatever is not made according to this standard displeases those who have good taste.
    Blaise Pascal (1623–1662)

    I would define the poetic effect as the capacity that a text displays for continuing to generate different readings, without ever being completely consumed.
    Umberto Eco (b. 1932)

    In the final analysis, “style” is art. And art is nothing more or less than various modes of stylized, dehumanized representation.
    Susan Sontag (b. 1933)