Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Experiment Title.

Student Name:Ashish kumar UID:19BCS2288


Branch:BE CSE Section/Group:10/C
Semester:4th Date of Performance:26/04/2021
Subject Name:MPI Lab Subject Code:CSP-277

1. Aim/Overview of the practical:

a)Find the smaller out of two numbers.

b) Find the larger out of two numbers.

2. Task to be done:
Finding the smaller as well as larger out of two numbers.

3. Apparatus/Simulator used (For applied/experimental sciences/materials based labs):

8085 Simulator
4. Description/ Code/Theory:
This program compares the two operands to find the largest out of them.

·        After comparison, the largest of two must be in accumulator. If it is already in accumulator, then it is moved to
memory.

·        If it is not in accumulator, then first it is moved to accumulator and then from there, it is moved to memory.

·        Let us assume that the operands stored at memory location 3000H is 25H and 3001H is 15H.

·        Initially, H-L pair is loaded with the address of first memory location.

·        The first operand is moved to accumulator from memory location 3000H and H-L pair is incremented to point to
next memory location.

·        The second operand is moved to register B from memory location 3001H.

·        The two operands are compared.

·        After comparison, if A > B, then CF = 0, and if A < B, then CF = 1.

·        Carry flag is checked for carry. If there is a carry, it means B is greater than A and it is moved to accumulator.

·        At last, H-L pair is incremented and the largest number is moved from accumulator to memory location 3002H.
Code:
a)
b)

6. Result/Output/Writing Summary:

We calculated the Finding the smaller as well as larger out of two numbers.

Learning outcomes (What I have learnt):

1. Learned about 8085 simulator.

2.Learned about the mnemonics performed.


Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1.
2.
3.

You might also like