General purpose register

  
 

The eight general-purpose registers are supersets of the 8086 registers. Their names and uses are:

EAX is generally used as an accumulator

EBX is generally used as a base register (Base)

ECX is generally used to count (Count)

EDX is generally used to store data (Data)

EBP is generally used as a stack pointer (Stack Pointer)

EBP is generally used as a base pointer (Base Pointer)

ESI is generally used as a source index (Source Index)

EDI is generally used as a target index (Destinatin Index)

8 general-purpose registers usually hold 32-bit data, but in order to perform 16-bit operations and remain compatible with 16 machines, their lower part is treated as eight 16-bit registers, namely AX, BX… DI. In order to support the 8-bit operation, the 16 bits of the lower part of the four registers EAX, EBX, ECX, and EDX are further divided into two parts: the upper byte and the lower byte of the 8-bit group, as eight 8-bits. register. These eight registers are named AH, BH, CH, DH and AL, BL, CL, DL, respectively. Operation of 8-bit or 16-bit registers only affects the corresponding registers. For example, when doing an 8-bit addition, the carry of bit 7 is not passed to bit 9 of the destination register, but the carry flag (CF) in the flag register is set. Therefore, these eight general-purpose registers can support 1-bit, 8-bit, 16-bit, and 32-bit data operations as well as 16-bit and 32-bit memory addressing.

Copyright © Windows knowledge All Rights Reserved