MS-DOS 6.22 GRAFTABL Extended Character Graphics
This article provides an overview of how the MS-DOS 6.22
GRAFTABL command enables systems to display extended ASCII
characters in graphics modes. It covers the technical limitations of
early PC display adapters, the role of BIOS interrupt vectors, and the
memory-resident mechanism GRAFTABL uses to supply character
glyphs for international code pages.
The Graphic Mode Character Limitation
In the standard IBM PC architecture, the ROM BIOS contained 8x8 pixel bitmap font definitions only for the first 128 ASCII characters (values 0 through 127). When using text modes, the video hardware's character generator ROM supplied both standard and extended character shapes. However, when switching to graphics modes—particularly on Color Graphics Adapter (CGA) hardware—the system had to draw characters pixel-by-pixel onto the screen buffer.
Because ROM space was limited on original CGA systems, the BIOS only maintained bitmap tables for standard ASCII characters. If an application attempted to print extended characters (ASCII values 128 through 255)—such as accented vowels, currency symbols, and box-drawing elements—the video BIOS had no graphical definitions to draw, resulting in blank spaces or garbled output.
The Interrupt 1Fh Mechanism
The PC BIOS was designed with an extensible hook specifically for
this limitation: Interrupt 1Fh (vector address
0000:007Ch).
When software calls BIOS video services (Interrupt 10h) to draw a character with an ASCII value between 128 and 255 in a graphics mode, the BIOS does not execute code at Interrupt 1Fh. Instead, it reads the 4-byte pointer stored in the Interrupt 1Fh vector. This pointer is expected to direct the video routines to a table in memory containing 128 distinct 8x8 pixel font patterns, requiring 1,024 bytes of data (8 bytes per character). By default, this vector is either uninitialized or points to null data.
How GRAFTABL Solves the Problem
The GRAFTABL command acts as a
Terminate-and-Stay-Resident (TSR) utility that populates this missing
data. When executed, GRAFTABL performs the following
operations:
- Loads Font Patterns into RAM: It reads the requested 8x8 pixel patterns for ASCII characters 128 through 255 from disk into conventional memory.
- Updates the Vector: It updates the Interrupt 1Fh vector to point directly to the newly allocated font table in RAM.
- Remains Resident: It terminates while keeping the font data resident in memory, ensuring that subsequent graphics-mode software can reference the table.
Once GRAFTABL is resident, any call to BIOS Interrupt
10h to print a character in the 128–255 range successfully retrieves the
corresponding 8-byte bitmap from the address pointed to by Interrupt 1Fh
and renders the shape correctly.
Code Page Support
In MS-DOS 6.22, GRAFTABL supports international
character sets through code page parameters. Users can specify a
particular code page at the command line, such as:
GRAFTABL 437
GRAFTABL 850
Specifying a code page loads the corresponding language-specific glyph set into memory. Code page 437 provides the original United States character set (including box-drawing lines and Greek mathematical symbols), while code page 850 provides the Multilingual (Latin I) set, replacing several graphic symbols with accented characters used across Western Europe.
Legacy Context in MS-DOS 6.22
By the release of MS-DOS 6.22, modern adapters like EGA and VGA had
largely replaced CGA. EGA and VGA cards contained their own enhanced
BIOS routines and dedicated font load registers capable of handling
extended characters natively without GRAFTABL. MS-DOS 6.22
retained GRAFTABL primarily for backward compatibility with
legacy CGA hardware, older software environments, and specific graphics
modes that still relied on the BIOS Interrupt 1Fh font table
pointer.