You are here : assembly8051MOV

MOV - 8051

The MOV instruction moves data bytes between the two specified operands. The byte specified by the second operand is copied to the location specified by the first operand. The source data byte is not affected.


MOV destination,source


;Immidiate Addressing
MOV A,#05H	; Move immidiate data 05h to A
MOV R5,#20H	; Move immidiate data 20h to R5

;Register Addressing
MOV A,Rn	;n in [0 to 7]
MOV Rn,A	;n in [0 to 7]

;Direct Addressing
MOV A,addr
MOV A,05H	;Moves contents from 05h from RAM to A

;Indirect Addressing
MOV A,@Rn	;Moves content from location Rn is pointing to
		;n can be 0 or 1

Output / Return Value


Alternatives / See Also