
Constants
5-8
5.2
Constants
The assembler supports five types of constants:
-
Binary integer constants
-
Decimal integer constants
-
Hexadecimal integer constants
-
Floating-point constants
-
Character constants
The assembler maintains each constant internally as a 32-bit quantity.
Constants
are not sign extended. For example, the constant 0FFh is equal to
00FF (base 16) or 255 (base 10); it
does not equal –1.
Binary integers
A binary integer constant is a string of 0s and 1s followed by the suffix B (or
b). Examples of valid binary constants include:
0101b
Constant equal to 5
10101B
Constant equal to 21
–0101b
Constant equal to –5
Decimal integers
A decimal integer constant is a string of decimal digits, ranging from
–2 147 483 647 to 4 294 967 295. Examples of valid decimal constants in-
clude:
1000
Constant equal to 1 000
10
or 3E8
16
–32768
Constant equal to –32 768
10
or 8000
16
25
Constant equal to 25
10
or 19
16
Hexadecimal integers
A hexadecimal integer constant is a string of up to eight hexadecimal digits fol-
lowed by the suffix H (or h) or preceded by the prefix 0x. Hexadecimal digits
include the decimal values 0–9 and the letters A–F or a–f.
A hexadecimal
constant must begin with a decimal value (0–9). Examples of valid hexadeci-
mal constants include:
78H
Constant equal to 120
10
or 0078
16
0x0f
Constant equal to 15
10
or 000F
16
37ACh
Constant equal to 14 252
10
or 37AC
16
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...