- 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
Program for decimal down counter in 8085 Microprocessor
We write a program in 8085 assembly language for implementing a decimal down counter (from 99 to 00). The program must be working in the following conditions.
- We load the accumulator with 99.
- Displaying the count value in the accumulator which is present in the accumulator. RST5.5 is in unmasked condition and the interrupt system gets enabled.
The program is as follows:
FILE NAME DOWNCNTR.ASM ORG C000H CURDT: EQU FFF9H UPDDT: EQU 06D3H RDKBD: EQU 0634H MVI A, 99H ; Initialize A with 99. REP: STA CURDT ; Store A value in CURDT. CALL UPDDT ; Display contents of CURDT in data field. MVI A, 00001110B SIM ; Unmask RST5.5 EI ; Enable Interrupt system CALL RDKBD ; Wait till a key is pressed and load ; the key code in Accumulator, but ignore it. LDA CURDT ; Reload A from location CURDT. ADI 99H DAA ; Decrement A in decimal notation by ; adding 99, which is 10's complement of 01. JMP REP ; Jump to REP to display the next count.
Advertisements