段寄存器、IP寄存器和内存寻址问题!

发布于 2024-08-27 01:09:26 字数 765 浏览 4 评论 0原文

在下面的文字中我问了两个问题,并且我也描述了我对这些问题的了解,以便您能够理解我的想法。 需要您对以下文字提出宝贵意见。

以下是第一个问题的详细信息

我们知道,如果我们有 1 兆字节内存,那么我们需要 20 位来寻址该内存。另一件事是每个存储单元都有一个物理地址,在 1Mb 内存中为 20 位。 IAPX88中的IP寄存器为16位。现在我的观点是,我们根本不能通过IP寄存器访问内存,因为内存需要20位地址来寻址,但IP寄存器是16位。如果我们有一个 64k 的内存,那么 IP 寄存器可以访问这个内存,因为这个内存需要 16 位来寻址。但是如果是 1mb 内存 IP 就不行。请告诉我我是否正确,如果不是为什么? 假设内存的物理地址是 11000000000000000101 现在我们如何通过 16 位访问这个内存位置。

以下是下一个问题的详细信息:

我的下一个问题是,假设IP寄存器指向内存位置,段寄存器也指向内存位置(段的开头),内存为1MB,我们如何通过这两个16位访问内存位置寄存器告诉我如何访问 20 位可寻址内存位置的步骤顺序。 如果你的答案是,我们将段值左移4位,然后将IP值添加到其中以获得20位地址,那么这就提出了另一个问题,即地址总线(地址总线应该是20位)位宽),段寄存器和 IP 寄存器都是 16 位宽,现在如果地址总线是 20 位宽,那么这意味着地址总线连接到这两个寄存器。如果情况并非如此,那么我想到的另一件事是,这两个寄存器都会生成一个 20 位地址,并且会有一个寄存器可以存储 20 位,并且该寄存器也将连接到这些寄存器和地址总线。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清晨说晚安 2024-09-03 01:09:26

答案是总是使用段寄存器,总是产生20位地址。如果段寄存器包含零,则只能访问前64K,但仍然使用20位地址访问。

The answer is that the segment register is always used, a 20-bit address is always produced. If the segment register contains zero, then only the first 64K can be accessed, but it is still accessed using a 20-bit address.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文