x86 Registers Flashcards
EAX
Accumulator; volatile (special); stores return value of functions; used w/ EDX in some mathematical calculations (mult/div)
EBX
Base; non-volatile; no specific use; sometimes set to value (e.g. 0) throughout function to speed up calculations
ECX
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
EDX
Data; volatile; stores function variables; used w/ EAX for mutl/div; w/ ECX acts as first 2 parameters for “_fastcall” convention
ESI
Source Index; non-volatile; holds pointer to read location; counterpart w/ EDI
EDI
Destination Index; non-volatile; stores storage pointers of functions (write locations)
EBP
Base Pointer; base of stack (frame pointer); used to reference variables by offset from EBP
ESP
Stack Pointer; non-volatile; top of stack; items pushed/popped increment/decrement ESP
EIP
Instruction Pointer; not a GPR; points to memory address of next instruction to be executied