MS-DOS EXE

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Links)
(Deleted some things moved to EXE, and restored some deleted things)
Line 5: Line 5:
 
|pronom={{PRONOM|x-fmt/409}}
 
|pronom={{PRONOM|x-fmt/409}}
 
}}
 
}}
'''MZ''' (also called by its extension '''EXE''' and by other names) is an executable file format used mainly by [[MS-DOS]]; the format is a successor of [[DOS executable (.com)|COM]].
+
'''MS-DOS EXE''', also known as '''MZ''' format, is an executable file format used mainly by [[MS-DOS]]. It is the successor of [[DOS executable (.com)|COM]]. A number of other executable formats are extensions of it; see [[EXE]] for those formats.
 
+
Many other executable formats are extensions of MZ, including [[New Executable]] (used by 16-bit Windows), [[Portable Executable]] (newer Windows versions) and [[Linear Executable]] (OS/2). Files in these formats usually begin with a short MZ program (called a DOS stub) which, when executed by DOS, prints a message like "This program cannot be run in DOS mode" or "This program requires Microsoft Windows" and immediately exits. Some programs contain a more functional DOS stub, e.g. the Windows 9x registry editor.
+
  
 
== Identification ==
 
== Identification ==
An MZ file begins with an ASCII signature of {{magic|'M' 'Z'}} (or, rarely, {{magic|'Z' 'M'}}), followed by a series of 16-bit fields. The field at offset 24 (the relocation table offset) is ''usually'' (but apparently not always) less than 64, and at least 28.
+
An MS-DOS EXE file begins with an ASCII signature of "{{magic|MZ}}" (or, rarely, "{{magic|ZM}}"), followed by a series of 16-bit fields. The field at offset 24 (the ''relocation table offset'') is ''usually'' (but apparently not always) less than 64, and at least 28. A value of 64 or more, or 0, suggests the format may not be MS-DOS EXE.
 +
 
 +
It's not clear whether there is any completely reliable way to identify an MS-DOS EXE, except in the negative (i.e. it begins with "MZ", and is not a valid [[NE]], [[PE]], etc., file).
  
 
== Links ==
 
== Links ==

Revision as of 21:23, 29 October 2016

File Format
Name MS-DOS EXE
Ontology
Extension(s) .exe
PRONOM x-fmt/409

MS-DOS EXE, also known as MZ format, is an executable file format used mainly by MS-DOS. It is the successor of COM. A number of other executable formats are extensions of it; see EXE for those formats.

Identification

An MS-DOS EXE file begins with an ASCII signature of "MZ" (or, rarely, "ZM"), followed by a series of 16-bit fields. The field at offset 24 (the relocation table offset) is usually (but apparently not always) less than 64, and at least 28. A value of 64 or more, or 0, suggests the format may not be MS-DOS EXE.

It's not clear whether there is any completely reliable way to identify an MS-DOS EXE, except in the negative (i.e. it begins with "MZ", and is not a valid NE, PE, etc., file).

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox