25

Google doesn't show the result,

Anyone knows?

Peter Cordes
  • 286,368
  • 41
  • 520
  • 731
Mask
  • 31,463
  • 47
  • 100
  • 125
  • 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

5 Answers5

40

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
  • 23,413
  • 16
  • 60
  • 87
  • 2
    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 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
  • 666,277
  • 106
  • 705
  • 986
  • 16
    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
7

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
  • 73,377
  • 7
  • 157
  • 198
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,148
  • 7
  • 53
  • 77
  • 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