![background image](http://html.mh-extra.com/html/texas-instruments/tms320c54x/tms320c54x_user-manual_1097113073.webp)
Expressions
3-27
Assembler Description
3.9.4
Conditional Expressions
The assembler supports relational operators that can be used in any
expression; they are especially useful for conditional assembly. Relational
operators include the following:
=
Equal to
= =
Equal to
! =
Not equal to
<
Less than
<=
Less than or equal to
>
Greater than
> =
Greater than or equal to
Conditional expressions evaluate to 1 if true and 0 if false; they can be used
only on operands of equivalent types, for example, absolute value compared
to absolute value, but not absolute value compared to relocatable value.
3.9.5
Relocatable Symbols and Legal Expressions
Table 3–2 summarizes valid operations on absolute, relocatable, and external
symbols. An expression cannot contain multiplication or division by a relocat-
able or external symbol. An expression cannot contain unresolved symbols
that are relocatable to other sections.
Symbols or registers that have been defined as global with the .global directive
can also be used in expressions; in Table 3–2, these symbols and registers are
referred to as
external.
Relocatable registers can be used in expressions; the addresses of these
registers are relocatable with respect to the register section they were defined
in, unless they have been declared as external.
Table 3–2. Expressions With Absolute and Relocatable Symbols
If A is... and
If B is... , then
A + B is... and
A – B is...
absolute
absolute
absolute
absolute
absolute
external
external
illegal
absolute
relocatable
relocatable
illegal
relocatable
absolute
relocatable
relocatable
relocatable
relocatable
illegal
absolute
†
relocatable
external
illegal
illegal
external
absolute
external
external
external
relocatable
illegal
illegal
external
external
illegal
illegal
† A and B must be in the same section; otherwise, this is illegal.
Summary of Contents for TMS320C54x
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 44: ......
Page 45: ......
Page 46: ......
Page 47: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 51: ......
Page 52: ......
Page 53: ......
Page 54: ......
Page 55: ......
Page 56: ......
Page 57: ......
Page 58: ......
Page 59: ......
Page 60: ......
Page 61: ......
Page 62: ......
Page 276: ......
Page 277: ......
Page 278: ......
Page 279: ......
Page 280: ......
Page 281: ......
Page 282: ......
Page 283: ......
Page 284: ......
Page 285: ......
Page 286: ......
Page 287: ......
Page 288: ......
Page 289: ......
Page 290: ......
Page 291: ......
Page 292: ......
Page 293: ......
Page 294: ......
Page 295: ......
Page 296: ......
Page 297: ......
Page 298: ......
Page 299: ......
Page 300: ......
Page 301: ......
Page 302: ......