MZ: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
changed the wording a bit
No edit summary
Line 4:
The MS-DOS EXE format, also known as MZ after its signature (after the initials of Microsoft engineer Mark Zbykowski) was introduced with MS-DOS 2.0 (MS-DOS 1.0 only sported the simple [[COM]] format). DOS-MZ was designed to be run in real mode and reflects this, having a relocation table of SEGMENT:OFFSET pairings. A very simple format that can be run at any offset, it does not distinguish between TEXT, DATA and BSS. Since it was designed to run in real mode, its maximum file size of code + data + bss is 1MB.
 
Only DOS and Windows 9x use this format natively, but there are several free DOS emulators (e.g., [http://www.dosbox.com/ DOSBox]) that support it for various operating systems (e.g., Linux, Amiga, Windows NT, etc.) Although they can exist on their own, MZ executables are embedded in all [[NE]], [[LE]], and [[PE]] executables, usually as stubs so that when they are ran under DOS, they display:
 
This program cannot be run in MS-DOS mode.
 
However, they can also be used so that a single executable can provide 2 ports of the same application (e.g.,one for DOS and one for Windows). Windows 9x will run the MZ executable if the program is started from the command line prompt, or the PE executable if started normally.
 
==See Also==

Revision as of 17:00, 7 April 2011

This page is a stub.
You can help the wiki by accurately adding more contents to it.
Executable Formats
Microsoft

16 bit:
COM
MZ
NE
Mixed (16/32 bit):
LE
32/64 bit:
PE
COFF

*nix
Apple

The MS-DOS EXE format, also known as MZ after its signature (after the initials of Microsoft engineer Mark Zbykowski) was introduced with MS-DOS 2.0 (MS-DOS 1.0 only sported the simple COM format). DOS-MZ was designed to be run in real mode and reflects this, having a relocation table of SEGMENT:OFFSET pairings. A very simple format that can be run at any offset, it does not distinguish between TEXT, DATA and BSS. Since it was designed to run in real mode, its maximum file size of code + data + bss is 1MB.

Only DOS and Windows 9x use this format natively, but there are several free DOS emulators (e.g., DOSBox) that support it for various operating systems (e.g., Linux, Amiga, Windows NT, etc.) Although they can exist on their own, MZ executables are embedded in all NE, LE, and PE executables, usually as stubs so that when they are ran under DOS, they display:

   This program cannot be run in MS-DOS mode.

However, they can also be used so that a single executable can provide 2 ports of the same application (e.g.,one for DOS and one for Windows). Windows 9x will run the MZ executable if the program is started from the command line prompt, or the PE executable if started normally.

See Also