Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does X mean in EAX,EBX,ECX ... in assembly?

Tags:

Google doesn't show the result,

Anyone knows?

like image 216
Mask Avatar asked Mar 30 '10 12:03

Mask


People also ask

What is the meaning of X in instruction?

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.

What does ECX mean in assembly?

CX is known as the count register, as the ECX, CX registers store the loop count in iterative operations. DX is known as the data register. It is also used in input/output operations. It is also used with AX register along with DX for multiply and divide operations involving large values.

What does EAX mean in assembly?

eax is the 32-bit, "int" size register. It was added in 1985 during the transition to 32-bit processors with the 80386 CPU.

What is EAX and EBX in assembly?

eax, ebx, ecx and so on are actually registers, which can be seen as "hardware" variables, meaning different than higher level-language's variables. Registers can be used in your software directly with instructions such as mov , add or cmp . The leading e means extended that is your register is 32 bits wide.


1 Answers

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.

like image 146
I. J. Kennedy Avatar answered Oct 17 '22 09:10

I. J. Kennedy