Home » Embedded Systems

Reverse an 8-bit number | 8086 Microprocessor

Here, we are going to learn how to reverse an 8-bit number using 8086 Microprocessor?
Submitted by Akash Kumar, on November 13, 2018

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

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.