Monday, November 7, 2011

x86 general purpose registers

There are 8 GPR. Four of them can be referenced either in full 32-bit or 16-bit.

The 16-bit names are SI, DI, BP and SP. The 32-bit names are prefixed by "E" - ESI. EDI, EBP and ESP.

The other four GPR can be referenced either in 8-bit, 16-bit or 32-bit

32-bit: EAX, EBX, ECX amd EDX
16-bit: AX, BX, CX and DX
8-bit: AH, BH, CH and DH (for the upper 8-bits) and AL, BL, CL and DL (for the lower 8bits).

No comments: