- 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
8086 program to reverse 16 bit number using 8 bit operation
In this program we will see how to reverse a 16-bit number using 8-bit operation.
Problem Statement
Write 8086 Assembly language program to reverse a 16-bit number which is stored at location 2000 and 2001, using 8-bit operations.
Discussion
8086 has 8-bit operation for rotation. For 16-bit number, we are taking the bytes from 2000 and 2001. Then rotate each byte with ROL instruction. After that put the numbers in reverse form to reverse the bytes. Like the content of 2000 will be stored at 2001 after reverse, and content of 2001 will be stored at 2000 after reverse.
Input
Address | Data |
---|---|
… | … |
2000 | AB |
2001 | CD |
… | … |
Flow Diagram
Program
Output
Address | Data |
---|---|
… | … |
2000 | DC |
2001 | BA |
… | … |
- Related Articles
- 8086 program to reverse 8 bit number using 8 bit operation
- 8086 program to divide a 16 bit number by an 8 bit number
- 8085 program to reverse 16 bit number
- 8085 program to reverse 8 bit number
- 8086 program to multiply two 16-bit numbers
- 8085 Program to Divide a 16-bit number by an 8-bit number
- 8086 program to subtract two 16 bit BCD numbers
- 8086 program to convert an 8 bit BCD number into hexadecimal number
- 8086 program to multiply two 8-bit numbers
- 8086 program to find sum of digits of 8 bit number
- 8086 program to add two 8 bit BCD numbers
- 8086 program to subtract two 8 bit BCD numbers
- 8086 program to add two 16 bit BCD numbers with carry
- 8085 program to perform AND operation in nibbles of 8 bit number
- Difference Between 8 Bit and 16 Bit Microcontroller

Advertisements