LIAQUAT UNIVERSITY OF MEDICAL HEALTH & SCIENCES JAMSHORO
INSTITUTE OF BIO MEDICAL TECHNOLOGY
BS IN BIO-MEDICAL Engineering (5th Term 3rd Year) _________ Batch
LAB. EXPERIMENT # 08
Name: __________________________________ Roll No. _______________
Score: _____________ Signature of Teacher: __________________ Date:___________
LOGICAL COMPLIMENT OPERATION IN 8085 MICROPROCESSOR ASSEMBLY
LANGUAGE FOR MAT-980 TRAINER
PERFORMANCE OBJECTIVE:
Upon successful completion of this experiment the student will be able to:
Develop a program for ones compliment operation in 8085 Microprocessor Assembly
language for the following requirements:
Logically compliment the contents of memory location 5000H and store result at
memory location 5001H.
Write and run program on MAT980.
EQUIPEMENT:
Feedback Microprocessor Application Trainer Mica master MAT-980.
Feedback power supply 01-100,
Connecting leads.
NOTE:
The power supply requirements of the MAT980 with no connected equipment is
+5V 0.25V D.C at 400mA
Before switch on your trainer please get it checked by the teacher.
DISCUSSION:
Logical complement (NOT) instructions typically work on a bit by bit basis, although some
processors use the entire contents of the operand as whole flags (zero or not zero input, zero or
negative one output)
NOT instruction is used to reverses the all bits of numbers from different locations such as
register, memory location or immediate data and result is stored in register. NOT instruction can
be explained by the following graphical way.
STATEMENT:
Develop a program to logically complement the contents of memory location 5000H and store
result at memory location 5001H.
DATA:
5000H = 6A
5001H = Result
GRAPHICAL REPRESENTATION:
Accumulator A
CMA
PROGRAM:
MACHINE ASSEMBLY
LANGUAGE PROGRAM LANGUAGE PROGRAM
ADDRESS CONTENTS MNEMONICS OPERANDS
4800 21 LXI H , 5000H
4801 00
4802 50
4803 7E MOV A , M
4804 2F CMA
4805 32 STA 5001H
4806 01
4807 50
4808 76 HLT
6A
CMA
95
PROCEDURE:
1. Turn on the power supply for the MAT 980.
2. Press HALT key to exit from main function.
3. Write data at memory locations through MEM key.
4. Write a program at memory locations 4800H through MEM key.
5. Use SST key to execute program step by step with + key.
6. Use REG and of different registers at each instruction execution.
7. Use MEM key to view the result at memory location 5001H.
TEST RESULTS:
(i) Fill the observation table #1 for the CMA program at the end of execution.
(ii) By varying the immediate data in register such as Register A = DF, what will be the
contents of accumulator after CMA program.
Accumulator
TABLES:
For CMA operation
Register / Memory location Contents
Accumulator A
MEM 5001H
Table #01
REVIEW QUESTIONS:
1. What is the purpose of CMA instruction?
____________________________________________________________________
____________________________________________________________________
2. At which location complement result will be stored?
____________________________________________________________________
____________________________________________________________________
3. What is the purpose of STA 5001H instruction?
____________________________________________________________________
____________________________________________________________________
4. Which addressing mode is used for MOV A , M instruction?
____________________________________________________________________
____________________________________________________________________
FINAL CHECK LIST:
1. Clean your equipment/material and workbench before you leave.
2. Return all equipment and material to their proper storage area.
3. Submit your answers to questions, together with your data, calculations and result before
the next laboratory.