Anda di halaman 1dari 4

8051 Instruction Set Manual: MOV

⌂ Products Download Events Support Videos Search Keil... + Go

Technical Support Home  /  8051 Instruction Set Manual


Overview
Search
Contact
MOV
Home » Instructions » MOV
Assistance Request
Feedback 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.
On-Line Manuals
Product Manuals See Also: MOVC, MOVX
Document Conventions
MOV @Rn, #immediate
C AC F0 RS1 RS0 OV   P
8051 Instruction Set Manual
Architecture Overview Bytes 2
Opcodes Cycles 1
Encoding 0111011n immediate
Instructions
ACALL Operation
MOV
ADD
(Rn) = immediate
ADDC
AJMP Example
ANL MOV @R0, #0
CJNE
CLR
MOV @Ri, A
CPL
Privacy Policy Update C AC F0 RS1 RS0 OV   P
DA
Arm’s Privacy Policy has been
DEC Bytes 1
updated. By continuing to use our
Cycles 1
site,DIV
you consent to Arm’s Privacy 1111011i
Encoding
Policy.
DJNZPlease review our Privacy
Policy
INC to learn more about our Operation
collection, use and transfers MOV
JB (Ri) = A
of your data.
JBC
Accept
JC and
Accept andhide thismessage
hide this message Example
JMP MOV @R0, A
Important information
JNB
This
JNCsite uses cookies to store
MOV @Ri, direct
information
JNZ on your computer. By
C AC F0 RS1 RS0 OV   P
continuing to use our site, you
JZ
consent to our cookies.
LCALL Bytes 2
Cycles 2
Don't show
LJMP
Don't showthis message
this message again
again
Encoding 1010011i direct
MOV
Change Settings
MOVC Operation
MOV
MOVX (Ri) = (direct)
MUL
NOP Example
ORL
MOV @R1, P2

POP
PUSH
MOV A, #immediate
RET C AC F0 RS1 RS0 OV   P
RETI
RL Bytes 2
Cycles 1
RLC 01110100 immediate
Encoding
RR
Operation
RRC
MOV
SETB A = immediate
SJMP
SUBB Example
MOV A, #0FFh
SWAP

http://www.keil.com/support/man/docs/is51/is51_mov.htm[07/04/2019 22:19:23]
8051 Instruction Set Manual: MOV

XCH
XCHD MOV A, @Ri
XRL 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

http://www.keil.com/support/man/docs/is51/is51_mov.htm[07/04/2019 22:19:23]
8051 Instruction Set Manual: MOV

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

http://www.keil.com/support/man/docs/is51/is51_mov.htm[07/04/2019 22:19:23]
8051 Instruction Set Manual: MOV

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

Related Knowledgebase Articles


A51: READING THE PROGRAM COUNTER
A51: MOVING CARRY BIT INTO ACCUMULATOR

Products   Downloads Support Contact


Development Tools Hardware & Collateral MDK-Arm Knowledgebase Distributors
Arm ULINK Debug Adaptors C51 Discussion Forum Request a Quote
C166 Evaluation Boards C166 Product Manuals Sales Contacts
C51 Product Brochures C251 Application Notes
C251 Device Database File downloads
µVision IDE and Debugger Distributors

Cookie Settings | Terms of Use | Privacy | Accessibility | Trademarks | Contact Us | Feedback


 
Copyright © 2005-2019 Arm Limited (or its affiliates). All rights reserved.

http://www.keil.com/support/man/docs/is51/is51_mov.htm[07/04/2019 22:19:23]

Anda mungkin juga menyukai