INSTRUCTION DESCRIPTIONS

ENDDO

End Current DO Loop

ENDDO

Explanation of Example: This example illustrates the use of the ENDDO instruction to terminate the current DO loop. The value of the loop counter (LC) is compared with the value in the Y1 register to determine if execution of the DO loop should continue. Note that the ENDDO instruction updates certain program controller registers but does not automatically jump past the end of the DO loop. Thus, if this action is desired, a JMP instruction (i.e., JMP NEXT as previously shown) must be included after the ENDDO instruction to transfer program control to the first instruction past the end of the DO loop.

Condition Codes:

15

14

 

13

12

11

10

9

8

7

6

 

5

4

3

2

1

0

LF

DM

T

**

 

S1

S0

 

I1

I0

S

L

E

U

N

Z

 

V

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MR

 

 

 

 

 

 

 

 

 

 

CCR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The condition codes are not affected by this instruction.

Instruction Format:

ENDDO

Opcode:

 

23

 

 

 

 

 

 

16

15

 

 

 

 

 

 

8

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

1

1

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Fields:

None

Timing: 2 oscillator clock cycles

Memory: 1 program word

MOTOROLA

INSTRUCTION SET DETAILS

A - 99

Page 368
Image 368
Motorola DSP56000, 24-Bit Digital Signal Processor manual Condition Codes, Opcode Instruction Fields