views:

975

answers:

5

For example, the accumulator is named EAX and, while the instruction pointer is called IP. I also know that there are bytes called CL and DH. I know there must be a convention to all of the names, but what is it?

+16  A: 

The C and the D are numbers/types and H for high and L for low parts of the higher register. http://en.wikipedia.org/wiki/X86

Wikipedia explains it very well.

More from the Wikipedia:

  1. AX/EAX/RAX: accumulator
  2. BX/EBX/RBX: base
  3. CX/ECX/RCX: counter
  4. DX/EDX/RDX: data/general
Daniel A. White
+12  A: 

Something i found

* EAX - Accumulator Register
* EBX - Base Register
* ECX - Counter Register
* EDX - Data Register
* ESI - Source Index
* EDI - Destination Index
* EBP - Base Pointer
* ESP - Stack Pointer
Ólafur Waage
+15  A: 

It's history. The x86 came from the 8086, which came from the 8080, which came from the 8008, which came from the 4004. There were 16-bit registers AX, BX, etc. and for the 80386 they got "extended" to 32 bits.

Added: BTW the Motorola 68K had 32-bit registers from the start, so it was much easier to program for the first couple decades. I worked on projects where Intel was chosen for business reasons, not technical.

Mike Dunlavey
+3  A: 

older processors have accumulators named A, B, etc (alphabeticaly orderd). When 16 and 32 bytes accumulators were developed, engineers added an X (extended). So its all about history, as the language C is called this way becouse it was developed from B language (Bell labs).

The convention is only internal, to keep up with the names they are alredy familiar with.

RMAAlmeida
+4  A: 

Some good answers here: x86 assembly registers — Why do they work the way they do?

RedFilter