SIB byte (32/64-bit addressing)

From Asmpedia

Jump to: navigation, search

SIB byte - Scale (bits 6-7) Index (bits 3-5) Base (bits 0-2)

scale=00 EAX/RAX
base=000
ECX/RCX
base=001
EDX/RDX
base=010
EBX/RBX
base=011
ESP/RSP
base=100
Mod*
base=101
ESI/RSI
base=110
EDI/RDI
base=111
[EAX/RAX]
index=000
00 01 02 03 04 05 06 07
[ECX/RCX]
index=001
08 09 0A 0B 0C 0D 0E 0F
[EDX/RDX]
index=010
10 11 12 13 14 15 16 17
[EBX/RBX]
index=011
18 19 1A 1B 1C 1D 1E 1F
none
index=100
20 21 22 23 24 25 26 27
[EBP/RBP]
index=101
28 29 2A 2B 2C 2D 2E 2F
[ESI/RSI]
index=110
30 31 32 33 34 35 36 37
[EDI/RDI]
index=111
38 39 3A 3B 3C 3D 3E 3F

scale=01 EAX/RAX
base=000
ECX/RCX
base=001
EDX/RDX
base=010
EBX/RBX
base=011
ESP/RSP
base=100
Mod*
base=101
ESI/RSI
base=110
EDI/RDI
base=111
[EAX/RAX*2]
index=000
40 41 42 43 44 45 46 47
[ECX/RCX*2]
index=001
48 49 4A 4B 4C 4D 4E 4F
[EDX/RDX*2]
index=010
50 51 52 53 54 55 56 57
[EBX/RBX*2]
index=011
58 59 5A 5B 5C 5D 5E 5F
none
index=100
60 61 62 63 64 65 66 67
[EBP/RBP*2]
index=101
68 69 6A 6B 6C 6D 6E 6F
[ESI/RSI*2]
index=110
70 71 72 73 74 75 76 77
[EDI/RDI*2]
index=111
78 79 7A 7B 7C 7D 7E 7F

scale=10 EAX/RAX
base=000
ECX/RCX
base=001
EDX/RDX
base=010
EBX/RBX
base=011
ESP/RSP
base=100
Mod*
base=101
ESI/RSI
base=110
EDI/RDI
base=111
[EAX/RAX*4]
index=000
80 81 82 83 84 85 86 87
[ECX/RCX*4]
index=001
88 89 8A 8B 8C 8D 8E 8F
[EDX/RDX*4]
index=010
90 91 92 93 94 95 96 97
[EBX/RBX*4]
index=011
98 99 9A 9B 9C 9D 9E 9F
none
index=100
A0 A1 A2 A3 A4 A5 A6 A7
[EBP/RBP*4]
index=101
A8 A9 AA AB AC AD AE AF
[ESI/RSI*4]
index=110
B0 B1 B2 B3 B4 B5 B6 B7
[EDI/RDI*4]
index=111
B8 B9 BA BB BC BD BE BF

Mod*

Mod EA (effective address)
00 [Index*Scale+disp32]
01 [EBP/RBP+Index*Scale+disp8]
10 [EBP/RBP+Index*Scale+disp32]
Personal tools