Registers Flashcards

(15 cards)

1
Q

EAX

A

The Accumulator Register; Addition and Subtraction

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

EBX

A

Base Register; No specific purpose, used for storage

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

ECX

A

Counter Register: As its name implies, the counter (or count) register is frequently used as a loop and function repetition counter, though it can also be used to store any data. Like EAX, it can be referenced in whole (ECX) or in part (CX, CH, CL).

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

EDX

A

Data Register: EDX is kind of like a partner register to EAX. It’s often used in mathematical operations like division and multiplication to deal with overflow where the most significant bits would be stored in EDX and the least significant in EAX. It is also commonly used for storing function variables. Like EAX, it can be referenced in whole (EDX) or in part (DX, DH, DL).

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

ESI

A

The counterpart to EDI, ESI is often used to store the pointer to a read location. For example, if a function is designed to read a string, ESI would hold the pointer to the location of that string.

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

EDI

A

Destination Index; can be (and is) used for general data storage, EDI was primarily designed to store the storage pointers of functions, such as the write address of a string operation.

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

EBP

A

Base Pointer; Track base/bottom of the stack, often used to reference variables located on the stack by using an offset to the current value of EBP

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

ESP

A

Stack Pointer; Tracks the top of the stack

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

EIP

A

Points to the memory address of the next instruction to be executed by the CPU.

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

ADD/SUB

A

add or subtract two operands, storing the result in the first operand. These can be registers, memory locations (limit of one) or constants. For example, ADD EAX, 10 means add 10 to the value of EAX and store the result in EAX

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

XOR

A

Performing an ‘exclusive or’ of a register with itself sets its value to zero; an easy way of clearing the contents of a register

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

INC/DEC op1

A

increment or decrement the value of the operand by one

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

CMP op1, op2

A

compare the value of two operands (register/memory address/constant) and set the appropriate EFLAGS value.

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

VALUE vs [VALUE]

A

When you see a value in brackets such as ADD DWORD PTR [X] or MOV eax, [ebx] it is referring to the value stored at memory address X. In other words, EBX refers to the contents of EBX whereas [EBX] refers to the value stored at the memory address in EBX

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

DWORD

A

4 bytes

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