INSTRUCTION SET DESCRIPTIONS

REP

Repeat Next Instruction

REP

Restrictions: The REP instruction can repeat any single-word instruction except the REP instruction itself and any instruction that changes program flow. The following instructions are not allowed to follow an REP instruction:

Immediately after REP

DO

JSSET

Jcc

REP

JCLR

RTI

JMP

RTS

JSET

STOP

JScc

SWI

JSCLR

WAIT

JSR

ENDDO

Also, a REP instruction cannot be the last instruction in a DO loop (at LA). The assem- bler will generate an error if any of the previous instructions are found immediately fol- lowing an REP instruction.

Example:

:

 

 

 

 

 

 

REP X0

 

 

 

 

 

MAC X1,Y1,A

X:(R1)+,X1

Y:(R4)+,Y1

:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Before Execution

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X0

 

 

X0

 

 

 

 

$000100

 

 

 

 

 

 

 

 

 

 

 

;repeat (X0) times

;X1Y1+A A, update X1,Y1

After Execution

$000100

LC

$0000

LC

$0000

MOTOROLA

INSTRUCTION SET DETAILS

A - 249

Page 518
Image 518
Motorola DSP56000 manual Immediately after REP, Jclr RTI JMP RTS Jset Stop, Jsclr Wait JSR Enddo, REP MAC X1,Y1,A