B800 Text - ModdingWiki

submited by
Style Pass
2024-12-25 09:00:04

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.

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.

Leave a Comment