开发者

Concerning real mode physical memory addressing

Me and my friend开发者_高级运维 were brainstorming about a question concerning physical memory addressing in real mode and we couldn't wrap our heads around it. Here goes.

In real mode 16 is multiplied to the segment selector register and added to the offset register to get the 20-bit physical address. This consequently leads to the possibility of overlapping segments.

E.G. "Segment Selector -> 0040 & Offset -> 0010" = "Segment Selector -> 0030 & offset -> 0110"

It is our understanding that the segment selector is shifted by 4 bits before being added to the offset. So in order to avoid this segmentation why didn't they just shift the segment selector by 6 (multiply it by 64) before adding it to the offset. In our view this would have eliminated the prospect of memory overlapping.

Does it have to do with any hardware limitations they faced during that time or is it simply a design decision.


It's due to the design constraints. They had a 20-bit address bus, the simplest thing to do was simply to have the segment register select the paragraph, then add the offset to it (and for the parts that exceed the 20-bit address bus, it wraps around into the bottom of memory).


Shifting by 4 gave you an address space of a whole megabyte. Wow!

The design was done at a time when the 8-bit systems were configured with 64 kB, for those rich enough to buy that much memory. And with a big enough box to fit all those memory boards.

Here's what 16 kB looked like: http://www.s100computers.com/Hardware%20Folder/CCS/16K%20RAM/16K%20RAM.htm

If you were to install 4 MB, you would first have to rent another room to store the memory boards!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜