Brad, Branch using a delay slot (agu), Status and conditions changed by instruction – Freescale Semiconductor StarCore SC140 User Manual
Page 415: Example operation assembler syntax

BRAD
SC140 DSP Core Reference Manual
A-101
BRAD
Branch Using a Delay Slot (AGU)
BRAD
Description
Status and Conditions that Affect Instruction
None.
Status and Conditions Changed by Instruction
None.
Example
Operation
Assembler Syntax
PC + displacement
→ PC
BRAD <label
BRAD >label
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 [–2
10
≤ displacement < 2
10
, W]) or a long branch (
>label [–2
20
≤
displacement
< –2
10
, W and 2
10
≤ displacement < 2
20
, W]).
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