0% found this document useful (0 votes)
8 views

Experiment 3

The document outlines a laboratory experiment for S Y Btech students focusing on writing an 8085 assembly language program to multiply two 8-bit numbers using repetitive addition or the shift and add method. It includes the necessary requirements, algorithms, and sample assembly code for the program, along with expected outputs and flowcharts. The document is authored by Vaishali Turukmane.

Uploaded by

Yash Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Experiment 3

The document outlines a laboratory experiment for S Y Btech students focusing on writing an 8085 assembly language program to multiply two 8-bit numbers using repetitive addition or the shift and add method. It includes the necessary requirements, algorithms, and sample assembly code for the program, along with expected outputs and flowcharts. The document is authored by Vaishali Turukmane.

Uploaded by

Yash Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Microprocessor and Microcontroller Lab

Registration Number: Date


S Y Btech Group Batch

EXPERIMENT NO. 1

AIM –

To write an 8085 assembly language program to multiply 2 8bit numbers(repetitive addition/ shift
and add method) stored in consecutive memory locations and save the result in subsequent memory
locations.

REQUIRMENTRS –

▪ 8085 Microprocessor Training Kit


▪ 8085 Microprocessor Instruction Table – Hex Code(Opcode) and Mnemonics

ALGORITHM 1-

1. LHLD loads content of in H and contents of in L


2. XCHG exchanges contents of H with D and contents of L with E.
3. MOV C, D copies content of D in C
4. MVI D 00 assigns 00 to D
5. LXI H 0000 assigns 00 to H and 00 to L
6. DAD D adds HL and DE and assigns the result to HL
7. DCR C decrements C by 1
8. JNZ jumps program counter to if counter is not zero
9. SHLD stores value of H at memory location and L at
10. HLT stops executing the program and halts any further execution
11. Stop

PROGRAM 1 –

Address Assembly Code Opcode Comment


10

OUTPUT –

Memory Location Data


Multiplicand
Multiplier
Result
FLOWCHART –

ALGORITHM 2-

1. LXI H, H will load the HL pair register with the address H of memory location.
2. MOV E, M copies the content of memory into register E.
3. MVI D, 00H clears the register D.
4. INX H points to the next location.
5. MOV A, M get the next operand.
6. LXI H, 0000H clears the HL pair.

Vaishali Turukmane
11

7. MVI B, 08H initializes the counter with 08H


8. DAD H adds the HL with HL itself.
9. RAL rotates the Accumulator contents to the left by 1-bit position.
10. JNC H jumps to the address H if and only if the present carry flag value is 0.
11. DAD D adds DE with HL.
12. DCR B decreases the content of register B.
13. JNZ H jumps to the address H if the value in accumulator is not zero.
14. SHLD stores the result.

PROGRAM 2-

Address Assembly Code Opcode Comment

Vaishali Turukmane
12

OUTPUT –

Memory Location Data


Multiplicand
Multiplier
Result

FLOWCHART –

CONCLUSION –

Vaishali Turukmane

You might also like