8086/8088中有多少个寄存器?
我参加了计算机体系结构课程,了解到处理器有 32 个寄存器,每个寄存器都是 32 位。现在我正在学习计算机体系结构课程,其中我读到8086只有只有8个寄存器。但是我读过的书 此网站显示了许多寄存器。我对 8086 和 8088 中的寄存器感到困惑。请帮助我。
注意:
我对不同处理器中的不同寄存器大小有很好的理解。我只是对寄存器的数量感到困惑。
I took Computer Architecture course and I understood that processor has 32 registers each of 32 bit. Now I am studying computer architecture course in which I read that 8086 has 8 registers only. But the book I read and this website shows many registers. I am getting confused about the registers in 8086 and 8088. Please help me out.
NOTE:
I have a good understanding of different register sizes in different processors. I am just getting confused in the number of registers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
8086 和 8088 是 16 位处理器 - 它们的寄存器宽度均为 16 位。 (一些指令将 DX 和 AX 的组合视为 32 位整数,如 div 输入和 mul 输出。)
请注意,8086 有 16 位数据总线; 8088 有一个 8 位数据总线。 (因此加载/存储 16 位字需要 2 个总线周期。两者的地址仍然是 20 位。)
您的网站链接是准确的;以下是其中的复制/粘贴,并进行了一些轻微的编辑:
The 8086 and 8088 are 16 bit processors - their registers are each 16 bits in width. (A few instructions treat the combination of DX and AX as a 32 bit integer, like div input and mul output.)
Note that the 8086 has 16 bit data bus; the 8088 has an 8 bit data bus. (So loading/storing a 16-bit word takes 2 bus cycles. Addresses are still 20-bit for both.)
The site you linked is accurate; the following is a copy/paste from it with a couple light edits:
8086有14个16位寄存器。 AX、BX、CX、DX、SI、DI、BP、SP、CS、DS、SS、ES、IP 和标志寄存器。最后两个只能间接访问。
The 8086 has 14 16 bits registers. AX, BX, CX, DX, SI, DI, BP, SP, CS, DS, SS, ES, IP and the flags register. The last two are only accessed indirectly.
这并不能回答你的问题,但如果你想与另一位工程师交流,你必须使用正确的语言。说“一个(某些)处理器有 32 个寄存器,大小为 32 位”不会有任何帮助,因为处理器的数量是无数的。
我假设混乱来自维基百科上的这句话。您阅读的两个来源都是正确的。有8个通用寄存器(在文章中它被标记为“或多或少通用”,我不知道谁可以写这个),它们是:AX BX CX DX和SI DI BP SP。还有段寄存器、特殊用途寄存器和标志寄存器(在“排除”一词后面注明,我猜,应该读作“有寄存器,如果排除这些寄存器,则有 8 个”) 3组”,含糊不清)。
问题出在措辞上。引用的句子令人困惑,我可以看出你的问题来自哪里。问问总没有坏处,但你应该明白维基百科不是可靠的知识来源,如果你感到困惑,就拿起一本书吧。
This doesn't answer your question, but if you want to communicate with annother engineer, you have to use the proper language. Saying "a (some) processor has 32 registers that are 32 bits in size" won't get you anywhere, there are countless numbers of processors.
I'm assuming the confusion comes from this sentence on the Wikipedia. Both of the sources you read are right. There are 8 general purpouse registers (in the article it's noted as "more or less general", i've no idea who could write that), they are: AX BX CX DX and SI DI BP SP. There are also segment registers, special purpouse registers and a flag register (which are noted after the "excluding" word, which, i'm guessing, is suppoused to be read as "there are registers, there's 8 of them if you exclude these 3 groups", it's vague).
The issue is in the wording. The quoted sentence is confusing and i can see where your question is comming from. It never hurts to ask, but you should understand that Wikipedia is not a reliable source of knowledge, if you're ever confused, just pick up a book.
计算机体系结构书籍经常使用 MIPS 作为示例,因为它相当简单且具有教育意义。 MIPS 有 32 个寄存器,但这并不意味着其他 32 位架构也有 32 个寄存器。 32位在这里仅意味着计算机具有32位位地址/32 位整数寄存器。它与寄存器的数量没有任何关系。
ARM 是最流行的 32 位架构,有 16 个寄存器(尽管 ARMv8 64 位将这个数字增加了一倍,达到 32 个)。许多其他 32 位架构也有 32 个以外的寄存器数量,例如 Motoroka 68k 和 SuperH v2/3/4,都有 16 个寄存器。有关架构列表,请参阅此处。您会看到,64 位架构很少有 64 个寄存器,因为这会大大增加寄存器文件的大小,并使上下文切换变得更糟。其中大多数有 32 个寄存器。
x86 在几十年前就向后兼容 8086,只有 8 个可见的整数寄存器。但实际上现在的 x86 CPU 内部有数百个寄存器,并使用寄存器重命名来克服寄存器的限制寄存器的数量。
Computer architecture books often use MIPS as example because it's rather simple and educational. MIPS has 32 registers but this does not mean that other 32-bit architectures also have 32 registers. 32-bit here only means that the computer has 32-bit address/32-bit integer registers. It's not related to the number of registers in any way.
ARM, the most popular 32-bit architecture, has 16 registers (although ARMv8 64-bit doubled this number to 32). Many other 32-bit architectures also have register number other than 32 such as Motoroka 68k and SuperH v2/3/4, all have 16 registers. For the list of architectures look at here. You see, 64-bit architectures rarely have 64 registers, as that'll increase the register file size a lot, and makes context switch worse. Most of them have 32 registers.
x86, being backward compatible with 8086 many decades ago, has only 8 visible integer registers. But in fact x86 CPUs nowadays have hundreds of registers inside and use register renaming to overcome the limit in number of registers.