30

Google doesn't show the result,

Anyone knows?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Mask
  • 33,129
  • 48
  • 101
  • 125
  • 1
    Related: [What do the E and R prefixes stand for in the names of Intel 32-bit and 64-bit registers?](https://stackoverflow.com/questions/43933379/what-do-the-e-and-r-prefixes-stand-for-in-the-names-of-intel-32-bit-and-64-bit-r). Also asks about the "X" part, but this question has better answers for that so not closing as a duplicate. – Peter Cordes Jul 08 '17 at 03:51
  • Related: [Why are x86 registers named the way they are?](https://stackoverflow.com/q/892928) re: what the full names "mean", and [Why are first four x86 General Purpose Registers named in such unintuitive order?](https://retrocomputing.stackexchange.com/q/5121) on retrocomputing for some history. Also [What are the names of the new X86\_64 processors registers?](https://stackoverflow.com/q/1753602) re: 64-bit register names. – Peter Cordes Feb 19 '23 at 11:55

6 Answers6

44

The X means pair, and goes back to at least the 8080. It had 8-bit registers B,C,D,E,H,L (among others) which could also be used in pairs (BC, DE and HL). The BC and DE pairs were used mostly for 16-bit arithmetic; the HL pair generally held a memory address. Some examples of the usage of X for pair:

LXI  D,12ABH    ; "load pair immediate"
DCX  B          ; "decrement pair"
STAX D          ; "store A (indirect) at pair"

Fast forward to the 8086. It has registers AL,AH,BL,BH,CL,CH,DL,DH, which, similarly to the 8080, can be used in pairs: AX, BX, CX, DX.

As others have pointed out, the E in the 32-bit register names means extended.

I. J. Kennedy
  • 24,725
  • 16
  • 62
  • 87
  • 3
    Awesome! Thanks for this. I was only guessing that `E` stood for extended before your post. – crush Oct 15 '13 at 16:29
  • Confirmed: the first Intel processor to support these instructions was the 8080. It doesn't go back any further than that. The 8008 didn't support paired registers. The only `X`-containing instruction mnemonics on the 8008 were XOR operations. – Cody Gray - on strike Jul 08 '17 at 07:44
  • I checked the official Intel 8080 Programmer's Manual and the relevant instructions are officially named as follows: STAX/LDAX store/load accumulator INX/DCX increment/decrement register pair LXI load register pair immediate. – Karol S Jun 18 '19 at 14:26
10

Nothing, as far as I know. It stands for a general purpose register.

The 16 bit AX register can be addressed as AH (high byte) and AL (low byte).

The EAX register is the 32 bit version of the AX register. The E stands for extended.

Guffa
  • 687,336
  • 108
  • 737
  • 1,005
  • 18
    The 8080, 8085 and Z80 had 8-bit registers A, B, etc. The 8086 had the 16-bit AX, EX etc registers. The 80386 and above got the EAX. I assumed that the E and the X both stood for 'extended', the X for 16-bit extension and the E for 32-bit extension. – Jonathan Leffler Mar 30 '10 at 12:58
  • 2
    @Jonathan: The X might have been inspired by "extended" but I haven't yet found that described anywhere. If there is no official meaning for the X, that would explain how they could add another "extended" without feeling silly. Naming it the "Extended Accumulator eXtended" register would seem like a lack of imagination... :) – Guffa Mar 30 '10 at 13:41
  • kind of like 'C' got its name - C for Code. – IAbstract Apr 06 '10 at 17:54
  • 2
    @dboarman: It was named "C" because it was derived from the language "B", which is equally imaginative... http://en.wikipedia.org/wiki/C_%28programming_language%29#History – Guffa Jan 10 '11 at 02:06
  • I read the link but I didn't find that specifically...either way, coders are never credited with being over imaginative. ;) – IAbstract Jan 10 '11 at 15:07
  • @JonathanLeffler The E is for extended, but the X is not. It means 'pair'. – I. J. Kennedy Aug 25 '12 at 23:41
  • Why the downvote? If you don't explain what you think is *wrong*, it can't improve the answer. – Guffa Oct 23 '12 at 00:52
8

On the 8086, the AX register was the combination of AH and AL. Likewise BX was BH and BL, etc. On the 80386, rather than combining 16-bit registers into 32-bit registers, Intel added 16 bits to each register. The name "AL" still refers to bits 0-7 of the first letter-named register, "AH" to bits 8-15, and "AX" to bits 0-15; the name "EAX" now refers to all 32 bits of the register.

It's interesting to note that most other 16- and 32-bit processors do not offer any equivalent means of accessing just the upper or lower parts of a register. The costs of allowing such access, both in hardware complexity and instruction-encoding bits, were significant, and in today's day and age, the ability to add one 8-bit portion of a register to an 8-bit portion of another register is far less useful than many other uses to which such hardware or instruction-encoding space might be put. On the other hand, there are still times when such abilities can be useful when they exist.

supercat
  • 77,689
  • 9
  • 166
  • 211
1

As Mihai says, it is just a naming convention.

However, given that 'X' is often used for "fill in your value" and is commonly used by mathematicians as the first variable name of choice in equations, and that those particular registers are general purpose (as opposed to say ESP which is the extended (32-bit) stack pointer or EIP the extended instruction pointer) that is perhaps why X is chosen as opposed to say 'B'.

0

One posible reason I can think of, is to denote that it has not 'normal' state. When talking about serial communication in electronics, if one of the data lines can be anything, you might say its state is X as it is neither/both/either 0 or 1.

thecoshman
  • 8,394
  • 8
  • 55
  • 77
  • 1
    One could suggest that "X" was a shorthand for "H or L", since AX could be interpreted to mean "all the registers whose first letter is H, and whose second letter is H or L", but that has nothing to do with "normal" state. – supercat Jan 29 '12 at 20:20
-1

The following is a brief explanation of what each of the x86 general-purpose registers stands for:

  • EAX: "Extended Accumulator" - used for arithmetic and logical operations, as well as for storing return values from functions.
  • EBX: "Extended Base" - often used as a pointer to data in the data segment of memory.
  • ECX: "Extended Counter" - often used for loop and string operations, as well as for storing function arguments.
  • EDX: "Extended Data" - often used for I/O operations and for storing function arguments.
  • ESI: "Extended Source Index" - often used as a pointer to a source operand in string operations.
  • EDI: "Extended Destination Index" - often used as a pointer to a destination operand in string operations.
  • EBP: "Extended Base Pointer" - often used as a pointer to the base of the current stack frame.
  • ESP: "Extended Stack Pointer" - often used as a pointer to the top of the current stack frame.
Shehan Hasintha
  • 947
  • 10
  • 10
  • 1
    That's an answer to [Why are x86 registers named the way they are?](https://stackoverflow.com/q/892928), not to this question about what the letter X mean in EAX and AX, composed of AH:AL. – Peter Cordes Feb 19 '23 at 11:53