- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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 for running light with delays using lookup table.
Here we will see how we can implement running light with some delays using 8085.
Problem Statement
Write 8085 program to implement running light display with appropriate delays using lookup table stored from memory location 8100H on words.
Discussion
The patterns are stored at location 8100 onwards. We are using 8255 port IC to display the content in LED displays. After displaying, it calls the delay to wait for some time and call the next byte from memory to display. So the display pattern will be like below -
Program
Address | HEX Codes | Labels | Mnemonics | Comments |
---|---|---|---|---|
8000 | 31, 00, 82 | START: | LXI SP, 8200 H | Initializing the SP |
8003 | 0E, 15 | | MVI C, 14 H | Initializing the counter |
8005 | 21, 00, 81 | | LXI H, 8100 H | Pointing to the pattern IN-BUFFER |
8008 | 3E, 99 | | MVI A, CW | Load the CW in the accumulator |
800A | D3, 43 | | OUT 43 H | Output the CW to control register |
800C | 7E | AGAIN: | MOV A, M | Read pattern byte |
800D | D3, 41 | | OUT 41 H | Out at port B |
800F | CD, 20, 80 | | CALL DELAY | Calling the delay sub-routine |
8012 | 2C | | INR L | Pointing to the next location |
8013 | 0D | | DCR C | Decrement the counter |
8014 | C2, 0C, 80 | | JNZ AGAIN | If not exhausted go again |
8017 | 76 | | HLT | Stop |
8020 | C5 | DELAY: | PUSH B | Saving B. This delay subroutine uses 2 single registers A & D and 1 register pair BC |
8021 | F5 | | PUSH PSW | Saving PSW |
8022 | 16, 0F | | MVI D, 0F H | Loading counter for outer loop |
8024 | 01, 00, 10 | ST: | LXI B, 1000 H | Loading counter for inner loop |
8027 | 0B | L: | DCX B | Decrement inner counter |
8028 | 79 | | MOV A, C | If not exhausted go again for inner loop |
8029 | B0 | | ORA B | |
802A | C2, 27, 80 | | JNZ L | |
802D | 15 | | DCR D | Decrement outer counter |
802E | C2, 24, 80 | | JNZ ST | If not exhausted go again for outer loop |
8031 | F1 | | POP PSW | Restore PSW |
8032 | C1 | | POP B | Restore B |
8033 | C9 | | RET | Return to the calling program |
- Related Articles
- C++ program to implement ASCII lookup table
- Running 8085 program in single-step mode
- Running the entire 8085 program in a single operation
- 8085 Program to find Square of a number using look up table
- 8085 program for bubble sort
- 8085 program for Binary search
- 8085 program for hexadecimal counter
- 8085 program for pulse waveform
- Java Program to Lookup enum by String value
- Golang Program to Lookup enum by String value
- 8085 Program to check for palindrome
- 8085 program to print the table of input integer
- What is "Argument-Dependent Lookup" ("Koenig Lookup") in C++?
- Program to find the Square of a number using a look-up table in 8085 Microprocessor
- C program to print multiplication table by using for Loop

Advertisements