8051 program to rotate DPTR.

By


               8051 program to rotate DPTR.
               
              ORG 0000H
              CLR      C
              MOV      A, DPL
              RLC       A
             MOV       DPL, A
             MOV       A, DPH
             RLC       A
             MOV       DPH, A
             CLR       A
             ORL       A, DPL      
             MOV      DPL, A
AGAIN: SJMP AGAIN

RESULT:-
INPUT                                   OUTPUT
Register  value    
DPTR    1234H                     DPTR      2468H

0 comments:

Post a Comment

If you have any questions or droughts feel free to ask here.