### Create segment - simple case (PC)

IBM PC case
-----------
Suppose we need to create a segment occupying addresses F000:1000..F000:2000
Let's calculate linear addresses:

start = (0xF000 << 4) + 0x1000 = 0xF1000
end = (0xF000 << 4) + 0x2000 = 0xF2000

The segment base must be selected so that the first offset in our segment
will be 0x1000. Let's find it using the following equation:
VirtualAddress = LinearAddress - (SegmentBase << 4);
0x1000 = 0xF1000 - (base << 4);

After solving this equation, we see that the segment base is equal to 0xF000.
(you see, this is really a very simple case :) )
Now, we can create a segment entering:

segment start address: 0xF1000
segment end address: 0xF2000
segment base: 0xF000

Please note that the end address never belongs to the segment in IDA.
Go back to addressing space concepts

Index
| Previous topic
| Next topic