Functions of eax, ECx, EDX, and EBX registers

Source: Internet
Author: User
Tags integer division
Note: During addition calculation, it is actually performed on a 32-bit accumulators, and pay attention to the conversion between types. Data truncation problems generally include ax, BX, CX, Dx.
Ax: cumulative latches, Bx: Base latches, CX: Count latches, DX: Data latches

Index latches: Si and Di
Si: source index storage, DI: Destination index Storage

Stack and base latches: SP and BP
SP: stacked indicator latches, BP: Base Indicator latches

Eax, ECx, EDX, and EBX: extensions of ax, BX, CX, and DX, each of which is 32 bits
ESI, EDI, ESP, and EBP: extension of Si, Di, SP, and BP, 32-bit RMB

Eax, EBX, ECx, EDX, ESI, EDI, EBP, ESP, etc. are the names of General registers on the CPU in x86 assembly language, and are 32-bit registers. These registers can be viewed as variables in C language.

For example: Add eax,-2; // it can be considered to be a value such as-2 added to the variable eax.

These 32-bit registers have multiple purposes, but each of them has "expertise" and has its own special features.

Eax is the accumulator, which is the default register of many addition multiplication commands.

EBX is a base register that stores the base address in memory addressing.

ECX is the counter and the internal counter of the repeated (REP) prefix command and loop command.

EdX is always used to place the remainder produced by integer division.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.