The eight general-purpose registers are the supersets of the 8086 register. Their names and uses are: eax, which is generally used as the accumulators. EBX is generally used as the base register (base). ECx is generally used for counting (count) edX is generally used to store data. EBP is generally used as a stack pointer. EBP is generally used as a base pointer. ESI is generally used as a source index) EDI is generally used as the destination address (destinatinindex). Generally, 32-bit data is stored in eight General registers.
16 is compatible with machines. Their low part is regarded as eight 16-bit registers, that is, ax, BX... Di. In order to support 8-bit operations, the 16-bit low part of the four registers eax, EBX, ECx, and EDX are further considered, it is further divided into two parts: high byte and low byte, which are eight 8-bit registers. These eight registers are named ah, BH, CH, DH, Al, BL, Cl, and dl respectively. Operations on 8-bit or 16-bit registers only affect the corresponding registers. For example, when an 8-bit addition operation is performed, the carry of bit 7 is not transmitted to the bit of the destination register.
9, but the carry sign (CF) in the sign register is set. Therefore, these 8 General registers support both 1-bit, 8-bit, 16-bit, and 32-bit data operations, as well as 16-bit and 32-Bit Memory addressing. Segment register 8086 contains four 16-bit segment registers: CS, DS, SS, and ES, which are used to store executableCodeThe base address of the code segment, data segment, stack segment, and other segments. In 80386, there are 6 16-bit segment registers. However, these segment registers do not store the base address of a specific segment, but the selector ). Because 16-bit registers cannot be stored
The 32-bit segment base address must be stored in a table called a descriptor. Therefore, in 80386, we call the segment register a selector. The name and purpose of the six register segments are given below: CS code segment register DS data segment register SS stack segment register es, FS and GS additional data segment register