Typical file extention for files that contain executable code. This is especially true on Win32 platforms, where almost all executables are suffixed by .exe

An .EXE file is not an .EXE file.

There are several flavors.

The standard MS-DOS type executable appeared
in MS-DOS 2.0 IIRC, and can be identified by the MZ magic bytes at the top. The immediate advantage of this file format, compared to the original .COM files, is that they can be much bigger than 64k, and allows for multiple segments.

32bit DOS programs usually run with the help of a DOS extender, such as PMODE/W, DOS4GW or DOS32. With these, the MZ executable part of an .exe file is just a stub to start up the dos extender (or might actually BE the dos extender), which will in turn load the appended executable code which has a different structure than normal MZ .exe's.

Win16 .EXE files are NE-type executables (New Executable), with additional stuff that allows the operating system to link your code to DLL functions.
Win32 .EXE files are PE-type executables (Portable Executable), which actually is some sort of embraced and extended COFF file. Win32 .DLL files are of the same type.
As for OS/2, they probably have their own type, but I don't know anything about that.

Log in or register to write something here or to contact authors.