The general-purpose registers are primarily used for arithmetic and data movement.
They include 32-bit registers: , , , and .
†Note that an empty section may cause error.
Each register can also be addressed as 16-bit value.
For example, the 16-bit register for is , which can be further addressed as two separate 8-bit values: and .
32-bit
16-bit
16-bit
8-bit (high)
8-bit (low)
AH
AL
AX
EAX
32-bit
16-bit
16-bit
8-bit (high)
8-bit (low)
BH
BL
BX
EBX
32-bit
16-bit
16-bit
8-bit (high)
8-bit (low)
CH
CL
CX
ECX
32-bit
16-bit
16-bit
8-bit (high)
8-bit (low)
DH
DL
DX
EDX
The word “general-purpose” means the registers could be used for many purposes. However, registers used in the following ways will generate more efficient machine code:
(Extended Accumulator Register), the primary accumulator, is used for operations involving input/output and most arithmetic.
is automatically used by multiplication and division instructions.
(Extended Base Register) is known as the base register since it is used as an index to extend addressing.
(Extended Count Register) is know as the count register. It may contain a value to control the number of times a loop is repeated or a value to shift bits left or right. is used as a loop counter.
(Extended Data Register) is known as the data register. Some input/output operations require its use, and multiply and divide operations that involve large values.