IDA address space concepts

Internally, IDA has 32bit linear address space. The internal addresses are called "linear addresses". The input program is loaded into this linear address space.

Please note that usually the linear addresses are not used in the program directly. During disassembling, we use so-called "virtual addresses", which are calculated by the following formula:

        VirtualAddress = LinearAddress - (SegmentBase << 4);
We see that the SegmentBase determines what addresses will be displayed on the screen. More than that, IDA allows to create several segments with the same virtual address in them. For this, you just need to create segments with correct segment base values.

A SegmentBase is kept as 16bit quantity (this is IBM PC heritage). To create a segment with base >= 0x10000, you need to use selectors. However, if you try to create a segment with a segment base >= 0x10000, IDA will automatically choose appropriately a free selector and setup for the new segment.

There are some address restrictions in IDA.

We do not recommend to use addresses just above 0xFF000000 (MAXADDR) in the 32-bit version. The limitation for the 64-bit version is 0xFF0000000000. These addresses are used for internal housekeeping.

There is also one address which must never be used in the disassembly. It is the 'all ones' address, or -1. Internally, it is used as a BADADDR (bad address). No address or address range can include BADADDR.

 Click here to see an example of segment creation
 (simple case - IBM PC)
 Click here to see an example of segment creation
 (simple case - Z80)
 Click here to see another example of segment creation
 (automatically chosen selector)
 Click here to see another example of segment creation
 (user-defined selector)
See also How to change segment translation
Index | Previous topic | Next topic