Defining Labels; Rewritten Source Code - Texas Instruments TMS320C54x User Manual

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

Advertisement

How the Translator Works With Macros
11.5.3 Defining Labels When Invoking A Macro
Figure 11–4.Defining Labels
Figure 11–5.Rewritten Source Code
11-10
If there is a label associated with a macro invocation, that label is not used after
expansion and translation. This is because the label is commented out with the
macro invocation. The following source code preprocesses to the intermediate
code as shown:
(a) Source code:
mymac .macro
.word F403
.endm
LABEL mymac
(b) Intermediate code:
mymac .macro
.word F403
.endm
;LABEL
mymac
.word F403
LABEL is not defined when the code is assembled. Insure that label definitions
do not appear on the same line as the macro invocations. Rewrite the source
code in the example above as follows:
mymac .macro
.word F403
.endm
LABEL
mymac

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