tags:

views:

55

answers:

1

I was always thinking MS DOS is also using PE for binary executable until recently when spotting this:

A PE image file begins with a MS DOS stub. It was used so that when a program is run in MS DOS, it would give a good error message (that the program must be run in windows) instead of crashing MS DOS.

So it implies PE isn't for MS DOS,then what is it?

+3  A: 

COM and MZ.

imgx64
Since it's self contained, is it very huge?
COMer
@COMer: Generally, no. In fact, for fairly obvious reasons, anything over ~600K is fairly unusual (though, with overlays, larger was certainly possible). There's a reason UIs (in particular) with rather...bare by modern standards.
Jerry Coffin
@COMer: No, not really. Libraries during those days were pretty much non-existent, so DLLs weren't necessary. And COM even had a limit of 64k per executable.
imgx64
What's the extension of `COM` and `MZ` in those days? Is it `.exe` ?
COMer
@COMer: `.com` and `.exe` respectively.
imgx64