INSTRUCTION SET DESCRIPTIONS
MOTOROLA INSTRUCTION SET DETAILS A - 249
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 ;repeat (X0) times
MAC X1,Y1,A X:(R1)+,X1 Y:(R4)+,Y1 ;X1Y1+A A, update X1,Y1
:
REP Repeat Next Instruction REP
Before Execution After Execution
X0 $000100
LC LC
$0000 $0000
$000100
X0