X86 assembly registers — Why do they work the way they do?

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 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 Because of the need to port 8 bit code they needed to be able to refer to the individual 8 bit parts of AX, BC, 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 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 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.

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. 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 Because of the need to port 8 bit code they needed to be able to refer to the individual 8 bit parts of AX, BC, 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. 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 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...................

There's generally no explanation as to why there isn't a pseudo-register for say 31..16 portion of EAX. I suppose it was not needed... – Calyth Jan 7 '09 at 21:44.

In the old 8-bit days, there was the A register. In the 16-bit days, there was the 16 bit AX register, which was split into two 8 bit parts, AH and AL, for those times when you still wanted to work with 8 bit values. In the 32-bit days, the 32 bit EAX register was introduced, but the AX, AH, and AL registers were all kept.

The designers did not feel it necessary to introduce a new 16 bit register that addressed bits 16 through 31 of EAX.

It continues to 64-bit registers today, the 64-bit RAX register includes EAX as the lower 32 bits. – Ferruccio Oct 23 '08 at 1:48 10 Revenge. Revenge of EAX.

– Paul Nathan Oct 23 '08 at 2:33 2 "R"egister, presumably. There are additional new registers that are just named R+number. – Curt Hagenlocher Oct 23 '08 at 2:33 1 i.e.

, R0 => RAX, R1 => RCX, R2 => RDX, R3 => RBX, R4 => RSP, R5 => RBP, R6 => RSI, R7 => RDI. :-) (BTW it's a pet peeve of mine when people get the register ordering wrong; the order is AX, CX, DX, BX, SP, BP, SI, DI. :-P) – Chris Jester-Young Oct 23 '08 at 2:40 4 Which register is :-P?

:D – Jeff Yates Oct 23 '08 at 3:19.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions