resgisters Flashcards

conceito dos registradores.

1
Q

EAX

A

All major calculations take place in EAX, making it similar to a dedicated accumulator register.
For example, all nine basic operations (ADD, ADC, AND, CMP, OR, SBB, SUB, TEST, and XOR) have special one-byte opcodes for operations between the accumulator and a constant.
Other instructions that move data in and out of the accumulator are LODS, STOS, IN, OUT, INS, OUTS, SCAS, and XLAT. Finally, the MOV instruction has a special one-byte opcode for moving data into the accumulator from a constant memory location.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EDX

A

The data register is the an extension to the accumulator. It is most useful for storing data related to the accumulator’s current calculation.
Instructions that deal with over sized data items, such as multiplication, division, CWD, and CDQ, store the most significant bits in the data register and the least significant bits in the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ECX

A

Like the variable i in high-level languages, the count register is the universal loop counter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

EDI

A

Every loop must store its result somewhere, and the destination index points to that place. With a single-byte STOS instruction to write data out of the accumulator, this register makes data operations much more size-efficient.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

ESI

A

In loops that process data, the source index holds the location of the input data stream. Like the destination index, EDI has a convenient one-byte instruction for loading data out of memory into the accumulator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ESP

A

ESP is the sacred stack pointer. With the important PUSH, POP, CALL, and RET instructions requiring it’s value, there is never a good reason to use the stack pointer for anything else.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

EBP

A

In functions that store parameters or variables on the stack, the base pointer holds the location of the current stack frame. In other situations, however, EBP is a free data-storage register.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

EBX

A

In 16-bit mode, the base register was useful as a pointer. Now it is completely free for extra storage space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly