Freescale Semiconductor SC140 Setup Long Loop DOSETUPn, Start Address AGU, Dosetup1 label

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 475
Image 475

 

 

DOSETUPn

 

 

 

DOSETUPn

Setup Long Loop DOSETUPn

 

 

Start Address (AGU)

Operation

Assembler Syntax

PC + displacement → SAn

DOSETUPn label

Description

 

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.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

None.

Example

dosetup1 _label

Register/Memory Address

(displacement)

PC

SA1

Before

$101E

$0000 0002

After

$0000 1020

SC140 DSP Core Reference Manual

A-161

Page 475
Image 475
Freescale Semiconductor SC140 Setup Long Loop DOSETUPn, Start Address AGU, Dosetup1 label, PC + displacement → SAn