Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Addressing Modes
Instruction Format
1 byte
2 byte
3 byte
MOV 43H[SI], DH
4 byte
MOV AH,[2000]
5 byte
6 byte
Instruction Format
Mod/Displacement
00 - If r/m is 110, Displacement (16 bits) is address; otherwise, no
displacement
01 - Eight-bit displacement, sign-extended to 16 bits
10 -16-bit displacement (example: MOV [BX + SI]+ displacement,al)
11 - r/m is treated as a second "reg" field
r/m
Operand address
000
001
010
011
100
101
110
111
Addressing Modes
1.
Immediate Addressing
1.
This is when a constant value is moved into a register or
memory location.
2.
It is not really an address since it does not point to any
location within the memory or CPU.
3.
Immediate addressing can only be used for the source since
immediate values are not themselves stored anywhere; during
assembly of the program, the immediate value becomes part
of the machine code instruction.
4.
example: mov ax,10h
2. Register Addressing
1.
A register can be used as both the source and destination of
the instruction.
2.
Registers are very fast for most operations so maximum use
must be made thereof.
3.
Examples:
mov ax,bx
mov ax,10h
mov si,es:[bx]