Reputation: 87321
What instruction set architecture does an LE (linear executable) file have? The linked article says: mixed 16/32 bit.
Please note that I'm aware of the CPU type field (see here) which can distinguish between 80286 and i386 (80386). However, I interpret this as a CPU type requirement, so this doesn't specify the architecture, e.g. the hex 40
is valid in both: it means inc ax
in 16-bit code and it means inc eax
in 32-bit code, and both can be executed by a 80386 CPU. I'm interested in what hex 40
means in the code of an LE file.
Upvotes: 0
Views: 81
Reputation: 87321
I was able to find https://www.program-transformation.org/Transform/PcExeFormat , based on which the answer is the following.
If object flag bit 13 in the object table entry is set, then it's 32-bit, otherwise it's 16-bit.
In the executable entry table, LE flag bit 1 of LX bundle type byte distinguishes between 16-bit and 32-bit.
Since there can be multiple entries in these tables, a single LE or LX file may contain both 16-bit and 32-bit code.
Upvotes: 1