Simply they are very easy to be remembered because .COM will be using 64K byte segment. Execution always begins at offset 100h and stack pointer initialized to FFFFh and supports real mode execution only.
And for .EXE it will be having multiple segments, execution normally start with IP set 0000, and the initial stack pointer is set to the total length.
COM Program
- In .COM program data, code, and stack reside in one segment.
- The .COM files are compact and are loaded slightly faster than the equivalent .EXE files, since these contain only the execution code.
- Near subroutines are used in the.COM files.
- Maximum length of the program (code and data) is 65,536 bytes (64L) minus 256 bytes of PSP.
- In .COM format, the size of the file is the exact size of the program.
- .COM program does not require a file header.
EXE Program
- .EXE program can have multiple codes, data, and stack segments.
- .EXE file contains a unique header, a relocation map, a checksum, and other information used by DOS along with the execution code.
- .EXE programs can contain more than one code segment. So both near and far calls are used.
- .EXE program can be a large as available memory.
- In .EXE formats the size of the files is the size of the program plus the size of the header.
- .EXE programs need a file header for the relocation process.