You are here : assembly8051MOVX

MOVX - 8051

The MOVX instruction transfers data between the accumulator and external data memory. External memory may be addressed via 16-bits in the DPTR register or via 8-bits in the R0 or R1 registers. When using 8-bit addressing, Port 2 must contain the high-order byte of the address.


Syntax

MOVX @Rn,A	;Writing the Data
MOVX A,@Rn	;Reading the Data


Example

MOVX @Ri, A
;1 byte 2 cycles
MOVX A,@DPTR
;1 byte 2 cycles
MOVX A,@Rn
;1 byte 2 cycles


Output / Return Value


Limitations


Alternatives / See Also


Reference