What is the COM file format?
A .com file is a simple executable binary - one of the oldest program formats in personal computing, originating in Digital Research's CP/M operating system before being carried forward into MS-DOS. Unlike the .exe format, which supports multiple memory segments and relocation tables, a .com program is a raw flat binary with no file header: every byte is loaded directly into memory at offset 0x0100 within a single 64 KB real-mode segment and executed immediately. This architectural constraint means a .com file can never exceed roughly 64 KB in size.
Even while complemented by the more generalized .exe format, .com remained practical and widely used throughout the MS-DOS era for small utilities, command-line tools, and TSR programs. Under 32-bit Windows the NTVDM subsystem ran .com files transparently; NTVDM was removed from 64-bit Windows, so native execution on modern Windows requires an emulator such as DOSBox.
The .com extension has simply no connection with the .com top-level Internet domain name. This correspondence in naming has historically been exploited by malware authors who disguise executable .com files as links or text, making the format a well-documented social-engineering vector.
Security & safety
RISK: HIGHCOM files are executable code - historically the primary DOS malware carrier (boot sector viruses often dropped .com infectors). On modern 64-bit Windows they cannot run natively, which is a practical safety barrier, but on 32-bit systems or inside DOS emulators they execute without restriction. Never run a COM file received unexpectedly; scan with antivirus before launching in any emulator. Particular risk: web users confuse .com (domain) with .com (executable) and unknowingly download executable files thinking they are web pages.
Format details
in a nutshell- Windows Component Object Model registration stub - Rare; some very old Windows COM server self-registration utilities used .com extension.
- Network command script (Cisco IOS etc.) - Some embedded/network devices use .com for firmware or command scripts - unrelated to DOS.
Programs that open COM files
Technical details
deep spec| Encoding | Raw binary machine code (x86 real-mode) |
| Byte order | Little-endian (x86) |
| File header | None - flat binary with no header, no relocation table, no segment descriptors |
| File signature | None - identified by extension only; first bytes are typically a JMP opcode (0xEB or 0xE9) but not mandatory |
| Load address | Loaded at segment:0x0100; Program Segment Prefix (PSP) occupies bytes 0x0000-0x00FF of the segment |
| Memory model | CS = DS = ES = SS all point to the same 64 KB real-mode segment - no segment separation |
| Maximum file size | ~65,280 bytes (one 64 KB segment minus 256-byte PSP and minimum stack allocation) |
| MIME type | application/x-msdos-program |
| 64-bit Windows support | Not supported natively - NTVDM (16-bit subsystem) removed from 64-bit Windows; use DOSBox or DOSBox-X |
| CP/M heritage | Format originated with Digital Research CP/M (1974) and was adopted unchanged for MS-DOS 1.0 (1981) |
| Superseded by | .exe for programs exceeding 64 KB; .cmd / .bat for Windows console scripts |
| Security note | Historically a major malware vector - trivially executable and easily modified without breaking structure; commonly disguised as domain-style filenames |
| Operating systems | MS-DOS, PC DOS, FreeDOS, Windows 32-bit (via NTVDM), CP/M; DOSBox/DOSBox-X for modern use |
| Released | 1974 (CP/M); MS-DOS 1.0, 1981 |
| Latest version | No versioning - raw binary format unchanged |
COM conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about COM files.