EI 302 Microprocessor and Microcontroller
Tutorial - 1
A. Data Transfer Group
S. No. Problem
1 Load the accumulator A with the data byte 82H (the letter H indicates
hexadecimal number), and save the data in register B.
2 Specify the contents of the registers and the flag status as the following
instructions are executed.
A B C D S Z CY
MVI A,00H
MVI B,F8H
MOV C,A
MOV D,B
HLT
3 Write instructions to load the hexadecimal number 65H in register C, and
92H in the accumulator A. Display the number 65H at PORT0. and 92H at
PORT 1.
4 Write instructions to read the data at input PORT 07H and at PORT 08H.
Display the input data from PORT 07H at output PORT OOH, and store the
input data from PORT 08H in register B.
5 Specify the output at PORT1 if the following program is executed.
MVI B,82H
MOV A,B
MOV C,A
MVI D,37H
OUT PORT1
HLT
6. Write a program to input data from port 05H and save it in register C, then
output the same data at port 06H.
7 Store the contents of accumulator (with value 56H) into memory location
2500H.
EI 302 Microprocessor and Microcontroller
8 Move the contents of register B (with data 33H) to register E and then copy
the same data to register H.
9 Exchange the contents of register pair DE with register pair HL when DE =
1234H and HL = 5678H. Write the result.
10 Assume memory location 4500H contains 5BH. Load this value into
accumulator and then output it to port 01H.