Texas Instruments TMS320C54x User Manual page 156

Digital signal processors
Hide thumbs Also See for TMS320C54x:
Table of Contents

Advertisement

Syntax
Description
Example
.newblock
The .newblock directive undefines any local labels currently defined. Local
labels, by nature, are temporary; the .newblock directive resets them and
terminates their scope.
A local label is a label in the form $n, where n is a single decimal digit. A local
label, like other labels, points to an instruction word. Unlike other labels, local
labels cannot be used in expressions. Local labels are not included in the
symbol table.
After a local label has been defined and (perhaps) used, you should use the
.newblock directive to reset it. The .text, .data, and named sections also reset
local labels. Local labels that are defined within an include file are not valid out-
side of the local file.
This example shows how the local label $1 is declared, reset, and then
declared again.
1
2
0076
3
4 000000 1000! LABEL1: LD
5 000001 F010
000002 0076
6 000003 F843
000004 0008'
7 000005 1000!
8 000006 F073
000007 0009'
9
10 000008 1000! $1
11 000009 0000! $2
12
13 00000a F843
00000b 000D'
14 00000c 8000!
15 00000d F495
Terminate Local Symbol Block
.ref
ADDRA, ADDRB, ADDRC
B
.set
76h
ADDRA, A
SUB
#B, A
BC
$1, ALT
LD
ADDRB, A
B
$2
LD
ADDRA, A
ADD
ADDRC, A
.newblock
BC
$1, ALT
STL
A, ADDRC
$1
NOP
.newblock
; Undefine $1 to reuse
Assembler Directives
4-73

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C54x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents