Tuesday, 14 March 2017

Store 01H, 02H, 03H and 04H in Regiser R0, R1, R2 and R3 respectively and exchange data stored in Reg R0 with R1 and data in Reg R2 with R3

ORG 00H

SJMP START

START : MOV R0,#01H

               MOV R1,#02H

               MOV R2,#03H

               MOV R3,#04H

               MOV A,R0

               XCH  A,R1

               MOV  R0,A

               MOV  A,R2

               XCH  A,R3

               MOV  R2,A

STOP :   SJMP STOP

               END


No comments:

Post a Comment