Addressing_modes
Addressing_modes
•Sequential control flow instructions are the instructions which after execution, transfer
control to the next instruction appearing immediately after it in the program.
•For example, the arithmetic, logical, data transfer and processor control instructions are
sequential control flow instructions.
•The control transfer instructions, on the other hand , transfer control to some predefined
address or the address somehow specified in the instruction, after their execution.
•For example INT, CALL, RET and JUMP instructions fall under this category
•The addressing modes for sequential and control transfer instructions are explained as
follows.
1 Immediate:
•In this type of addressing, immediate data is a part of instruction, and appears in the
form of successive byte or bytes
• Eg: MOV AX, 0005H
2 Direct:
•In the direct addressing mode, a 16-bit memory address (offset) is directly specified in
the instruction as a part of it.
• Eg: MOV AX,[5000H],
–Effective address= 10H*DS +5000H
3 Register:
•In the register addressing mode, the data is stored in a register and it is referred using
the particular register
4 Register Indirect:
• Sometimes, the address of the memory location which contains data or operand is
determined in an indirect way, using the offset registers.
•This mode of addressing is known as register indirect mode
•In this addressing mode, the offset address of data is in either BX or SI or DI register.
•The default segment is either DS or ES. The data is supposed to be available at the
address pointed to by the content of any of the above registers in the default data
segment.
• Eg: MOV AX,[BX]
–Effective address is 10H*DS+[BX]
5 Indexed:
•In this addressing mode, offset of the operand is stored in one of the Index registers.
• DS is the default segment for index registers SI and DI
•In the case of string instructions DS and ES are default segments for SI and DI
respectively.
•This mode is a special case of the above discussed register indirect addressing mode
• Eg: MOV AX,[SI]
–effective address is 10H*DS+[SI]
6 Register Relative:
•In this addressing mode, the data is available at an effective address formed by adding
an 8-bit or 16-bit displacement with the content of any one of the registers BX, BP, SI
and DI in the default (either DS or ES) segment.
7 Based Indexed:
•The effective address of the data is formed, in this addressing mode, by adding the
content of a base register (any one of BX or BP) to the content of an index register (any
one of SI or DI)
•The default segment register may be DS or ES
–Eg: MOV AX,[BX][SI]
• effective address is 10H*DS +[BX]+[SI]