Beruflich Dokumente
Kultur Dokumente
Microprocessors
Lecture 2
Levent Eren
Izmir University of Economics
Outline
Note:
32 bit registers are
not available on
8086, 8088, 80286
Instruction Components
D W
OPCODE
00 no displacement
01 8-bit sign-extended displacement
MOD REG R/M
10 16-bit displacement
11 R/M is a register (register addressing
mode)
• If the MOD filed contains a 00, 01, or 10, the R/M field selects
one of the data memory-addressing modes, e.g.,
– MOV AL, [DI] (no displacement)
– MOV AL, [DI + 2] (8-bit displacement)
000 AL AX EAX
001 CL CX ECX
010 DL DX EDX
011 BL BX EBX
100 AH SP ESP
101 CH BP EBP
110 DH SI ESI
111 BH DI EDI
• If the MOD field contains a 00, 01, or 10, the R/M field takes on
a new meaning
• Examples: Code Function
1. if MOD = 00 and R/M = 101
000 DS:[BX+SI]
the addressing mode is [DI] Base plus
001 DS:[BX+DI]
Index
2. if MOD = 01 or 10 and R/M = 101 010 SS:[BP+SI]
011 SS:[BP+DI]
the addressing mode is 100 DS:[SI]
[DI + 33h] or LIST[DI + 22H], 101 DS:[DI] Register
where 33h, LIST, 22h are arbitrary values 110 SS:[BP] indirect
for displacement 111 DS:[BX]
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 MOD is always 00
R/M is always 110
Byte 3 Byte 4
Note: MOV CS, ?? and POP CS Note that the opcode for this instruction is
are not allowed different for the prior MOV instructions