0% found this document useful (0 votes)
73 views

Microprocessor 8085 Appendix A

This document provides an explanation, algorithm, and program for rotating a number stored in register B of a microprocessor 4 times to the right. The algorithm has 4 steps: 1) Get the number from register B into the accumulator, 2) Rotate the number right 4 times, 3) Store the result back in register B, 4) Stop. The program uses MOV, RAR, and MOV instructions to perform the rotation and store the result, as shown in the flowchart and program listing.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Microprocessor 8085 Appendix A

This document provides an explanation, algorithm, and program for rotating a number stored in register B of a microprocessor 4 times to the right. The algorithm has 4 steps: 1) Get the number from register B into the accumulator, 2) Rotate the number right 4 times, 3) Store the result back in register B, 4) Stop. The program uses MOV, RAR, and MOV instructions to perform the rotation and store the result, as shown in the flowchart and program listing.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Microprocessor 8085

Appendix A

Explanation :

Get the number in the accumulator from register B.


Rotate the number 4 times to the right
Store the shifted number back in register B

Algorithm :

Step I
Step II
Step III
Step IV

:
:
:
:

Get the number in the accumulator from register B.


Rotate the number 4 times to the right.
Store the result in register B.
Stop

Flowchart : Refer flowchart 26.

Program :

Instruction
MOV A,B
RAR
RAR
RAR
RAR
MOV B,A
HLT

Comment
;
;
;
;

Load the number in


register A
Rotate the number 4 times
to the right

; Store the shifted number


; Terminate program execution

Flowchart 26

You might also like