x86 Registers Flashcards

1
Q

EAX

A

Accumulator; volatile (special); stores return value of functions; used w/ EDX in some mathematical calculations (mult/div)

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

EBX

A

Base; non-volatile; no specific use; sometimes set to value (e.g. 0) throughout function to speed up calculations

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

ECX

A

Counter; volatile; used to control loops; when calling a class, ECX is a pointer to the class; w/ EDX acts as first 2 parameters for “_fastcall” convention

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

EDX

A

Data; volatile; stores function variables; used w/ EAX for mutl/div; w/ ECX acts as first 2 parameters for “_fastcall” convention

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

ESI

A

Source Index; non-volatile; holds pointer to read location; counterpart w/ EDI

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

EDI

A

Destination Index; non-volatile; stores storage pointers of functions (write locations)

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

EBP

A

Base Pointer; base of stack (frame pointer); used to reference variables by offset from EBP

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

ESP

A

Stack Pointer; non-volatile; top of stack; items pushed/popped increment/decrement ESP

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

EIP

A

Instruction Pointer; not a GPR; points to memory address of next instruction to be executied

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