Texas Instruments MSC1210 User Manual

Page 295

Advertising
background image

8052 Instruction Set

E-11

8052 Instruction Set

INC

Increment Reister

Syntax

INC register

Instructions

OpCode

Bytes

Cycles

Flags

INC A

0x04

1

1

None

INC direct

0x05

2

1

None

INC @R0

0x06

1

1

None

INC @R1

0x07

1

1

None

INC R0

0x08

1

1

None

INC R1

0x09

1

1

None

INC R2

0x0A

1

1

None

INC R3

0x0B

1

1

None

INC R4

0x0C

1

1

None

INC R5

0x0D

1

1

None

INC R6

0x0E

1

1

None

INC R7

0x0F

1

1

None

INC DPTR

0xA3

1

2

None

INC increments the value of register by 1. If the initial value of register is 255
(0xFF

H

), incrementing the value causes it to reset to 0.

Note:

The carry flag is not set when the value rolls over from 255 to 0.

In the case of INC DPTR, the two-byte value of DPTR is incremented as an
unsigned integer. If the initial value of DPTR is 65 535 (0xFFFF

H

), increment-

ing the value causes it to reset to 0. Again, the carry flag is not set when the
value of DPTR rolls over from 65 535 to 0.

See also: ADD, ADDC, DEC

Advertising