Texas Instruments MSC1210 DEC register, Decrementing the value causes it to reset to 255 0xFFH

Models: MSC1210

1 324
Download 324 pages 20.97 Kb
Page 293
Image 293

 

 

 

 

 

 

 

8052 Instruction Set

DEC

Decrement Register

 

 

 

 

 

 

Syntax

DEC register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instructions

 

OpCode

Bytes

Cycles

 

 

Flags

 

 

 

 

 

 

 

 

 

 

 

 

DEC A

 

0x14

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC direct

 

0x15

2

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC @R0

 

0x16

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC @R1

 

0x17

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R0

 

0x18

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R1

 

0x19

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R2

 

0x1A

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R3

 

0x1B

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R4

 

0x1C

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R5

 

0x1D

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R6

 

0x1E

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

 

 

DEC R7

 

0x1F

1

1

 

 

None

 

 

 

 

 

 

 

 

 

 

DEC decrements the value of register by 1. If the initial value of register is 0,

 

decrementing the value causes it to reset to 255 (0xFFH).

 

 

 

 

 

 

 

 

 

 

 

Note:

 

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

See also: INC, SUBB

 

 

 

 

 

 

 

DIV

Divide Accumulator by B

 

 

 

 

 

 

Syntax

DIV AB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instructions

 

 

OpCode

Bytes

Cycles

 

 

Flags

 

 

 

 

 

 

 

 

 

 

DIV AB

 

 

0x84

1

1

 

 

C, OV

 

 

 

 

 

 

 

 

 

 

 

Divides the unsigned value of the accumulator by the unsigned value of the B register. The resulting quotient is placed in the accumulator and the remainder is placed in the B register.

The carry (C) flag is always cleared.

The overflow (OV) flag is set if division by 0 was attempted. Otherwise, it is cleared.

See also: MUL AB

8052 Instruction Set

E-9

 

Page 293
Image 293
Texas Instruments MSC1210 manual DEC register, Decrementing the value causes it to reset to 255 0xFFH, See also INC, Subb