VGA text mode
VGA text mode is an alphanumeric display capability of the Video Graphics Array (VGA), a video display controller and graphics standard introduced by IBM in 1987 with the PS/2 line of computers.[1] It enables the rendering of text characters on screen using a grid-based layout, where each character position stores a character code (typically ASCII) and an attribute byte for properties such as foreground and background colors, intensity, underline, and blinking, mapped to a 16-color palette.[2] These modes operate within VGA's 256 KB of video memory, organized in the B8000h segment for the text buffer, with two bytes per character cell, supporting common resolutions of 720x400 pixels for 80x25 text.[2] The primary VGA text modes include 40-column by 25-row and 80-column by 25-row configurations, with vertical resolutions of 200, 350, or 400 scan lines depending on the mode and double-scanning options for compatibility with lower-resolution displays.[2] Mode 3, the standard 80x25 color text mode, uses 4000 bytes per page and supports a 70 Hz refresh rate with 31.5 kHz horizontal scan rate, making it the default for early PC boot screens and console applications.[2] Character rendering draws from ROM-based fonts—such as 8x8, 8x14, or 8x16 pixel matrices—or loadable RAM fonts accommodating up to 512 characters via dual font sets, allowing for international and graphical symbols.[2] Key features include a programmable hardware cursor with adjustable start and end scan lines for shape and position, smooth scrolling via CRT controller registers for vertical and horizontal panning, and split-screen effects using line compare functionality.[2] Color attributes expand 1-bit-per-pixel character bitmaps to 4-bit color planes, supporting monochrome modes with gray shades as well as full 16-color text with programmable palettes.[2] An extended 132-column by 25-row mode was later defined for higher-density text, requiring higher clock frequencies and wider horizontal totals, though it remained less common outside specialized applications.[2] VGA text modes were foundational for PC user interfaces, influencing BIOS setups, DOS prompts, and early software until superseded by graphical environments, yet they persist in emulators and legacy systems for their efficiency in text-only output.[3]Introduction
Definition and features
VGA text mode is a character-based display mode within the Video Graphics Array (VGA) standard, rendering the screen as a grid of fixed-size character cells rather than individual pixels. Each cell consists of a character code paired with an attribute byte, enabling the hardware to generate text output efficiently on CRT displays. This mode supports standard resolutions such as 80 columns by 25 rows, providing a total of 2000 character cells per screen page.[2][4] Key features include a programmable 16-color palette for foreground and background colors per character, drawn from a 256-entry color lookup table with 18-bit RGB depth. Blinking text is achieved through a dedicated bit in the attribute byte, which toggles between two color sets at a rate of approximately 1/4 second in standard configurations. Cursor shapes are customizable, ranging from a single underline scan line to a full block, with up to 32 scan lines in height and options for pixel replacement or XOR blending. Fonts consist of 256 loadable glyphs, each up to 32 scan lines high and 9 pixels wide, allowing for selectable character sets stored in video memory.[2][4] The primary purpose of VGA text mode is to facilitate efficient text-only output for command-line interfaces, bootloaders, and early text user interfaces (TUIs), offering a lightweight alternative to pixel-based graphics modes by leveraging hardware acceleration for character rendering. In operation, the display hardware sequentially scans character codes and attributes to retrieve corresponding glyphs from font storage, combining them with color data to produce the visible output on screen.[2][4]Historical context
The Video Graphics Array (VGA) text mode originated as part of IBM's VGA standard, introduced on April 2, 1987, with the launch of the Personal System/2 (PS/2) line of computers, including models 50, 60, and 80. This represented an evolution from earlier IBM display standards, building directly on the Monochrome Display Adapter (MDA) of 1981, which provided high-resolution monochrome text output; the Color Graphics Adapter (CGA) of 1981, introducing color text and basic graphics; and the Enhanced Graphics Adapter (EGA) of 1984, which enhanced resolution and color depth. VGA text mode improved upon these by supporting a programmable 16-color palette for characters and backgrounds in a 80x25 or 40x25 grid, while maintaining compatibility with the text-oriented designs of its predecessors.[5][6][7] IBM positioned VGA as an open standard to standardize PC graphics, integrating it directly into PS/2 motherboards rather than as a separate card, which facilitated widespread cloning by third-party manufacturers like Cirrus Logic and S3. This approach made VGA the de facto graphics standard for IBM-compatible PCs, ensuring backward compatibility with MDA, CGA, and EGA text modes through emulated operations, allowing older software to run without modification. The standard's openness contrasted with IBM's prior proprietary efforts, enabling rapid industry adoption and solidifying VGA's role in the evolving PC ecosystem.[5][7] VGA text mode dominated the DOS era throughout the late 1980s and 1990s, serving as the primary display mechanism for operating system boot screens, text-based applications, and early games on PCs, due to its efficiency and hardware integration. Its influence extended through the Video Electronics Standards Association (VESA) extensions in the 1990s, which built upon VGA to support higher resolutions and modes while preserving core text functionality for compatibility. Key milestones include the 1987 PS/2 release, which shipped over 1 million units in its first year and popularized VGA; the 1989 VESA standard for Super VGA programming; and 1994's VESA 2.0, adding advanced features like linear framebuffer access. VGA text mode's legacy persists into the 2020s in embedded systems, such as FPGA implementations for text displays, and in emulators like QEMU, where it enables retro software execution on modern architectures including ARM and RISC-V.[6][7][8]Data Arrangement
Text buffer organization
In VGA text mode, the text buffer is located at physical memory address 0xB8000 within the VGA's 64 KB video RAM, corresponding to segment B800h in real mode addressing.[2] For monochrome emulation, the buffer resides at 0xB0000 instead.[2] This 32 KB region supports the display of alphanumeric characters and their attributes, with the active text buffer occupying a portion based on the selected resolution.[2] The buffer's structure consists of sequential 16-bit words, where each character cell requires 2 bytes: the first byte stores the ASCII code point (ranging from 0 to 255), and the second byte holds the attribute information.[2] In the standard 80×25 text mode, this arrangement yields 2000 character cells, consuming 4000 bytes total (80 columns × 25 rows × 2 bytes per cell).[2] The data is laid out row-by-row, starting from the top-left corner of the screen; for example, the first row occupies bytes 0–159, the second row bytes 160–319, and so on, enabling straightforward linear access to screen positions.[2] Although VGA video RAM is organized into four bit planes for graphics modes (with planes 0 and 1 typically used for pixel data), text modes employ a unified access model through the attribute controller, where character codes are derived from plane 0 and attributes from plane 1, while plane 2 supports font data storage separately from the text buffer itself.[2] This plane-based organization ensures efficient rendering without multi-plane interleaving in the buffer memory. Scrolling in the text buffer is primarily handled by hardware through the Cathode Ray Tube Controller (CRTC) registers, such as the Start Address High (index 0Ch) and Low (index 0Dh) registers, which adjust the display start address to shift the visible portion of the buffer.[2] The Offset register (index 13h) further defines the line width in doublewords, facilitating vertical scrolling.[2] For multi-page displays or software-driven paging, the buffer contents can be manipulated by copying blocks of memory to wrap around or clear sections, though hardware synchronization with vertical retrace (via Input Status Register 1) prevents visual artifacts during such operations.[2]Character attributes
In VGA text mode, each character cell in the video memory buffer is associated with an 8-bit attribute byte that determines its visual properties, including colors and special effects. The structure of this byte is as follows: bits 0–3 encode the foreground color as an index from 0 to 15, selecting the color for the character's glyph; bits 4–6 encode the background color as an index from 0 to 7, filling the remainder of the cell; and bit 7 serves as the blink flag (set to 1 to enable blinking for that character) or, when global blinking is disabled, as a background intensity bit to extend the background palette to indices 8–15. This bit-level encoding allows per-character customization without altering the underlying character code.[2][9] The color system relies on a 16-entry palette, where each index corresponds to a specific color defined by 6-bit RGB values (18-bit total color depth), though these values are programmable via the Digital-to-Analog Converter (DAC) registers for custom hues. Indices 0–7 represent standard low-intensity colors, while 8–15 denote their high-intensity counterparts, providing visual emphasis through brightness rather than a separate attribute bit. The standard default palette, as defined in VGA hardware, maps as shown in the table below:| Index | Color | RGB (approximate) |
|---|---|---|
| 0 | Black | 000000 |
| 1 | Blue | 0000AA |
| 2 | Green | 00AA00 |
| 3 | Cyan | 00AAAA |
| 4 | Red | AA0000 |
| 5 | Magenta | AA00AA |
| 6 | Brown | AA5500 |
| 7 | Light Gray | AAAAAA |
| 8 | Dark Gray | 555555 |
| 9 | Light Blue | 5555FF |
| 10 | Light Green | 55FF55 |
| 11 | Light Cyan | 55FFFF |
| 12 | Light Red | FF5555 |
| 13 | Light Magenta | FF55FF |
| 14 | Yellow | FFFF55 |
| 15 | Bright White | FFFFFF |
Fonts and glyphs
In VGA text mode, fonts consist of 256 glyphs corresponding to character code points 0 through 255, stored as fixed-width bitmaps in the video adapter's 8 KB alphanumeric character generator ROM or loaded into an 8 KB RAM buffer for customization.[10][11][7] Each glyph is an 8-pixel-wide bitmap, with height varying by mode up to 32 pixels, represented as one byte per row where bits encode foreground pixels (1) against background (0); for instance, an 8x16 glyph requires 16 bytes, yielding 4 KB total for all 256 glyphs in that size.[10][11] Fonts are loaded via BIOS interrupt 10h with AH=11h and subfunctions specified in AL, such as AL=00h to load user-defined bitmaps from memory pointed to by ES:BP (with CX indicating character count and DX the starting code), or AL=01h/04h to transfer predefined 8x14 or 8x16 ROM fonts into RAM. Direct hardware access allows writing to the font RAM at physical address 0xA0000 (video memory map 2), enabling runtime modifications without BIOS. Supported bitmap sizes include 8x8, 8x14, and 8x16 pixels, selected based on the active display mode.[12][13] During rendering, the VGA sequencer and character generator hardware process each text buffer cell by indexing the glyph bitmap in ROM or RAM using the 8-bit character code from the buffer. The retrieved bitmap rows are then rasterized scanline-by-scanline, modulated by the cell's attribute byte to apply foreground/background colors from the 16-color palette, producing the final monochrome or colored character image on screen.[13][10] For international support, code page selection loads alternate glyph sets into the font RAM via extended BIOS calls (e.g., INT 10h AH=11h with user data), enabling diverse scripts like Latin, Cyrillic, or Greek. VGA hardware supports up to 512 total characters across two character maps (fonts A and B). These can be selected for code ranges 0-127 and 128-255 via the Attribute Controller's Character Map Select register (index 03h). Alternatively, when the CRT Mode Control register (index 17h, bit 0) is set, bit 3 of the attribute byte is redefined from foreground intensity to toggle between the two full 256-glyph sets dynamically per character, though this sacrifices intensity selection.[14][2]Cursor implementation
In VGA text mode, the cursor is a hardware overlay that indicates the current input position within the text buffer, appearing as a visible marker on the display. It supports two primary types: a full block cursor that spans the entire height of a character cell, or an underline cursor limited to a single scanline, typically at the bottom. The cursor's shape and visibility are programmable through the Cathode Ray Tube Controller (CRTC) registers, allowing dynamic adjustment without altering the underlying text buffer.[2] The cursor shape is controlled by CRTC registers 0x0A (Cursor Start) and 0x0B (Cursor End), which define the range of scanlines within a character cell where the cursor appears. Register 0x0A specifies the starting scanline (bits 0-4, range 0-31) and includes a disable bit (bit 5 set to 1 to turn off the cursor), while register 0x0B sets the ending scanline (bits 0-4, range 0-31) and provides skew control for horizontal alignment (bits 5-6, 0-3 character clock delays). For an 8x16 pixel font (16 scanlines per character), a block cursor covers all lines by setting start to 0 and end to 15, whereas an underline cursor uses start=14 and end=15 to highlight only the bottom line. If the start value exceeds the end value, the cursor is hidden, providing a method to suppress visibility without changing its position.[2][15] The cursor position is tracked as a 16-bit address corresponding to a location in the text buffer, calculated as (row × columns + column) shifted left by 1 to account for the two-byte character-attribute pair per cell. This address is loaded into CRTC registers 0x0E (high byte) and 0x0F (low byte), representing the byte offset from the display memory start address (typically B8000h in VGA). Updates to these registers directly reposition the cursor on the screen, with the hardware automatically handling the overlay on the character at that location. Moving the cursor off-screen (e.g., beyond the visible buffer) also hides it.[2] The cursor blinks under hardware control at a rate of 1/32 of the vertical field rate, resulting in approximately 1.875 cycles per second at a standard 60 Hz refresh (50% on/off duty cycle). This blinking is enabled via the Attribute Controller's Mode Control register (index 0x10, bit 3) and operates independently of text attribute blinking, though both can be disabled or reconfigured in extended modes. The fixed rate ensures consistent behavior across compatible hardware without software intervention for timing.[2]Access Methods
BIOS interface
The BIOS interface for VGA text mode is provided through Interrupt 10h (INT 10h), a standard entry point for video services in IBM PC-compatible systems, allowing software to interact with the display without direct hardware manipulation. This interrupt handler, part of the system BIOS ROM, supports a range of subfunctions specified in the AH register, enabling operations such as cursor control, text scrolling, character I/O, mode selection, and font management specifically tailored for text modes like the 80x25 color text mode (mode 03h). These services ensure portability across compatible hardware by abstracting low-level details, though they incur overhead due to the interrupt mechanism and BIOS execution.[16] Key subfunctions for text mode operations include cursor positioning and querying. For instance, AH=02h sets the cursor position by specifying the page in BH (typically 0 for single-page modes), row in DH (0-24 for 25 rows), and column in DL (0-79 for 80 columns), updating the cursor registers without altering the text buffer contents. Complementarily, AH=03h retrieves the current cursor position and shape, returning the row and column in DH/DL, page in BH, and cursor scanline bounds in CH/CL (start and end lines, e.g., 0x00 to 0x0F for a full block cursor). Scrolling functions AH=06h (up) and AH=07h (down) adjust the text window defined by upper-left (CH/CL) and lower-right (DH/DL) coordinates, with AL indicating lines to scroll (or 0 to clear with attribute in BH); these operations shift buffer contents and fill cleared areas with the specified attribute for visual consistency. Reading and writing characters with attributes are handled by AH=08h, which returns the character in AL and attribute in AH at the cursor position on the given page (BH), and AH=09h, which writes CX instances of character AL with attribute BL to the current position on page BH, advancing the cursor accordingly. For simple output, AH=0Eh performs teletype-style writing of character AL to the active page (BH), with color in BL for color modes, automatically handling control codes like carriage return, line feed, backspace, and bell for console emulation.[16] Video mode setting is achieved via AH=00h, where AL specifies the mode value—such as 03h for 80x25 color text with a 16-color palette and character attributes—to initialize the display, clear the screen, and configure hardware registers for text rendering. Font loading, essential for customizing glyphs in text modes, uses AH=11h with subfunctions in AL to load character definitions into video memory: AL=00h or 10h for user-defined 8-scanline fonts (block 0), AL=11h for 14-scanline monochrome ROM fonts (block 1), AL=12h for 8-scanline double-dot ROM fonts (block 0 alternate), and AL=14h for 16-scanline ROM sets (block 2), with ES:BP pointing to font data, CX as bytes per character, and BH/DX for block and offset selection; these support up to 32 scanlines in extended configurations by loading into one of eight font blocks selectable via sequencer registers.[16][4] While convenient for compatibility, the BIOS interface is slower than direct memory or port access due to interrupt overhead and BIOS code execution, limiting its use in performance-critical applications like games or real-time displays. In modern systems, INT 10h services are often emulated by UEFI firmware's Compatibility Support Module (CSM) to maintain backward compatibility with legacy software, though native UEFI graphics protocols have largely supplanted it.[17][18]Direct hardware access
Direct hardware access to VGA text mode involves interacting with the video hardware through I/O ports and direct memory writes, bypassing higher-level interfaces for greater control and performance. This method targets the VGA's controllers, such as the Cathode Ray Tube Controller (CRTC) and Sequencer, using index/data register pairs to configure display parameters and manipulate the text buffer.[9][19] VGA hardware communicates via dedicated I/O port ranges: 0x3B0–0x3BF for monochrome adapters and 0x3C0–0x3DF for color systems. Key controllers include the CRTC, accessed through ports 0x3D4 (index) and 0x3D5 (data) on color systems, which handles cursor positioning and screen timing; the Sequencer, using 0x3C4 (index) and 0x3C5 (data), which manages memory organization; and the Attribute Controller at 0x3C0 for color and attribute settings.[9][20][19] To read or write a register, software first outputs the index to the address port, then the value to the data port; for example, enabling odd/even memory interleaving for text mode requires setting Sequencer index 0x04 to data 0x03. Palette adjustments, useful for custom text colors, occur via ports 0x3C8 (index) and 0x3C9 (data) for red, green, and blue components.[9][21] The text buffer resides in video RAM at physical address 0xB8000 for color modes (or 0xB0000 for monochrome), organized as 80x25 character cells where each cell spans two bytes: the first for the ASCII character code and the second for attributes like foreground/background color and blinking. Direct writes, or "pokes," to this memory update the display immediately; a simple loop in assembly might iterate over the buffer, writing character-attribute pairs (e.g., 0x0720 for a space with white-on-black attributes) to render text output. For cursor control, the CRTC registers at indices 0x0E (high byte) and 0x0F (low byte) store the cursor's memory address: output the index to 0x3D4, followed by the high byte to 0x3D5, then repeat for the low byte.[9][19][20] This approach excels in performance-critical applications, such as real-time text user interfaces (TUIs), by avoiding BIOS overhead and enabling rapid updates without context switches. In multitasking operating systems, port access requires locking mechanisms to prevent concurrent hardware conflicts, often implemented via atomic operations or semaphores.[21][9]Display Modes
Standard VGA modes
The standard VGA text modes, as defined in the IBM Video Graphics Array (VGA) specification, consist of four primary alphanumeric display configurations accessible via BIOS interrupt 10h with AH=00h and AL set to the desired mode number.[2] These modes provide backward compatibility with earlier adapters like the Color Graphics Adapter (CGA) and Enhanced Graphics Adapter (EGA), supporting text-based output in either color or monochrome formats.[2] They operate using a character-based display with 25 rows and either 40 or 80 columns, utilizing fonts of 8×8, 8×14, or 9×16 pixels to achieve effective pixel resolutions such as 320×200, 640×200, 720×400, or variants like 360×400 in double-scanned configurations.[2][22]| BIOS Mode | Columns × Rows | Type | Base Memory | Typical Pixel Resolution (with 9×16 font) |
|---|---|---|---|---|
| 00h | 40 × 25 | Color (16 colors) | B8000h | 360 × 400 |
| 01h | 40 × 25 | Monochrome | B0000h | 360 × 400 |
| 02h | 80 × 25 | Color (16 colors) | B8000h | 720 × 400 |
| 03h | 80 × 25 | Color (16 colors) | B8000h | 720 × 400 |
Timing and video signal
The timing parameters of VGA text mode are defined by the Cathode Ray Tube Controller (CRTC) registers and the selected pixel clock, generating the horizontal and vertical synchronization signals necessary for display. In the standard 80×25 text mode, the pixel clock operates at 28.322 MHz, producing a horizontal frequency of approximately 31.5 kHz and a vertical refresh rate of 70 Hz. These values ensure compatibility with VGA monitors, where the visible display area consists of 720 horizontal pixels (80 characters × 9 pixels per character, including inter-character spacing) and 400 vertical scanlines (25 characters × 16 scanlines per character).[2][23] Horizontal timing encompasses 900 total pixels per line, with 720 pixels dedicated to the visible character area and 180 pixels for blanking intervals. The sync pulse spans 108 pixels, preceded by a front porch of 18 pixels and followed by a back porch of 54 pixels during the horizontal blanking period. These parameters are configured through CRTC registers 0x00 to 0x05, typically set to values such as 0x63 (horizontal total of 100 character clocks), 0x4F (display end at 80 characters), 0x57 (blanking start at 88 characters), 0x03 bits adjusted for blanking end, 0x5F (retrace start at 96 character clocks), and 0x03 bits for retrace end, where each character clock corresponds to 9 pixel clocks in 9-dot mode enabled by the sequencer. The horizontal frequency is calculated as the pixel clock divided by the total pixels per line: f_h = \frac{28.322 \times 10^6}{900} \approx 31.5 kHz.[2][24] Vertical timing includes 449 total scanlines per frame, comprising 400 visible scanlines and 49 for blanking. The vertical sync pulse lasts 2 scanlines, with a front porch of 10 scanlines and a back porch of 37 scanlines. These are programmed via CRTC registers 0x06 to 0x11, with representative values including 0xC0 (vertical total low byte, high bits in 0x07 for 449 total), 0x07 overflow bits set accordingly, 0x9C (retrace start at 412 adjusted), and 0x02 for retrace end (2 lines wide), alongside 0x12 for display end at 400 and 0x15/0x16 for blanking start/end. The vertical refresh rate derives from the horizontal frequency divided by total scanlines: f_v = \frac{31.5 \times 10^3}{449} \approx 70 Hz.[2][24] The video signal outputs consist of analog RGB components at 0.7 V peak-to-peak levels, driven by the RAMDAC, with separate horizontal and vertical sync signals at TTL levels (0–5 V). The character clock is derived by dividing the pixel clock by 9 in text mode, yielding approximately 3.14 MHz to scan out each 9-pixel-wide character cell. Composite sync is not natively generated; instead, HSync and VSync are provided on dedicated pins of the 15-pin D-sub connector for monitor synchronization.[2]Extended text modes
Extended text modes in VGA represent enhancements developed after the original IBM VGA specification, primarily through standards like the VESA BIOS Extensions (VBE) and manufacturer-specific extensions for Super VGA (SVGA) hardware. These modes increase the number of visible text characters by adjusting character cell sizes, scan lines, and horizontal resolutions while maintaining compatibility with the VGA text buffer format. VBE 1.2 and later versions standardized several high-resolution text modes to support applications requiring more on-screen information, such as spreadsheets and text editors in DOS environments.[25] VESA standards from version 1.2 onward define extended text modes with up to 132 columns and 60 rows, accessible via specific mode numbers in the 0x100 to 0x11F range. For instance, mode 0x109h enables 132x25 text, 0x10Ah provides 132x43, 0x10Bh offers 132x50, and 0x10Ch supports 132x60, all using 8-pixel-wide characters and adjustable heights for denser displays. These modes leverage either linear frame buffer access (if supported, indicated by bit 14 in the mode attributes) for direct memory mapping or banked access through CPU-addressable windows for older hardware constraints. VBE 2.0 further refined this by deprecating fixed mode numbers in favor of dynamic querying but retained support for these resolutions via the ModeInfoBlock structure returned by function 01h.[25][26] SVGATextMode, an extension popularized through utilities like those integrated with UniVBE for SVGA cards from manufacturers such as Tseng Labs, allows reprogramming of the CRTC (Cathode Ray Tube Controller) to achieve non-standard text resolutions without full VBE compliance. This enables modes like 80x43, 80x50, and 132x25 by increasing scan lines (e.g., from 400 to 480 or 900) and adjusting horizontal timings, often using 8x8 or 8x9 character fonts for finer granularity. Such extensions were particularly useful on early SVGA chipsets like the Tseng ET4000, providing higher line counts for console applications while preserving the 16-color attribute system inherent to VGA text rendering.[27] Implementation of these modes typically requires the VESA BIOS Extension via interrupt 10h with AX=4F02h to set the desired mode number, followed by optional font loading (e.g., via INT 10h AH=11h) to scale glyphs for higher densities, such as 8x8 pixels per character in 43- or 50-line modes. Despite the increased resolution, compatibility with the VGA's 16-color limit persists, as attributes remain encoded in a single byte per character (4 bits foreground, 4 bits background), restricting palettes to the default EGA/VGA set unless hardware supports expanded DAC (Digital-to-Analog Converter) remapping. These modes often demand careful synchronization with monitor timings to avoid artifacts, and software must query mode attributes via VBE function 01h to confirm support.[26] Representative examples include the 100x37 text mode on Cirrus Logic chips like the CL-GD542X, which operates at 800x600 resolution with 16 or 256 colors and refresh rates up to 72 Hz, using modes such as 58h, 6Ah, or 5Ch. This mode was commonly utilized in DOS extenders for protected-mode applications and early Windows environments to display more content in productivity software like WordPerfect or Lotus 1-2-3, enhancing usability without switching to graphics modes.[28]Limitations and Legacy
Technical restrictions
VGA text mode is constrained by a fixed 16-color palette for both foreground and background, with each color defined by 6 bits per RGB component in the DAC, limiting visual expressiveness and precluding support for alpha blending, gradients, or higher color depths.[24] These colors are selected via 4-bit indices in the attribute byte, allowing only 16 simultaneous choices without palette reprogramming.[29] The character set is restricted to a maximum of 512 glyphs, comprising two 256-glyph banks loaded into the character generator RAM, with selection toggled by bit 3 of the foreground intensity in the attribute byte; the base 256 glyphs typically follow Code Page 437, which extends ASCII but provides no native Unicode support, confining output to various legacy code pages, primarily supporting Latin-based scripts such as Code Page 437 and its regional variants.[30][31] The standard display resolution is 80 columns by 25 rows of characters, corresponding to a 720×400 pixel scanout (9 pixels wide by 16 pixels high per character cell), with no subpixel rendering or variable aspect ratios due to the fixed monospace glyph design and hardware timing.[32] Performance is limited to basic hardware scanout from the video memory buffer, without dedicated acceleration for text rendering, scrolling, or attribute updates beyond simple attribute controller operations.[24] Video RAM totals 256 KB across four 64 KB planes, but CPU access in graphics modes is restricted to a 64 KB window at A0000h–AFFFFh, shared between text and graphics modes and often requiring bank switching; the text buffer is at B8000h.[33] The blinking attribute operates globally rather than per character: when enabled in the Attribute Mode Control Register, it affects all characters with bit 7 set in their attribute byte at a fixed rate of the vertical sync divided by 32, with no granular control over timing or selection.[29]Modern relevance
Despite the dominance of graphical user interfaces, VGA text mode retains niche relevance in legacy support within contemporary operating systems and bootloaders as of 2025. In Linux distributions, the frame buffer console (fbcon) provides compatibility for VGA text modes through device drivers that access video memory for character-based output during early boot phases or in minimal console environments. Similarly, the Windows command-line tools, including CMD and PowerShell, rely on the Win32 console API to render text in a manner compatible with VGA text characteristics, ensuring backward compatibility for legacy applications. Bootloaders like GRUB support VGA text modes in both BIOS and UEFI environments; for instance, GRUB'svga_text terminal output option and efitextmode command enable 80x25 text rendering on EFI platforms to display boot menus and error messages.[34][35]
Emulation plays a key role in preserving VGA text mode for development and retro computing. Virtual machines such as QEMU and VirtualBox include VGA hardware simulation, allowing developers to test operating systems by writing directly to emulated video memory at segment 0xB8000 for text display, which is essential for kernel debugging without physical hardware. In hardware recreation projects, field-programmable gate arrays (FPGAs) are employed to implement VGA text mode generators, enabling retro-style displays on modern boards for educational and hobbyist purposes, such as simulating 1980s-era PC consoles.[36][37]
Transitions to modern alternatives have diminished direct reliance on VGA text mode, with the UEFI Graphics Output Protocol (GOP) serving as its primary successor by providing framebuffer access for rendered text in graphical boot environments, supporting higher resolutions and eliminating the need for legacy text hardware. Text-based user interface (TUI) libraries like ncurses abstract console operations across platforms, including those mimicking VGA text attributes, to create portable applications without tying to specific video modes. In recent applications, VGA text mode appears in embedded systems via adapters on devices like the Raspberry Pi for simple output in bare-metal projects, and among hobbyist operating system developers who favor it for its straightforward implementation in early kernel stages. No significant extensions to VGA text mode have emerged in the 2020s, with its endurance confined to compatibility layers in emulators and boot firmware.[38][39]