Link to home
Start Free TrialLog in
Avatar of jameen
jameen

asked on

Expansion

Why do exe files have signature "MZ" ?      What is the expansion for "MZ" ?
Avatar of Nanos
Nanos

Please explain more on what you mean.. what is this signature?
ASKER CERTIFIED SOLUTION
Avatar of MasseyM
MasseyM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As Massey said, they're the initials of the guy's name who worked on that matter at Microstuff (some centuries ago).

The main purpose of those letters "MZ" that appear as the two first bytes of every .EXE file, is to differentiate the .EXE from a .COM file.

Althoug both of them are binary files, and whose contents are intended to be executed directly by the machine (in fact, both of them contain binary instructions understood by the processor), they receive different treatment. A real .EXE file is slightly different from a .COM

If you RENAME a .COM file as if it were a .EXE, operating system ignores that fact, 'cause it doesn't regard of extension itself (.COM / .EXE). When file is loaded into memory, op.sys. checks the first two bytes, if they are "MZ", file is treated as a .EXE one; if not, file is treated as .COM