- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8085 Program to simulate decimal down counter
Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to simulate the decimal down counter.
Problem Statement:
Write 8085 Assembly language program to simulate decimal down counter.
Discussion:
In this section we are simulating the decimal down counter. Here the counter will count 100 decimal numbers from 99 to 0. All values will be updated in each 0.5 seconds. For decimal count we are using the DAA instruction.
Note: Here for simplicity we are storing the numbers into memory. To simulate it like a counter we can use 7-segment display to show the numbers
Input:
Here we are not providing any input.
Flow Diagram:
Program:
Address | HEX Codes | Labels | Mnemonics | Comments |
---|---|---|---|---|
F000 | 3E, 99 | MVI A,99H | Initialize A with 99H | |
F002 | 32, 00, 80 | LOOP | STA 8000H | Store A into 8000H |
F005 | CD, 11, F0 | CALL DELAY | Wait for 0.5 second | |
F008 | 3A, 00, 80 | LDA 8000H | Get back the data from 8000H | |
F00B | C6, 99 | ADI 99H | Add 99H with the number | |
F00D | 27 | DAA | Decimal adjust | |
F00E | C3, 02, F0 | JMP LOOP | Jump to LOOP | |
F011 | 01, FF, FF | DELAY | LXI B,FFFFH | Initialize BC register pair to FFFFH |
F014 | 0B | L1 | DCX B | Decrease BC |
F015 | 78 | MOV A,B | Take B to A | |
F016 | B1 | ORA C | OR C and E | |
F017 | C2, 13, F0 | JNZ L1 | If Z = 0, jump to L1 | |
F01A | C9 | RET | Return from subroutine |
Output:
The numbers are storing into memory location 8000H.
- Related Articles
- Program to simulate decimal down counter in 8085 Microprocessor
- 8085 Program to simulate decimal up counter
- Simulate decimal up counter in 8085 Microprocessor
- Program for decimal down counter in 8085 Microprocessor
- 8085 program for hexadecimal counter
- 8085 Program to simulate a real-time clock
- Program counter (PC) in 8085 Microprocessor
- Program to simulate a real-time clock in 8085 Microprocessor
- Decimal counter using logic controller
- Decimal addition in 8085 Microprocessor
- C program to simulate Nondeterministic Finite Automata (NFA)
- Counter Size and Counter Overflow
- 8085 Program to compute LCM
- Java Program to save decimal
- 8085 Program to Exchange 10 bytes

Advertisements