dsp56000 Freescale Semiconductor, Inc, dsp56000 Datasheet - Page 364

no-image

dsp56000

Manufacturer Part Number
dsp56000
Description
24-bit Digital Signal Processor Family Manual
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Operation:
SSL(LF)
SSH
Description: Terminate the current hardware DO loop before the current loop counter
(LC) equals one. If the value of the current DO loop counter (LC) 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 then 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
Also, the ENDDO instruction cannot be the last (LA) instruction in a DO loop.
Example:
A - 98
ENDDO
ONWARD
NEXT MOVE #$123456,X1
LA; SSL
SR;SP – 1
DO Y0,NEXT
MOVEC LC,A
CMP Y1,A
JNE ONWARD
ENDDO
JMP NEXT
LC;SP –1
:
:
:
:
Freescale Semiconductor, Inc.
SP
For More Information On This Product,
INSTRUCTION DESCRIPTIONS
INSTRUCTION SET DETAILS
SP
Go to: www.freescale.com
End Current DO Loop
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
REP
;exec. loop ending at NEXT (Y0) times
;get current value of loop counter (LC)
;compare loop counter with value in Y1
;go to ONWARD if LC not equal to Y1
;LC equal to Y1, restore all DO registers
;go to NEXT
;LC not equal to Y1, continue DO loop
;(last instruction in DO loop)
;(first instruction AFTER DO loop)
Assembler Syntax:
ENDDO
ENDDO
MOTOROLA

Related parts for dsp56000