---
title: "EXE and COM programs"
subject: "Microprocessor"
chapter: 3
key: "semester_4/microprocessor:exe-vs-com-programs"
source: https://www.bctengineer.com/q/semester_4/microprocessor/exe-vs-com-programs
site: BCT Engineering
---

# EXE and COM programs

Microprocessor · Chapter 3: Programming with 8086 Microprocessor

- Asked in: 2070 Bhadra, 4 marks; 2069 Bhadra, 4 marks (asked 2 times)
- Video: [Difference between COM and EXE](https://www.youtube.com/watch?v=HYnzazzMroc) — sudocpp
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/exe-vs-com-programs
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-3

## Question

Differentiate between EXE and COM programs.

## Answer

Both are executable programs of DOS. A **.COM** file is an exact memory image of the program that fits in one 64 KB segment; an **.EXE** file has a header with relocation information and can use many segments.

| Point | .COM program | .EXE program |
|---|---|---|
| Size | Max 64 KB (one segment) | Larger than 64 KB possible |
| Segments | Code, data and stack share one segment | Separate code, data and stack segments |
| File format | Pure binary image, no header | Has a header (starts with "MZ") with relocation table |
| Origin | Must start with `ORG 100H` (after the 256-byte PSP) | No ORG needed |
| Stack | Set up automatically by DOS (SP = FFFEH) | Defined by programmer (`.STACK`) |
| Data segment init | Not required, DS = CS | Programmer loads DS (`MOV AX,@DATA`, `MOV DS,AX`) |
| Loading | Fast, loaded as is | Slower, relocation applied by loader |
| Disk space | Smaller | Larger because of the header |
| Creation | `LINK` then `EXE2BIN`, or `TLINK /t` | `LINK` / `TLINK` |
| Memory use | Occupies whole segment | Uses only what it needs |

COM programs suit small utilities; EXE programs suit large applications with several segments.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the size limit of a .COM program?
   A. 64 KB, one segment
   B. 1 MB
   C. 16 KB
   D. No limit
   Answer: A. COM fits in a single 64 KB segment; EXE can be larger. (Key point: Size)

2. Why does a .COM program need ORG 100H?
   A. To set the stack
   B. Execution starts after the 256-byte PSP
   C. To define a data segment
   D. To make a header
   Answer: B. The first 256 bytes of the segment hold the PSP. (Key point: ORG 100H)

3. How does the format of EXE differ from COM?
   A. EXE is pure binary with no header
   B. EXE has a header with relocation table
   C. COM has a relocation table
   D. Both have the same format
   Answer: B. EXE starts with an MZ header and relocation info; COM is a plain memory image. (Key point: File format)

## Related in Microprocessor

- [COM vs EXE; assembling, linking, executing](https://www.bctengineer.com/question.md?key=semester_4%2Fmicroprocessor%3Acom-exe-assembling-linking) — Microprocessor, chapter 3
