Keil Logo

MOV

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.

See Also: MOVC, MOVX

MOV @Rn, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
0111011n immediate
Operation
MOV
(Rn) = immediate
Example
MOV @R0, #0
MOV @Ri, A
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
1111011i
Operation
MOV
(Ri) = A
Example
MOV @R0, A
MOV @Ri, direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
1010011i direct
Operation
MOV
(Ri) = (direct)
Example
MOV @R1, P2
MOV A, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
01110100 immediate
Operation
MOV
A = immediate
Example
MOV A, #0FFh
MOV A, @Ri
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
1110011i
Operation
MOV
A = (Ri)
Example
MOV A, @R1
MOV A, direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
11100101 direct
Operation
MOV
A = (direct)
Example
MOV A, P0
MOV A, Rn
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
11101nnn
Operation
MOV
A = Rn
Example
MOV A, R6
MOV bit, C
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
10010010 bit
Operation
MOV
(bit) = C
Example
MOV 22h, C
MOV C, bit
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
10100010 bit
Operation
MOV
C = (bit)
Example
MOV C, 22h
MOV dest_direct, src_direct
C AC F0 RS1 RS0 OV   P
Bytes 3
Cycles 2
Encoding
10000101 src_direct dest_direct
Operation
MOV
(dest_direct) = (src_direct)
Example
MOV P1, P0
MOV direct, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 3
Cycles 2
Encoding
01110101 direct immediate
Operation
MOV
(direct) = immediate
Example
MOV P2, #0FFh
MOV direct, @Rn
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
1000011n direct
Operation
MOV
(direct) = (Rn)
Example
MOV P0, @R1
MOV direct, A
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
11110101 direct
Operation
MOV
(direct) = A
Example
MOV P0, A
MOV direct, Rn
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
10001nnn direct
Operation
MOV
(direct) = Rn
Example
MOV P2, R5
MOV DPTR, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 3
Cycles 2
Encoding
10010000 immediate15-8 immediate7-0
Operation
MOV
DPTR = immediate
Example
MOV DPTR, #1234h
MOV Rn, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
01111nnn immediate
Operation
MOV
Rn = immediate
Example
MOV R4, #0h
MOV Rn, A
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
11111nnn
Operation
MOV
Rn = A
Example
MOV R5, A
MOV Rn, direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
10101nnn direct
Operation
MOV
Rn = (direct)
Example
MOV R4, P1
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.