The .COM file extension predates the web and has nothing to do with .com domains
In short: Most people link the .com ending to websites, but the COM file is much older: a stripped-down program format from early microcomputers. Its simplicity was a strength, and it also created a loophole that attackers still exploit today. The story reveals how file formats, operating systems and naming habits shape what is safe to click.
A COM file is a simple executable format. The extension first appeared on Digital Equipment Corporation VAX systems in the 1970s, where .COM marked text files holding commands for the operating system, much like a batch file. Digital Research's CP/M changed the meaning, so that COM files became programs that run directly. The convention then passed to DOS, where it survived alongside the more general EXE format. The format is almost bare. A COM file has no header in most cases and carries no standard metadata, only code and data.
Its binary was limited to 65,280 bytes and had to fit in one memory segment. Loading began at offset 0100h because the bytes before that were reserved for the DOS program segment prefix. This design copied the memory layout of the 8080-based CP/M world, which eased porting programs from one system to the other, although the two formats are not interchangeable because they contain different processor instructions. The limits explain why COM files gave way.
The 8086 processor could address many memory segments, but a COM file was never meant to span them, so Microsoft introduced EXE for larger programs. COM files kept their appeal because they were smaller and easier to build with an assembler. Once compilers and linkers became powerful enough, the compact format lost its advantage for complex software. Some files named .COM are in fact EXE-format programs, so the extension alone does not tell you what a file contains. The same naming logic created a security problem. In DOS, when a directory held both foo.com and foo.exe, the COM file ran first, and malware writers used names such as notepad.com to hijack commands. Later, attackers sent attachments named like web addresses, so that a user expecting a website instead ran a program. The format itself is not malicious. The risk comes from the collision between an old file type and the familiar .com domain, a reminder that a filename is only a label.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: COM file
To cite this card, link to https://intellectplus.co.uk/app/technology-com-file.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Computing and information technology · More in Technology · Latest · A–Z · All topics