B800 Text

From ModdingWiki
Jump to: navigation, search
B800 Text
B800 Text.png
Format typeImage
HardwareCGA, EGA, VGA
Colour depth4-bit
Minimum size (pixels)80×25 cells
Maximum size (pixels)80×25 cells
Plane count2
Transparent pixels?No
Hitmap pixels?No

B800 Text is a text-mode screen dump, and under x86 real mode (such as used by DOS) can be copied byte for byte into video memory starting at B800:0000, causing the data to appear on the screen when the video card is in text mode. It is most often used to display the final text screen after quitting a game, with the DOS prompt appearing on the last line once the game has terminated.

File format

Full CGA 16-color palette
0 — black
8 — (dark) gray
1 — blue
9 — bright blue
2 — green
10 — bright green
3 — cyan
11 — bright cyan
4 — red
12 — bright red
5 — magenta
13 — bright magenta
6 — brown
14 — yellow
7 — white (light gray)
15 — bright white

Since the file format is just a direct dump of video memory, this would more accurately be termed the "CGA text mode format." The file is almost always 4000 bytes long, as this is the exact amount of space required to store a standard 80x25 text screen (80 columns * 25 rows * two bytes per cell == 4000 bytes.)

The data is arranged in cells, with each cell being two bytes long (one byte for the ASCII character to display, followed by an attribute byte indicating the colour of the character.) The data appears starting at the top-left of the screen (1,1) and works its way across to the right (80,1) and then wraps down to the next line (1,2).

The attribute byte contains two nybbles of data. The most significant four bits are the background colour, and the least significant bits are the foreground colour. This means the background and foreground colours can each be assigned a colour value between zero (black) and 15 (white) - see the table on the right for the full list of colours.

The background colour is slightly different however. By default, the intensity bit is used to cause the text to flash instead. This means setting the background colour to 14 won't produce a bright-yellow background, but instead will produce a normal yellow background (colour #6) with blinking text. The CGA standard includes a toggle bit that allows this flashing to be switched off, thus allowing the full 16 background colours to be used (without any flashing of course.)


As a demonstration, these bytes:

48 1E  65 2E  6C 3E  6C 4E  6F 5E        H.e.l.l.o.

Would appear like this:



The following tools are known to work with this format:

  • TheDraw - DOS-based text animation/screen editor, which does support B800 text and many other DOS formats. TheDraw also runs under DOSBox.
  • TextPaint - DOS-based text screen editor, which unfortunately doesn't support B800 text but is still very powerful, and useful enough to warrant a mention.
  • Shmansi - Another DOS-based text screen editor, which can import and export B800 text.
  • ENDOOMER- Yet another DOS-based text screen editor, which can import and export B800 text, and can be used with the mouse as well.

See also