INSTRUCTION DESCRIPTIONS

DO

 

Start Hardware Loop

Example:

:

 

 

 

DO #cnt1, END1

;begin outer DO loop

 

:

 

DO #cnt2, END2

;begin inner DO loop

 

:

 

 

:

 

MOVE A,X:(R0)+

 

 

:

 

END2

 

;last instruction in inner loop

ADD

A,B X:(R1)+,X0

;(in outer loop)

END1

:

;last instruction in outer loop

 

:

;first instruction after outer loop

DO

Explanation of Example: This example illustrates a nested DO loop. The outer DO loop will be executed “cnt1” times while the inner DO loop will be executed (“cnt1” * “cnt2”) times. Note that the labels END1 and END2 are located at the first instruction past the end

of the DO loop, as mentioned above, and are nested properly.

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For source operand A or B:

LF — Set when a DO loop is in progress

S — Computed according to the definition. See Notes on page A-97.

L — Set if data limiting occurred. See Notes on page A-97.

For other source operands:

LF — Set when a DO loop is in progress

A - 92

INSTRUCTION SET DETAILS

MOTOROLA

Page 361
Image 361
Motorola 24-Bit Digital Signal Processor, DSP56000 manual END2, END1