
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 for Hexadecimal Counter
Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to simulate the hexadecimal counter.
Problem Statement
Write 8085 Assembly language program to simulate hexadecimal counter.
Discussion
Hexadecimal counters in 8085 is similar to the binary counter. There are two different parts. The main counting part and the delay part. We have to define a delay subroutine to generate delay between each number while counting. We are considering that we have some external display which are connected through IO port, that will display the result in hexadecimal form.
Input
Here we are not providing any input.
Flow Diagram
Program
Address |
HEX Codes |
Labels |
Mnemonics |
Comments |
---|---|---|---|---|
F000 |
06, FF |
|
MVI B,FFH |
Store FF into B |
F002 |
04 |
NEXT |
INR B |
Increment B |
F003 |
0E, FF |
|
MVI C,FFH |
Store FF into C |
F005 |
0D |
DELAY |
DCR C |
Decrease C by 1 |
F006 |
C2, 05, F0 |
|
JNZ DELAY |
Delay for FF time |
F009 |
78 |
|
MOV A,B |
Load A with B |
F00A |
D3, 10 |
|
OUT 10H |
Send output to port 10 |
F00C |
C3, 02, F0 |
|
JMP NEXT |
Jump to NEXT |
Output
Counts are displaying into the output port 10.
Advertisements