News for hackers. Stuff that matters.
Re:What's the difference between the com and exe extensions?... by dfox on Saturday May 27, 2017 @11:13AM (#14430411)
COM files were not limited to only 64k of accessible memory, but the difference was that upon loading COM file got one full preallocated 64kB segment that got used for all of data, code and stack, while MZ format files specified in their header how many paragraphs (segment register increments, ie. 16 byte blocks) they need for code and how many additional uninitialized paragraphs should follow that (minimum and maximum required).

In both cases programs were free to allocate additional memory from DOS, but by default EXE files were loaded in such way that this wasn't necessary and automatically got the largest continuous block of free memory allocated to them (in fact they got the highest addressed block of free memory, but in any sane state of DOS it was also the largest).

Re:What's the difference between the com and exe extensions?... by nils-m-holm on Sunday May 28, 2017 @02:31PM (#14435497)
> upon loading COM file got one full preallocated 64kB segment

IIRC, COM files got all available memory up to the 640K boundary and if you wanted to load additional programs, you had to shrink the preallocated region first.