VGA Text

The PC text screen is 80 characters across by 25 down, drawn from the 8×16 code page 437 character set. Each cell is a character byte and an attribute byte, so every cell carries its own ink and paper.

VGA Text

The screen

The default text mode is 80×25 cells of 8×16 pixels. Video memory holds two bytes per cell, a character byte and an attribute byte, in a run across the screen.

DetailValue
Screen80 × 25 characters
Cell8 × 16 pixels
Attribute modelPer cell

Attributes

The attribute byte holds four bits of ink and four of paper, though the top paper bit is often the blink flag, leaving eight paper colours. So each cell names its own ink from sixteen colours and paper from eight. The attribute takes no cell of its own; it is the second byte of the cell.

AttributeBitsEffect
Ink0–3The character colour, sixteen choices.
Paper4–6The background colour, eight choices.
Blink7Blinks the character, or a ninth to sixteenth paper colour when blink is off.

Colours

Text uses the sixteen CGA colours, held as Sprites.Platform.VGA.Text.Palette, eight normal then eight bright. Ink and paper each name one by index. The default screen is light grey on black.

In the editor

The VGA text editor opens an 80×25 screen on light grey ink and black paper. The details come from Sprites.Platform.VGA.Text: DefaultWidth 80, DefaultHeight 25, WholeCell false. Bright and blink are special attributes, kept for a later pass. See the text media page and Text storage.