Freescale Semiconductor SC140 specifications Continue to the Next Loop Iteration AGU, Label

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 447
Image 447

 

 

 

CONT

 

 

 

 

CONT

Continue to the Next Loop Iteration (AGU)

CONT

Operation

Assembler Syntax

 

If LCn > 1, then SAn → PC, LCn-1 → LCn CONT label

 

 

else PC + displacement → PC

 

0

→ LFn,

 

0

→ LCn

 

Description

CONT label

Continues the active loop n from the start address of the loop (SAn) if its loop counter (LCn) is greater than one. Otherwise, it clears the active loop flag (LFn) and branches to an address determined by a 16-bit signed displacement [–216≤ displacement < 216,W] added to the PC. In either case, the active loop counter is decremented by one. Some programming rules apply to the use of this instruction. If no loops are enabled, this instruction is undefined.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[30:27]

LF[3:0]

Read loop flags to determine active loop.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[30:27]

LF[3:0]

Clear active loop flag if the active loop counter is less than or equal to

 

 

one.

Example

cont _label

Register/Memory Address

_label (displacement)

LC3

SR

PC

Before

$C

$1

$40E4 0000

$0000 0014

After

$0

$00E4 0000

$0000 0020

Loop count 3 (LC3) is 1, so loop count is decremented to 0, loop flag 3 (SR26) is cleared, and program continues at _label, address $0000 0020.

SC140 DSP Core Reference Manual

A-133

Page 447
Image 447
Freescale Semiconductor SC140 specifications Continue to the Next Loop Iteration AGU, Label