beautypg.com

Texas Instruments MSC1210 User Manual

Page 301

background image

8052 Instruction Set

E-17

8052 Instruction Set

MOV DPTR

Move value into DPTR

Syntax

MOV DPTR,#data16

Instructions

OpCode

Bytes

Cycles

Flags

MOV DPTR,#data16

0x90

3

2

None

Sets the value of the data pointer (DPTR) to the value data16.

See also: MOVX, MOVC

MOVC

Move Code Byte to Accumulator

Syntax

MOVC A,@A+register

Instructions

OpCode

Bytes

Cycles

Flags

MOVC A,@A+DPTR

0x93

1

2

None

MOVC A,@A+PC

0x83

1

1

None

MOVC moves a byte from code memory into the accumulator. The code
memory address that the byte is moved from is calculated by summing the val-
ue of the accumulator with either DPTR or the PC. In the case of the program
counter, PC is first incremented by 1 before being summed with the accumula-
tor.

See also: MOV, MOVX

MOVX

Move Data to/from External RAM

Syntax

MOVX operand1,operand2

Instructions

OpCode

Bytes

Cycles

Flags

MOVX @DPTR,A

0xF0

1

2

None

MOVX @R0,A

0xF2

1

2

None

MOVX @R1,A

0xF3

1

2

None

MOVX A,@DPTR

0xE0

1

2

None

MOVX A,@R0

0xE2

1

2

None

MOVX A,@R1

0xE3

1

2

None

MOVX moves a byte to or from external memory into or from the accumulator.

If operand1 is @DPTR, the accumulator is moved to the 16-bit external
memory address indicated by DPTR. This instruction uses both P0 (port 0) and
P2 (port 2) to output the 16-bit address and data. If operand2 is DPTR then the
byte is moved from external memory into the accumulator.

If operand1 is @R0 or @R1, the accumulator is moved to the 8-bit external
memory address indicated by the specified register. This instruction uses only P0
(port 0) to output the 8-bit address and data. P2 (port 2) is not affected. If operand2
is @R0 or @R1, the byte is moved from external memory into the accumulator.

See also: MOV, MOVC