Freescale Semiconductor SC140 specifications Brad label, Source Code Comments

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 415
Image 415

BRAD

BRAD

Branch Using a Delay Slot (AGU)

Operation

Assembler Syntax

PC + displacement → PC

BRAD <label

 

BRAD >label

BRAD

Description

BRAD <label

BRAD >label

Causes program execution to continue at location PC + displacement after executing the execution set immediately following the execution set containing the BRAD instruction (called the delay slot). The displacement, calculated by the assembler and linker, is a two’s complement integer that represents the relative distance from the current PC to the destination label. The assembler determines if the PC relative displacement is a short branch (<label [–210≤ displacement < 210, W]) or a long branch (>label [–220≤ displacement < –210, W and 210 ≤ displacement < 220, W]).

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

None.

Example

Source Code

Comments

move.l #$1234,d0.l;loads d0

brad lbl3 ; disassembled code - brad >*+a; p:lbl3

add d0,d1,d7 ; executes, d7 = $1234, pc then branches to $e, address of lbl3 nop

nop

lbl3 add d0,d7,d7 ; executes, d7 = $2468

SC140 DSP Core Reference Manual

A-101

Page 415
Image 415
Freescale Semiconductor SC140 specifications Brad label, Source Code Comments