Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
YLAND BA
L
1966
U M B C
AR
UMBC
mov ecx,[ebx+edi]
mov ch, [ebp+esi]
mov dl, [eax+ebx]
CMPE 310
(Feb. 9, 2002)
MO
UN
TI
RE COUNT
Y
ecx
ebx
eax
YLAND BA
L
1966
U M B C
AR
ss
ds
es
cs
esi
edi
ebp
esp
edx
IVERSITY O
F
UMBC
0 1 0 0
F 0 1 2
0 0 0 0
Seg
Base
Trans.
0 0 1 0
A B 0 3
1 0 0 0
Paging
1010H
MO
UN
TI
RE COUNT
Y
(Feb. 9, 2002)
Physical Address
F012AB03
Memory
CMPE 310
IVERSITY O
F
CMPE 310
YLAND BA
L
1966
U M B C
AR
UMBC
(Feb. 9, 2002)
Same default segment rules apply with respect to ebp, ebx, edi and esi.
Displacement constant is any 32-bit signed value.
MO
UN
TI
RE COUNT
Y
ecx
ebx
eax
YLAND BA
L
1966
U M B C
AR
ss
ds
es
cs
esi
edi
ebp
esp
edx
IVERSITY O
F
UMBC
1 0 0 0
0 0 0 0
Seg
Base
Trans.
100H
0 0 1 0
A 3 1 6
0 0 2 0
1030H
Paging
MO
UN
TI
RE COUNT
Y
(Feb. 9, 2002)
A316
Memory
CMPE 310
mov [eax+2*edi-100H], cx
YLAND BA
L
1966
U M B C
AR
UMBC
(Feb. 9, 2002)
Direct:
Absolute jump address is stored in the instruction following the
opcode.
IVERSITY O
F
CMPE 310
MO
UN
TI
RE COUNT
Y
IVERSITY O
F
1966
00
10
UMBC
(Feb. 9, 2002)
Intrasegment jumps:
Short jumps use a 1-byte signed displacement.
Near jumps use a 4-byte signed displacement.
The assembler usually computes the displacement and selects the appropriate form.
PC-Relative:
A displacement is added to the EIP register.
This constant is encoded into the instruction itself, as above.
YLAND BA
L
U M B C
AR
0000
0000
E A
Segment(low) Segment(high)
CMPE 310
This far jmp instruction loads cs with 1000H and eip with 00000000H.
A far call instruction is similar.
Offset (high)
Offset (low)
Opcode
MO
UN
TI
RE COUNT
Y
IVERSITY O
F
CMPE 310
YLAND BA
L
1966
U M B C
AR
UMBC
jmp [TABLE+ebx]
jmp [edi+2]
Register Relative:
jmp [ebx]
;Jump table.
(Feb. 9, 2002)
Register Indirect:
Intrasegment jumps can also be stored in the data segment.
jmp eax
MO
UN
TI
RE COUNT
Y
IVERSITY O
F
CMPE 310
YLAND BA
L
1966
U M B C
AR
UMBC
(Feb. 9, 2002)
MO
UN
TI
RE COUNT
Y