The role of different registers

EAX- the main register used for arithmetic calculations, also known as the accumulator, because it returns the result of arithmetic operations and function return values.

EBX-base address register. The pointer to the data in the DS segment is a program used to store the base address.

The ECX-count register is usually used to store a value representing the number of processes. Used for loop and string operations.

EDX-General Purpose Register. Also used for I/O operations. Help extend EAX to 64-bit

ESI-source index register, a pointer to the data in the segment pointed to by the IDS register. Used as the offset address in string and array operations. He saves the address from which the data is read.

EDI-target indexer. The ES register that points to the data (or target) pointed to by the data segment. Used as an offset address in string and array operations. It implies the write address of all string operations.

KBP-Basic pointer. Pointer to data on the stack (in the SS segment). It points to the bottom of the current stack frame. It is used to refer to local variables.

ESP-stack pointer (in the SS segment), it points to the top of the current stack. Used to reference local variables

EIP-instruction pointer (save the address of the next instruction to be executed)

Guess you like

Origin blog.csdn.net/LvanFu/article/details/108477244