Question Bank From Unit-I and Unit-II Microprocessor and Microcontroller Addressing Modes
Question Bank From Unit-I and Unit-II Microprocessor and Microcontroller Addressing Modes
Addressing Modes
(ii) Register indirect addressing mode: In this addressing mode the offset address of the data is
in any one of the register (base register or index register) BX, BP, SI OR DI.
Four forms of this addressing mode are:
(a) MOV AL, [BX]
(b) MOV AL, [BP]
(c) MOV AL, [SI]
(d) MOV AL, [DI]
Please note:
If the offset address is in [BP] then default segment of data is SS.
If the offset address is in [BX], [SI] and [DI] then the default segment of data is DS.
We can use segment override prefix symbol if we wish to access data in different segment.
For example:
(iii) Immediate addressing mode: In this the immediate data is a part of instruction and appear
in the form of successive byte or bytes.
For examples:
(a) MOV AX, 3456H
(b) MOV BL, 56H
Please note:
Segement registers can not be used as destination in immediate addressing mode.
(iv) Direct addressing mode: In this offset address of the data is given in the instruction.
For example:
(a) MOV AL, [4568H]
In above instruction offset address of 8 bit data will be stored in AL is [4568H]. The default segment
of data is DS.
(b) MOV AX, [4000H]
In above instruction 8 bit data of offset address [4000H] will be stored in AL and 8 bit data at offset
address [4001H] will be stored in AH. The default segment of data is DS.
Please note:
We can use segment override prefix symbol if we wish to access data in different segment.
For example:
MOV AL, SS: [4000].
In above example data will be accessed from SS segment instead of default segment DS.
(v) Base Index Addressing Mode: In this addressing mode the offset address of the data is calculated
using base register (BX and BP) and index register (SI and DI).
Four forms of this addressing mode are:
(vi) Relative Base Index Addressing Mode: In this addressing mode the offset address of the data is
calculated using 8-bit/16-bit relative value, base register (BX and BP) and index register (SI and DI).
Four forms of this addressing mode are:
(a) MOV AL, 8-bit/16-bit relative value [BX][[SI] ; offset address of data is [8-bit/16-bit relative value
+ BX + SI]
(b) MOV AL, 8-bit/16-bit relative value [BX][DI] ; offset address of data is [8-bit/16-bit relative value
+ BX + DI]
(c) MOV AL, 8-bit/16-bit relative value [BP][SI] ; offset address of data is [8-bit/16-bit relative value +
BP + SI]
(d) MOV AL, 8-bit/16-bit relative value [BP][DI] ; offset address of data is [8-bit/16-bit relative value
+ BP + DI]
Please note:
• If the base register BX is involved in an instruction then the default segment of data
is DS.
• If the base register BP is involved in an instruction then the default segment of data
is SS.
For example:
MOV AL, 34H[BX][SI].
In above example data will be accessed from DS segment and offset address of data is [34H + BX +
SI].