Lab Manual 5 Semester Experiment No.02 Addressing Modes and Data Transfer Instructions
Lab Manual 5 Semester Experiment No.02 Addressing Modes and Data Transfer Instructions
(CS-342)
EXPERIMENT NO.02
Objectives:
To know about addressing modes
Types of modes
Introduction:
Register Addressing:
In this type of addressing we move data from one register to another register directly. Like as MOV
AX, BX
In this example data is moving from ‘BX’ to ‘AX’ Ax is called destination and BX is called Source. In
this source and destination both are register so this is called Register Addressing.
Immediate Addressing:
In this type of addressing Destination can be a register or any other memory but Source will be a direct
number (Data) Like As MOV CX, 50h In this example a number 50H is moving into CX directly.
Register Direct Addressing:
This type transfers a byte or a word between a memory location memory location and a register. The
memory address of the data is stored with the instruction (e.g., MOV AX, List takes 16 bit contents of
the memory address List and moves them into register AX).
Register Indirect Addressing:
In this type of addressing we transfer a byte or a word between a register and a memory location
addressed by a register (e.g., MOV AX, [BX] moves the 16 bits contents of the memory location
addressed by the BX register into register AX).
Base plus Index Addressing:
This is also type of addressing a byte or a word between a register and the memory location indicated
by the sum of a base register and an index register (e.g., MOV AX, [BX+SI] moves the 16 bits
contents of the address indexed by the sum of BX+SI into register AX).
REVIEW QUESTIONS
Question 1: Write a program that stores any two hex numbers in memory and transfer them to any two
registers.
Question 2: Write a short program using modes that address information in data segment.
(Hint: allocate memory location in the data segment using DB and DW directive)