Enddo end current do loop enddo – Motorola DSP96002 User Manual

Page 270

Advertising
background image

A - 82

DSP96002 USER’S MANUAL

MOTOROLA

ENDDO

End Current DO Loop

ENDDO

00

0000

0000

0111

31

14 13

0

0000

0000

0000

0000

00

Operation:

SSL(LF)

SR; SP-1

SP

SSH

LA; SSL

LC; SP-1

SP

Assembler Syntax:

ENDDO

Description:

This instruction will cause the termination of the current hardware DO loop before the current loop counter

(LC) equals one. If the value of the current DO loop counter is needed, it must be read before the execution

of the ENDDO instruction. Initially, the loop flag (LF) is restored from the system stack and the remaining

portion of the status register (SR) and the program counter (PC) are purged from the system stack. The

loop address (LA) and the loop counter (LC) registers are them restored from the system stack.

Restrictions:

Due to pipelining, and the fact that the ENDDO instruction accesses the program controller registers, the

ENDDO instruction must not be immediately preceded by any of the following instructions:

Immediately before ENDDO

MOVEC to LA, LC, SR, SSH, SSL, OR SP

MOVEM to LA, LC, SR, SSH, SSL, OR SP

MOVEP to LA, LC, SR, SSH, SSL, OR SP

MOVEC from SSH

MOVEM from SSH

MOVEP from SSH

ORI MR

ANDI MR

Also, the ENDDO instruction cannot be the next to last instruction in a DO loop (at LA-1).

CCR Condition Codes: Not affected.

ER Status Bits: Not affected.

IER Flags: Not affected.

Instruction Fields:
Instruction Format:
ENDDO

None

Timing: 2 oscillator clock cycles

Memory: 1 program words

Advertising