
Initialize TMS320C3x Floating-Point Value
.float, .float16, .float8, .pfloat16, .pfloat8
6-21
Assembler Directives
Syntax
.float
value
1
[
,..., value
n
]
.float16
value
1
[
,..., value
n
]
.float8
value
1
[
,..., value
n
]
.pfloat16
value
1
[
,..., value
n
]
.pfloat8
value
1
[
,..., value
n
]
Description
These directive convert one or more values into TMS320C3x floating-point
constants.
-
The .float directive converts a
value into a 32-bit TMS320C3x floating-
point constant. This format has an 8-bit exponent and a 24-bit mantissa.
-
The .float16 directive converts a
value into a 16-bit TMS320C3x floating-
point constant. This format has an 8-bit exponent and an 8-bit mantissa.
-
The .float8 directive converts a
value into an 8-bit TMS320C3x floating-
point constant. This format has a 4-bit exponent and a 4-bit mantissa.
When properly scaled, this format can be used for quick logarithm approxi-
mations.
-
The .pfloat16 directive converts a
value into a 16-bit floating-point
constant. The values are packed into consecutive fields of memory.
-
The .pfloat8 directive converts a
value into an 8-bit floating-point
constant. The values are packed into consecutive fields of memory.
The
value is a required parameter; it is an expression that is evaluated and
placed in the constant. The value must be absolute.
Note that the ’C31 expects floating-point numbers to have the 32-bit format.
Example
Here is an example of these directives.
PI .set 3.1415926 ;.set remembers PI is float
.float –10/3, –0.1, 0, 0.1, PI,2*PI ;Some easy to compare values
.float8 –10/3, –0.1, 0, 0.1, PI,2*PI ;
.pfloat8 –10/3, –0.1, 0, 0.1, PI,2*PI ;
.float16 –10/3, –0.1, 0, 0.1, PI,2*PI ;
.pfloat16 –10/3, –0.1, 0, 0.1, PI,2*PI ;
.ieee –10/3, –0.1, 0, 0.1, PI,2*PI ;
Summary of Contents for TMS320C3 Series
Page 1: ...TMS320C3x DSP Starter Kit User s Guide...
Page 18: ...1 4...
Page 28: ...2 10...
Page 82: ...5 18...
Page 140: ...Communications Kernel Source Code A 12...
Page 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 146: ...Schematics B 6...
Page 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 148: ...Schematics B 8...
Page 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 150: ...Schematics B 10...
Page 154: ...B 14...
Page 160: ...C 6...
Page 166: ...Index 6...