DECEQ

DECEQ Decrement and Set T If Equal Zero (DALU) DECEQ

Operation

Assembler Syntax

Dn – 1 → Dn; if Dn==0, then 1→ T, else 0 → T

DECEQ Dn

Description

 

DECEQ Dn

 

Decrements a data register (Dn) and sets the T bit if the result is equal to zero.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[0]

C

Calculates and updates the carry bit in the status register.

SR[1]

T

Set if result = 0, cleared otherwise.

EMR[2]

DOVF

Set if the result cannot be represented in 40 bits.

Ln

L

Clears the Ln bit in the destination register.

Example

deceq d7

Register/Memory Address

L7:D7

SR

EMR

Before

$0:$00 0000 0001

$00E4 0000

After

$0:$00 0000 0000

$00E4 0002

$0000 0000

Instruction Formats and Opcodes

Instruction

Words

Cycles

Type

DECEQ Dn

1

1

1

Note: ** indicates serial grouping encoding.

Opcode

158 70

0 * 1 0 0 1 F F F 1 1 0 1 1 0 1

SC140 DSP Core Reference Manual

A-141

Page 455
Image 455
Freescale Semiconductor SC140 specifications Deceq d7, Dn 1 → Dn if Dn==0, then 1→ T, else 0 → T, Deceq Dn