MPI Lab Manual 8
MPI Lab Manual 8
Experiment No - 8
Aim: (A) Write an assembly language program to reverse the block of 8-bit data using stack in
8085 simulator.
(B) Write an assembly language program for decade counter with 1 ms delay between two
successive counts using 8085 simulator.
Date: 02/04/2025
Program:
(A) Program to reverse the block of 8-bit data using stack in 8085 simulator.
Addres
Label Mnemonics Hex Code Comments
s
0000H LXI H, 2050H 21 50 20 Load source address into HL
0003H MOV C, M 4E Move count from memory to register C
0004H INX H 23 Point to first data byte
30
Microprocessor and Interfacing (3160712) 230213107009
000BH DCR C 0D Decrement count
(B) Program for decade counter with 1 ms delay between two successive counts using
8085 simulator
Input : C : 09H
Observations:
In Program A, stack operations were successfully used to reverse a block of 8-bit data. Each byte
from memory was pushed onto the stack and then popped into another memory location in reverse
order, confirming correct use of stack in 8085.
In Program B, the decade counter output from 9 to 0 was observed on port 01H with
31
Microprocessor and Interfacing (3160712) 230213107009
approximately 1 ms delay using an 8-bit register for delay timing. The use of subroutine provided
a clean and reusable delay mechanism.
Conclusion:
Program A Conclusion: Stack operations in 8085 can be effectively used to reverse a sequence of
data in memory. This exercise demonstrated practical application of LIFO behavior of the stack.
Program B Conclusion: Delay subroutines allow time-controlled execution in microprocessor
programs. Counting from 9 to 0 with a 1 ms delay between steps was achieved using minimal
registers, demonstrating efficient timing control.
Quiz:
(1) What is the use of NOP instruction in 8085 microprocessors?
Ans: It performs no operation and is used for timing or instruction alignment.
Suggested Reference:
https://www.geeksforgeeks.org/
Problem Completeness
Knowledge Logic
Recognition and accuracy Ethics (2)
Rubrics (2) Building (2) Total
(2) (2)
Good Average Good Average Good Average Good Average Good Average
(2) (1) (2) (1) (2) (1) (2) (1) (2) (1)
Marks
32