When configured for CGA Mode 3, the display memory is organized similar to that for the MDA display, except that there are four 80 x 25 pages of text starting at the base address B8000h. The Display memory buffer size is 16 KB with pages beginning on 4-KB boundaries. The attribute byte is used for background (hi nibble) and foreground (lo nibble) color processing. Color (4 shades of grey) and Contrast Restore will be enabled as the default.
Non built-in applications expecting 16 color processing will need to run with Restore Contrast enabled. Built-in applications that use this mode expect only 4-shade processing and program the attribute bytes so that contrast restoration will not be needed. Bits 1 and 2 are used for foreground color, and bits 5 and 6 are used for background color. "Frame Rate Shading" is the technique used to render the shading. The 2-bit color value is used to determine the number of frames out of each 3 that each pixel is turned on. The shading value (0,1,2,3) controls the duty cycle (0%, 33%, 67%, 100%) with the higher values corresponding to darker pixels.
The attribute byte has the following bit definitions:.
The "I" and "B" bits are ignored. The "R" and "G" bits are the 2-bit color value with the "R" bit the most significant.