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.
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.
| Detail | Value |
|---|---|
| Screen | 80 × 25 characters |
| Cell | 8 × 16 pixels |
| Attribute model | Per 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.
| Attribute | Bits | Effect |
|---|---|---|
| Ink | 0–3 | The character colour, sixteen choices. |
| Paper | 4–6 | The background colour, eight choices. |
| Blink | 7 | Blinks 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.