为什么会出现不包含EAX的高位字节寄存器? [英] Why is there not a register that contains the higher bytes of EAX?

查看:593
本文介绍了为什么会出现不包含EAX的高位字节寄存器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

%AX =(%AH +%AL)

那么,为什么不%EAX =(%SOME_RESTIER +%AX)对于一些寄存器%SOME_REGISTER

So why not %EAX = (%SOME_RESTIER + %AX) for some register %SOME_REGISTER?

推荐答案

只是为了一些澄清。在20世纪70年代早期的微处理器天,CPU的只有少数寄存器和非常有限的指令集。通常情况下,算术单元只能在一个CPU寄存器进行操作,通常被称为累加器。在8位8080和放大器的蓄能器; Z80处理器被称为A。有6其他通用8位寄存器:B,C,D,E,H&安培; L.这六个寄存器可以配对形成3 16位寄存器:BC,DE&安培; HL。在内部,累加器是结合标志寄存器形成AF 16位寄存器。

Just for some clarification. In the early microprocessor days of the 1970's, CPUs had only a small number of registers and a very limited instruction set. Typically, the arithmetic unit could only operate on a single CPU register, often referred to as the "accumulator". The accumulator on the 8 bit 8080 & Z80 processors was called "A". There were 6 other general purpose 8 bit registers: B, C, D, E, H & L. These six registers could be paired up to form 3 16 bit registers: BC, DE & HL. Internally, the accumulator was combined with the Flags register to form the AF 16 bit register.

在英特尔开发的16位8086家,他们希望能够到端口8080 code,所以他们保持了相同的基本寄存器结构:

When Intel developed the 16 bit 8086 family they wanted to be able to port 8080 code, so they kept the same basic register structure:

8080/Z80  8086
A         AX
BC        BX
DE        CX
HL        DX
IX        SI    
IY        DI

由于需要口8位code他们需要能够指AX,BX,CX&放大器的各个8位部分; DX。这些被称为AL,AH为低速&高字节斧等为BL / BH,CL / CH&安培; DL / DH。九&安培;在Z80 IY只用过16位指针寄存器,所以没有必要访问SI&放的两半; DI

Because of the need to port 8 bit code they needed to be able to refer to the individual 8 bit parts of AX, BX, CX & DX. These are called AL, AH for the low & high bytes of AX and so on for BL/BH, CL/CH & DL/DH. IX & IY on the Z80 were only ever used as 16 bit pointer registers so there was no need to access the two halves of SI & DI.

当80386在80年代中期,他们创造扩展所有的寄存器版本发布了。所以,AX成为EAX,BX成为EBX等没有必要访问顶部这些新的扩展寄存器的16位,所以他们并没有创造一个EAXH伪寄存器。

When the 80386 was released in the mid 1980s they created "extended" versions of all the registers. So, AX became EAX, BX became EBX etc. There was no need to access to top 16 bits of these new extended registers, so they didn't create an EAXH pseudo register.

AMD施加同样的伎俩,当他们生产的第64位处理器。 AX寄存器的64位版本被称为RAX。所以,现在你有一些看起来像这样:

AMD applied the same trick when they produced the first 64 bit processors. The 64 bit version of the AX register is called RAX. So, now you have something that looks like this:

|63..32|31..16|15-8|7-0|
               |AH.|AL.|
               |AX.....|
       |EAX............|
|RAX...................|

这篇关于为什么会出现不包含EAX的高位字节寄存器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆