§
Program :
; Exchange the contents
of two register
MVI A,30H
MVI
B,40H
MOV C,B ;move the value of
register B to register C, (i.e. C= 40H)
MOV
B,A ;move the value of
register A to register B, (i.e. B= 30H)
MOV
A,C ;move the value of
register C to register A, (i.e. A= 40H)
HLT
§
Output :

No comments:
Post a Comment