DOS MZ Executable

The DOS MZ executable format is the executable file format used for .EXE files in DOS.

The file can be identified by the ASCII string "MZ" (hexadecimal: 4D 5A) at the beginning of the file (the "magic number"). "MZ" are the initials of Mark Zbikowski, one of the developers of MS-DOS. This is used partly because it disassembles as "dec bp; pop dx" (intel syntax), which no COM file will contain as it is an unpredictable result (could crash) and just doesn't do anything useful. Because command.com (the command interpreter on MS-DOS) exceeded the 64 KiB limit, Microsoft made MS-DOS decide whether to load a given executable as a .com or an MZ based on this magic number rather than the filename.

The MZ DOS executable file is newer than the COM executable format and differs from it. The DOS executable header contains relocation information, which allows multiple segments to be loaded at arbitrary memory addresses, and it supports executables larger than 64 KiB; however, the format still requires relatively low memory limits. These limits were later bypassed using DOS extenders.

The environment of an EXE program run by DOS is found in its Program Segment Prefix.

Read more about DOS MZ Executable:  Compatibility

Famous quotes containing the word dos:

    It was so long since I’d seen masses of young men that I’d forgotten how much pleasanter men of between twenty and thirty were to be around with than older men. It isnt so true of women. When I was in my twenties I thought the grown adults I ran into were a disaster and now I know I was right.
    —John Dos Passos (1896–1970)