Texas Instruments TMS320C54x User Manual page 137

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

Advertisement

.half/.uhalf/.short/.ushort
Syntax
Description
4-54
Initialize 16-bit Integer
.half value
1
.uhalf value
1
.short value
.ushort value
The .half, .uhalf, .short, and .ushort directives place one or more values into
consecutive 16-bit fields in the current section. A value can be:
-
An expression that the assembler evaluates and treats as an 16-bit signed
or unsigned number
-
A character string enclosed in double quotes. Each character in a string
represents a separate value.
The values can be either absolute or relocatable expressions. If an expression
is relocatable, the assembler generates a relocation entry that refers to the ap-
propriate symbol; the linker can then correctly patch (relocate) the reference.
This allows you to initialize memory with pointers to variables or labels.
The assembler truncates values greated than 16 bites. You can use as many
values as fit on a single line, but the total line length cannot exceed 200 charac-
ters. If you use a label, it points to the first initialized word.
When you use .half, .uhalf, .short, or .ushort in a .struct/.endstruct sequence,
they define a member's size; they do not initialize memory. For more informa-
tion about .struct/.endstruct, see Section 4.9, Assembly-Time Symbol Direc-
tives , on page 4-21.
[, ... , value
]
n
[, ... , value
]
n
[, ... , value
]
1
n
[, ... , value
]
1
n

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?

Table of Contents