The 32-bit general-purpose registers EAX, EBX, ECX, EDX, ESI, EDI, EBP, and ESP
General-Purpose Registers
The 32-bit general-purpose registers EAX, EBX, ECX, EDX, ESI, EDI, EBP, and ESP
are provided for holding the following items:
• Operands for logical and arithmetic operations
• Operands for address calculations
• Memory pointers
Although all of these registers are available for general storage of operands, results,
and pointers, caution should be used when referencing the ESP register. The ESP
register holds the stack pointer and as a general rule should not be used for another
purpose.
Many instructions assign specific registers to hold operands. For example, string
instructions use the contents of the ECX, ESI, and EDI registers as operands. When
using a segmented memory model, some instructions assume that pointers in certain
registers are relative to specific segments. For instance, some instructions assume
that a pointer in the EBX register points to a memory location in the DS segment.
• EAX — Accumulator for operands and results data
• EBX — Pointer to data in the DS segment
• ECX — Counter for string and loop operations
• EDX — I/O pointer
• ESI — Pointer to data in the segment pointed to by the DS register; source
pointer for string operations
• EDI — Pointer to data (or destination) in the segment pointed to by the ES
register; destination pointer for string operations
• ESP — Stack pointer (in the SS segment)
• EBP — Pointer to data on the stack (in the SS segment)
As shown below the lower 16 bits of the general-purpose registers map
directly to the register set found in the 8086 and Intel 286 processors and can be
referenced with the names AX, BX, CX, DX, BP, SI, DI, and SP. Each of the lower two
bytes of the EAX, EBX, ECX, and EDX registers can be referenced by the names AH,
BH, CH, and DH (high bytes) and AL, BL, CL, and DL (low bytes).