Dosetupn – Freescale Semiconductor StarCore SC140 User Manual

Page 475

Advertising
background image

DOSETUPn

SC140 DSP Core Reference Manual

A-161

DOSETUPn

Setup Long Loop

DOSETUPn

Start Address (AGU)

Description

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

None.

Example

dosetup1 _label

Operation

Assembler Syntax

PC + displacement

→ SAn

DOSETUPn label

DOSETUPn label

This instruction is required for initialization of a long loop, not short loops. In case the loop is nested, the
DOSETUPn instruction can be placed outside the enveloping loop as long as SA (Start Address) is not
changed by instructions in the loop. DOSETUPn loads a loop start address register (SAn). The label is
placed at the beginning of the loop. The encoded value in the DOSETUP instruction is a PC relative
displacement calculated by the assembler and linker from the label. The start address placed in SAn is the
absolute address of the label. The DOSETUPn instruction is redundant with the LOOPSTART assembler
directive, both of which define SA. In case of a conflict between the two, SA is defined by DOSETUPn.

Register/Memory Address

Before

After

(displacement)

$101E

PC

$0000 0002

SA1

$0000 1020

Advertising