- 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 to reverse 8 bit number
In this program we will see how to reverse the digits of an 8-bit number using 8085.
Problem Statement
Write 8085 Assembly language program to reverse an 8-bit number stored at location 8000H. Also, store the result at 8050H.
Discussion
Here the task is too simple. There are some rotating instructions in 8085. The RRC, RLC are used to rotate the Accumulator content to the right and left respectively without carry. We can use either RRC or RLC to perform this task.
Input
Address | Data |
---|---|
… | … |
8000 | 4C |
… | … |
Flow Diagram
Program
Address | HEX Codes | Labels | Mnemonics | Comments |
---|---|---|---|---|
F000 | 3A, 00, 80 | | LDA 8000H | Take the number from memory |
F003 | 0F | | RRC | Rotate right without carry four times |
F004 | 0F | | RRC | |
F005 | 0F | | RRC | |
F006 | 0F | | RRC | |
F007 | 32, 50, 80 | | STA 8050H | Store the result at memory |
F00A | 76 | | HLT | Terminate the program |
Output
Address | Data |
---|---|
… | … |
8050 | C4 |
… | … |
- Related Articles
- 8085 program to reverse 16 bit number
- 8086 program to reverse 8 bit number using 8 bit operation
- 8086 program to reverse 16 bit number using 8 bit operation
- 8085 Program to Divide a 16-bit number by an 8-bit number
- 8085 program to convert an 8 bit number into Grey number
- 8085 program to find square of a 8 bit number
- 8085 program to convert 8 bit BCD number into ASCII Code
- 8085 program to find sum of digits of 8 bit number
- 8085 program to count number of once in the given 8-bit number
- 8085 program to perform AND operation in nibbles of 8 bit number
- 8085 Program to Add two 8 Bit numbers
- 8085 Program to Subtract two 8 Bit numbers
- 8085 Program to Divide two 8 Bit numbers
- 8085 program to multiply two 8 bit numbers
- 8085 program to swap two 8-bit numbers

Advertisements