Segment register, IP register and memory addressing issue!
Posted
by Zia ur Rahman
on Stack Overflow
See other posts from Stack Overflow
or by Zia ur Rahman
Published on 2010-03-28T10:14:20Z
Indexed on
2010/03/28
10:23 UTC
Read the original article
Hit count: 475
assembly-language
|computer-architecture
In the following text I asked two questions and I also described that what I know about these question so that you can understand my thinking.
Your precious comments about the below text are required.
Below is the Detail of 1ST Question
As we know that if we have one mega byte memory then we need 20 bits to address this memory. Another thing is each memory cell has a physical address which is of 20 bits in 1Mb memory.
IP register in IAPX88 is of 16 bits. Now my point of view is, we can not access the memory at all by the IP register because the memory need 20 bit address to be addressed but the IP register is of 16 bits. If we have a memory of 64k then IP register can access this memory because this memory needs 16 bits to be addressed. But incase of 1mb memory IP can’t.tell me am i right or not if not why?
Suppose physical address of memory is
11000000000000000101
Now how can we access this memory location by 16 bits.
Below is the detail of Next Question:
My next question is , suppose IP register is pointing to memory location, and the segment register is also pointing to a memory location (start of the segment), the memory is of 1MB, how we can access a memory location by these two 16 bit registers tell me the sequence of steps how the 20 bits addressable memory location is accessed .
If your answer is, we take the segment value and we shift it left by 4 bits and then add the IP value into it to get the 20 bits address, then this raises another question that is the address bus (the address bus should be 20 bits wide), the registers both the segment register and the IP register are of 16 bits each , now if address bus is 20 bits wide then this means that the address bus is connected to both these registers. If its not the case then another thing that comes into my mind is that both these registers generate a 20 bit address and there would be a register which can store 20 bits and this register would be connected to both these register and the address bus as well.
© Stack Overflow or respective owner