Question

I have written disassembler for my computer architecture classes and I was wondering if there was any way of knowing where does code segment ends and data segment begins in MZ Exe DOS files (x8086 intel architecture).

Was it helpful?

Solution

The short answer is no. In fact, the two can be (and sometimes are) intermixed quite freely, so there is no clean boundary between the two at all.

Some disassemblers (e.g., IDA Pro) can/will start from the entry point and trace through the code to identify branches and their targets to attempt to separate the two, but even with that the result is rarely perfect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top