Open Eggbert

EXE

EXE is the executable file format developed by the Microsoft company for the following operating systems: Windows, DOS, OS/2.

The EXE file contains series of instructions for the processor to be executed.

Magic number of the EXE file format is: 0x4d 0x5a (which means, each EXE file starts with the ASCII string called "MZ".

Formats of the EXE file

DOS

OS/2

Windows

Other Formats

Parts of the PE EXE file

EXE file consists of the following parts: headers, sections

EXE headers

MS-DOS Header

Its length is 64 bytes and contains the relocation information. This header is intended for MS-DOS operating system.

Purpose of this header is to show an error message, if such an EXE file is started on the MS-DOS operating system, which is only for historical purposes.

Usual text of the message is: This program cannot be run in DOS mode

PE Header

The PE (Portable Executable) header is part of a Windows .exe file that the operating system reads when it runs the file. This header tells the OS where and how to load the program into memory. It begins with a unique 4-byte signature and includes essential details such as:

Section Table

The section table is an array of structures, where each entry represents a section of the executable. Each entry includes information about the section, such as:

Data Directory

The data directory is an array that points to various tables with essential executable information, including:

Sections

These are key sections within a .exe file.

External links