Page 44 - DCAP210_INTRODUCTION__TO_MICROPROCESSORS
P. 44
Introduction to Microprocessors
Notes 1. Data transfer (copy) operations
2. Arithmetic operations
3. Logical operations
4. Branching operations
5. Machine-control operations.
3.3.1 Data Transfer (Copy) Operations
This is one of the primary functions of the microprocessor. This group of instructions copies data
from a location called a source to another location called a destination, without modifying the
contents of the source. The source and destination may be any register, I/O or memory location.
In technical manuals, the term data transfer is used for this copying function. However, the term
transfer is misleading; it creates the impression that the contents of the source are destroyed
when, in fact, the contents are retained without any modification. The various types of data transfer
(copy) are listed below together with examples of each type:
Table 3.1: List of Data Transfer Operations
Types Examples
1. Between Registers. 1. Copy the contents of the register B
into register D.
2. Specific data byte to a register 2. Load registers B with the data byte 32H.
or a memory location.
3. Between a memory location 3. From a memory location 2000H
and a register. to register B.
4. Between an I/O device and the 4. From an input keyboard to the accumulator.
accumulator.
Table 3.2: List of Data Transfer Operations
Opcode Operand Description
MOV R , R Move (copies a data byte)
d s
(a) It is 1-byte instruction
(b) Copies data from source register R to
S
destination register R .
d
MVI R, 8-bit Move Immediate (load a data byte directly)
(a) It is a 2-byte instruction
(b) Loads the 8-bits data of the second into the
register specified.
OUT 8-bit port address Output to Port (Send a data byte to output device)
(a) It is a 2-byte instruction
(b) Copies the contents of the Accumulation (A)
to the output port specified in second byte.
Contd...
38 LOVELY PROFESSIONAL UNIVERSITY