How MS-DOS 6.22 Print Screen Captures Work
In MS-DOS 6.22, pressing the Print Screen key does not save a file to disk or copy an image to a clipboard as modern operating systems do; instead, it initiates a physical data dump from the video display memory directly to a parallel printer. This process relies on a sequence of low-level hardware interrupts, the system BIOS, and optional DOS-level terminate-and-stay-resident (TSR) utilities to read video memory line by line and stream that data over standard printer ports.
The Hardware Interrupt Sequence
When the user presses the Print Screen key, the keyboard controller
generates hardware Interrupt Request 1 (IRQ 1). The central processing
unit suspends the current routine and invokes the BIOS keyboard handler
mapped to Interrupt 09h (INT 09h).
The INT 09h handler processes the keyboard scan code.
When it detects the specific scan code associated with the Print Screen
key, it checks a dedicated status byte located in the BIOS Data Area at
memory address 0050:0000h. This byte tracks the current
screen print state:
00h: Ready / inactive01h: Print operation in progressFFh: Error encountered during last operation
If the status is 01h, the system is already dumping
screen data, and the keystroke is discarded to prevent overlapping print
jobs. If the status is 00h or FFh, the handler
sets the flag to 01h and immediately triggers software
Interrupt 05h (INT 05h).
Default Text Mode Execution
By default, the ROM BIOS provides the baseline handler for
INT 05h. In standard MS-DOS text modes (such as 80x25
alphanumeric mode), this handler performs a direct memory dump:
- Locating Video RAM: The handler queries the BIOS
Data Area to determine the current display mode, number of columns
(typically 80), and number of rows (typically 25). It locates the video
buffer, mapped either to segment
B800hfor color displays (CGA/EGA/VGA) orB000hfor monochrome displays (MDA). - Parsing Characters: In text mode, video RAM stores display data in alternating bytes of character codes and color attributes. The BIOS loops through the buffer row by row, reading only the character byte and ignoring the attribute byte.
- Dispatching via INT 17h: Each character is
transmitted sequentially to the default parallel printer port (LPT1)
using BIOS Interrupt 17h (
INT 17h), function00h(Write Character to Printer). - Line Termination: At the end of each display row,
the handler transmits a Carriage Return (
0Dh) and a Line Feed (0Ah) sequence to advance the printer to the next line. - Completion: Once all rows have been pushed to the
printer, the handler sets the status byte at
0050:0000hback to00hand executes anIRET(Interrupt Return) instruction, returning control to the interrupted application.
Handling Graphics Modes via GRAPHICS.COM
The native ROM BIOS INT 05h handler cannot interpret
graphics modes. If a user presses Print Screen inside a graphical DOS
application without additional software running, the system will either
output garbage characters, send non-printable control codes, or ignore
the command entirely.
To capture graphics screens, MS-DOS 6.22 requires the
GRAPHICS.COM command to be loaded prior to running the
application. GRAPHICS.COM acts as a TSR driver:
- Interrupt Vector Hooking: Upon execution,
GRAPHICS.COMreplaces the defaultINT 05hvector in the interrupt table with its own memory address. - Reading Pixel Planes: When
INT 05his triggered while in graphics mode, the new TSR handler reads the display hardware directly, interpreting the active resolution and color depth (such as Mode 12h, which is 640x480 16-color VGA). - Raster Conversion: The utility translates the
screen's bitmapped pixels into dot-matrix or laser raster patterns
according to printer profiles defined in the
GRAPHICS.PROconfiguration file. - Printer Output: The translated raster escape codes
and binary bitmap data are then routed via
INT 17hto the printer, rendering the graphic image on paper.