Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
8086 program to reverse 8 bit number using 8 bit operation
In this program we will see how to reverse an 8-bit number using 8-bit operation.
Problem Statement
Write 8086 Assembly language program to reverse an 8-bit number which is stored at location 2000, using 8-bit operations.
Discussion
8086 has 8-bit operation for rotation. we are taking the byte from 2000. Then rotate that byte with ROL instruction. After that put the number into memory in reverse form.
Input
|
Address |
Data |
|---|---|
… |
… |
|
2000 |
AB |
… |
… |
Flow Diagram

Program

Output
|
Address |
Data |
|---|---|
… |
… |
|
2000 |
BA |
… |
… |
Advertisements
