×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

Reverse an 8-bit number | 8086 Microprocessor

In this tutorial, we will learn how to reverse an 8-bit number using 8086 Microprocessor? By Akash Kumar Last updated : May 22, 2023

Problem

To reverse an 8-bit number using 8086 Microprocessor.

Assumption

  • Let us consider number is stored at memory location 0600.
  • Result will be stored at location 0601.

Algorithm

  1. Move the number from memory location [0600] to register AL.
  2. Assign the value of register CX to 0004H.
  3. Rotate the content of register AL CX times.
  4. Move the content of register AL to memory location [0601].
  5. Terminate the program.

Program

MOV     AL,[0600]
MOV     CX 0004
ROR     AL, CX
MOV     [0601], AL
HLT

Observation

INPUT:
0600 : 23

OUTPUT:
0601 : 32

Hence, we successfully reverse an 8-bit number using 8086 Microprocessor.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.