- 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 simulating a stopwatch in 8085 Microprocessor
We write an 8085 assembly language program just to simulate a stopwatch for displaying minutes and seconds in the address field. There exists a provision to stop the stopwatch, along with the display for continuation to show the time just previous to the stop command.
FILE NAME STOPWACH.ASM PRESSING THE ‘VECT INTR’ KEY STOPS THE STOPWATCH, WITH STATIONARY DISPLAY ORG C000H CURAD: EQU FFF7H UPDAD: EQU 06BCH RESET: LXI H,0000H REPEAT: SHLD CURAD CALL UPDAD; Display time present in HL in the address field MVI A, 00011011B SIM ; Unmask RST7.5, Reset RST7.5 flip flop EI ; Enable interrupt system CALL DELAY ; Generate a delay of 1 second LHLD CURAD MOV A, L ADI 01H DAA ; Increment L value in decimal CPI 60H JZ INC_MIN ; If L = 60, jump to INC_MIN MOV L, A JMP REPEAT INC_MIN: MVI L, 00H MOV A, H ADI 01H DAA ; Make L = 0, and increment H in decimal CPI 60H JZ RESET ; If H = 60, jump to RESET MOV H, A JMP REPEAT ; Subroutine to generate a delay of 1 second ; To check the proper working of minutes display, load DE with ; 0444H in this subroutine instead of FFFFH. Then the minutes’ display ; will change every second, so that we can test the proper working in ; 60 seconds, instead of waiting for 60 minutes. DELAY: MVI B, 02H OUTLOOP: LXI D, FFFFH INLOOP: DCX D MOV A, D ORA E JNZ INLOOP DCR B JNZ OUTLOOP RET RST7.5 Interrupt Service Subroutine ORG FFB1H ; For ESA Kit it should be ‘ORG 8FBFH’ HLT ; ; This is the RST7.5 ISS
- Related Articles
- Program for decimal down counter in 8085 Microprocessor
- Program to check for palindrome in 8085 Microprocessor
- Program for simulation of throwing a die in 8085 Microprocessor
- Program counter (PC) in 8085 Microprocessor
- Program for adding 2 numbers input from keyboard in 8085 Microprocessor
- Program for subtraction of multi-byte BCD numbers in 8085 Microprocessor
- Program to compute LCM in 8085 Microprocessor
- Program to check for two out of five code in 8085 Microprocessor
- Program for adding 4 hex digits of a 16-bit number in 8085 Microprocessor
- Program to simulate a real-time clock in 8085 Microprocessor
- Program to perform linear search in 8085 Microprocessor
- Interface 8255 with 8085 microprocessor for addition
- Addressing modes of 8085 in 8085 Microprocessor
- Program to convert ASCII to binary in 8085 Microprocessor
- Program to simulate decimal down counter in 8085 Microprocessor

Advertisements