Appendix C: RegMem Mapping

This appendix maps the addressing methods for memory load/save, jump table lookup, and call table lookup.

The same kind of memory reference that is used to access a memory table or array can also be used to access a jump vector. Almost any register can be used alone, in a pair addition, and with an optional base address and/or scale factor of {2, 4, or 8}, but you will note that there are some limitations in regard to the ESP register.

(Real Mode Near or far is same opcodes)

(Protected Mode Near or far is same opcodes)

 jmp ...  jmp NearAdrPtr[...] 

eax

ebx

ecx

edx

esp

ebp

esi

edi

ax

bx

cx

dx

sp

bp

si

di

(Real Mode Near or far is same opcodes) (Protected Mode Near or far is same opcodes)

 jmp word ptr [...] jmp dword ptr [...] jmp fword ptr [...] jmp NearAdrPtr[...] 

eax

ebx

ecx

edx

esp

ebp

esi

edi

eax+eax

eax+ebx

eax+ecx

eax+edx

eax+esp

eax+ebp

eax+esi

eax+edi

ebx+eax

ebx+ebx

ebx+ecx

ebx+edx

ebx+esp

ebx+ebp

ebx+esi

ebx+edi

ecx+eax

ecx+ebx

ecx+ecx

ecx+edx

ecx+esp

ecx+ebp

ecx+esi

ecx+edi

edx+eax

edx+ebx

edx+ecx

edx+edx

edx+esp

edx+ebp

edx+esi

edx+edi

esp+eax

esp+ebx

esp+ecx

esp+edx

-

esp+ebp

esp+esi

esp+edi

ebp+eax

ebp+ebx

ebp+ecx

ebp+edx

ebp+esp

ebp+ebp

ebp+esi

ebp+edi

esi+eax

esi+ebx

esi+ecx

esi+edx

esi+esp

esi+ebp

esi+esi

esi+edi

edi+eax

edi+ebx

edi+ecx

edi+edx

edi+esp

edi+ebp

edi+esi

edi+edi

eax*2

ebx*2

ecx*2

edx*2

-

ebp*2

esi*2

edi*2

eax+eax*2

eax+ebx*2

eax+ecx*2

eax+edx*2

-

eax+ebp*2

eax+esi*2

eax+edi*2

ebx+eax*2

ebx+ebx*2

ebx+ecx*2

ebx+edx*2

-

ebx+ebp*2

ebx+esi*2

ebx+edi*2

ecx+eax*2

ecx+ebx*2

ecx+ecx*2

ecx+edx*2

-

ecx+ebp*2

ecx+esi*2

ecx+edi*2

edx+eax*2

edx+ebx*2

edx+ecx*2

edx+edx*2

-

edx+ebp*2

edx+esi*2

edx+edi*2

esp+eax*2

esp+ebx*2

esp+ecx*2

esp+edx*2

-

esp+ebp*2

esp+esi*2

esp+edi*2

ebp+eax*2

ebp+ebx*2

ebp+ecx*2

ebp+edx*2

-

ebp+ebp*2

ebp+esi*2

ebp+edi*2

esi+eax*2

esi+ebx*2

esi+ecx*2

esi+edx*2

-

esi+ebp*2

esi+esi*2

esi+edi*2

edi+eax*2

edi+ebx*2

edi+ecx*2

edi+edx*2

-

edi+ebp*2

edi+esi*2

edi+edi*2

eax*4

ebx*4

ecx*4

edx*4

-

ebp*4

esi*4

edi*4

eax+eax*4

eax+ebx*4

eax+ecx*4

eax+edx*4

-

eax+ebp*4

eax+esi*4

eax+edi*4

ebx+eax*4

ebx+ebx*4

ebx+ecx*4

ebx+edx*4

-

ebx+ebp*4

ebx+esi*4

ebx+edi*4

ecx+eax*4

ecx+ebx*4

ecx+ecx*4

ecx+edx*4

-

ecx+ebp*4

ecx+esi*4

ecx+edi*4

edx+eax*4

edx+ebx*4

edx+ecx*4

edx+edx*4

-

edx+ebp*4

edx+esi*4

edx+edi*4

esp+eax*4

esp+ebx*4

esp+ecx*4

esp+edx*4

-

esp+ebp*4

esp+esi*4

esp+edi*4

ebp+eax*4

ebp+ebx*4

ebp+ecx*4

ebp+edx*4

-

ebp+ebp*4

ebp+esi*4

ebp+edi*4

esi+eax*4

esi+ebx*4

esi+ecx*4

esi+edx*4

-

esi+ebp*4

esi+esi*4

esi+edi*4

edi+eax*4

edi+ebx*4

edi+ecx*4

edi+edx*4

-

edi+ebp*4

edi+esi*4

edi+edi*4

eax*8

ebx*8

ecx*8

edx*8

-

ebp*8

esi*8

edi*8

eax+eax*8

eax+ebx*8

eax+ecx*8

eax+edx*8

-

eax+ebp*8

eax+esi*8

eax+edi*8

ebx+eax*8

ebx+ebx*8

ebx+ecx*8

ebx+edx*8

-

ebx+ebp*8

ebx+esi*8

ebx+edi*8

ecx+eax*8

ecx+ebx*8

ecx+ecx*8

ecx+edx*8

-

ecx+ebp*8

ecx+esi*8

ecx+edi*8

edx+eax*8

edx+ebx*8

edx+ecx*8

edx+edx*8

-

edx+ebp*8

edx+esi*8

edx+edi*8

esp+eax*8

esp+ebx*8

esp+ecx*8

esp+edx*8

-

esp+ebp*8

esp+esi*8

esp+edi*8

ebp+eax*8

ebp+ebx*8

ebp+ecx*8

ebp+edx*8

-

ebp+ebp*8

ebp+esi*8

ebp+edi*8

esi+eax*8

esi+ebx*8

esi+ecx*8

esi+edx*8

-

esi+ebp*8

esi+esi*8

esi+edi*8

edi+eax*8

edi+ebx*8

edi+ecx*8

edi+edx*8

-

edi+ebp*8

edi+esi*8

edi+edi*8



32.64-Bit 80X86 Assembly Language Architecture
32/64-Bit 80x86 Assembly Language Architecture
ISBN: 1598220020
EAN: 2147483647
Year: 2003
Pages: 191

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net