0% found this document useful (0 votes)
27 views1 page

Microprocessor 8085 Appendix A

The document describes rotating numbers stored in registers of a microprocessor. It explains an algorithm to get a number from register B, rotate it right once, and store it back in B, then do the same with a number from register C. A flowchart and program are provided to demonstrate rotating the numbers stored in the two registers to the right by one position each.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Microprocessor 8085 Appendix A

The document describes rotating numbers stored in registers of a microprocessor. It explains an algorithm to get a number from register B, rotate it right once, and store it back in B, then do the same with a number from register C. A flowchart and program are provided to demonstrate rotating the numbers stored in the two registers to the right by one position each.

Uploaded by

manpreet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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 1 time to the right
Store the shifted number back in register B
Get the number in the accumulator from register C.
Rotate the number 1 time to the right
Store the shifted number back in register C

Algorithm :

Step I

: Get the number the in the accumulator


from register B.
Step II : Rotate the number 1 time to the right.
Step III : Store the result in register B.
Step IV : Get the number the in the accumulator
from register C.
Step V : Rotate the number 1 times to the right.
Step VI : Store the result in register C.
Step VII : Stop

Flowchart : Refer flowchart 27.

Program :

Instruction

Comment

MOV A,B

; Load the number in register A

RAR

; Rotate the number 1 time


27
; to the right

MOV B,A

; Store the shifted number

MOV A,C

; Load the number in register A

RAR

; Rotate the number 1 time to the right

MOV C,A

; Store the shifted number

HLT

; Terminate program execution

Flowchart

You might also like