Register | Purpose |
---|---|
ECX | Counter in loops |
ESI | Source in string/memory operations |
EDI | Destination in string/memory operations |
EBP | Base frame pointer |
ESP | Stack pointer |
Data type | Number of bytes | examples |
---|---|---|
Bytes | 8 bits | AL, BL, CL |
Word | 16 bits | AX, BX, CX |
Double word | 32 bits | EAX, EBX, ECX |
Quad word | 64 bits | EDX:EAX (combined registers) |
The x86 instruction set allows a high level of flexibility in terms of data movement between registers and memory. The movement can be classified into five general methods: • Immediate to register • Register to register • Immediate to memory • Register to memory and vice versa • Memory to memory
x86 uses square brackets ([]) to indicate memory access. (The only exception to this is the LEA instruction, which uses [] but does not actually reference memory.)