TMS320C6000 Assembly Language
Tools
v8.2.x User's Guide
SPRUI03B - REVISED MAY 2017
6 Macro Language Description
The TMS320C6000 assembler supports a macro language that enables you to create your own instructions. This is especially useful when a program executes a particular task several times. The macro language lets you:
- Define your own macros and redefine existing macros
- Simplify long or complicated assembly code
- Access macro libraries created with the archiver
- Define conditional and repeatable blocks within a macro
- Manipulate strings within a macro
- Control expansion listing
6.1 Using Macros
Programs often contain routines that are executed several times. Instead of repeating the source statements for a routine, you can define the routine as a macro, then call the macro in the places where you would normally repeat the routine. This simplifies and shortens your source program.
If you want to call a macro several times but with different data each time, you can assign parameters within a macro. This enables you to pass different information to the macro each time you call it. The macro language supports a special symbol called a substitution symbol, which is used for macro parameters. See Section 6.3 for more information.
Using a macro is a 3-step process.
-
Define the macro. You must define macros before you can use them in your program. There are two methods for defining macros:
- Macros can be defined at the beginning of a source file or in a copy/include file. See Section 6.2, Defining Macros, for more information.
- Macros can also be defined in a macro library. A macro library is a collection of files in archive format created by the archiver. Each member of the archive file (macro library) may contain one macro definition corresponding to the member name. You can access a macro library by using the .mlib directive. For more information, see Section 6.4.
- Call the macro. After you have defined a macro, call it by using the macro name as a mnemonic in the source program. This is referred to as a macro call.
- Expand the macro. The assembler expands your macros when the source program calls them. During expansion, the assembler passes arguments by variable to the macro parameters, replaces the macro call statement with the macro definition, then assembles the source code. By default, the macro expansions are printed in the listing file. You can turn off expansion listing by using the .mnolist directive. For more information, see Section 6.8.
When the assembler encounters a macro definition, it places the macro name in the opcode table. This redefines any previously defined macro, library entry, directive, or instruction mnemonic that has the same name as the macro. This allows you to expand the functions of directives and instructions, as well as to add new instructions.
6.2 Defining Macros
You can define a macro anywhere in your program, but you must define the macro before you can use it. Macros can be defined at the beginning of a source file or in a .copy/.include file (see Copy Source File); they can also be defined in a macro library. For more information about macro libraries, see Section 6.4.
Macro definitions can be nested, and they can call other macros, but all elements of the macro must be defined in the same file. Nested macros are discussed in Section 6.9.
A macro definition is a series of source statements in the following format:
macname | .macro [parameter1 ] [, ... ,parametern ] |
model statements or macro directives | |
[.mexit] | |
.endm |
macname | names the macro. You must place the name in the source statement's label field. Only the first 128 characters of a macro name are significant. The assembler places the macro name in the internal opcode table, replacing any instruction or previous macro definition with the same name. |
.macro | is the directive that identifies the source statement as the first line of a macro definition. You must place .macro in the opcode field. |
parameter1, parametern |
are optional substitution symbols that appear as operands for the .macro directive. Parameters are discussed in Section 6.3. |
model statements | are instructions or assembler directives that are executed each time the macro is called. |
macro directives | are used to control macro expansion. |
.mexit | is a directive that functions as a goto .endm. The .mexit directive is useful when error testing confirms that macro expansion fails and completing the rest of the macro is unnecessary. |
.endm | is the directive that terminates the macro definition. |
If you want to include comments with your macro definition but do not want those comments to appear in the macro expansion, use an exclamation point to precede your comments. If you do want your comments to appear in the macro expansion, use an asterisk or semicolon. See Section 6.7 for more information about macro comments.
Example 6-1 shows the definition, call, and expansion of a macro.
Example 6-1 Macro Definition, Call, and Expansion
Macro definition: The following code defines a macro, sadd4, with four parameters:
1 sadd4 .macro r1,r2,r3,r4
2 !
3 ! sadd4 r1, r2 ,r3, r4
4 ! r1 = r1 + r2 + r3 + r4 (saturated)
5 !
6 SADD r1,r2,r1
7 SADD r1,r3,r1
8 SADD r1,r4,r1
9 .endm
Macro call: The following code calls the sadd4 macro with four arguments:
10
11 00000000 sadd4 A0,A1,A2,A3
Macro expansion: The following code shows the substitution of the macro definition for the macro call. The assembler substitutes A0, A1, A2, and A3 for the r1, r2, r3, and r4 parameters of sadd4.
1 00000000 00040278 SADD A0,A1,A0
1 00000004 00080278 SADD A0,A2,A0
1 00000008 000C0278 SADD A0,A3,A0
6.3 Macro Parameters/Substitution Symbols
If you want to call a macro several times with different data each time, you can assign parameters within the macro. The macro language supports a special symbol, called a substitution symbol, which is used for macro parameters.
Macro parameters are substitution symbols that represent a character string. These symbols can also be used outside of macros to equate a character string to a symbol name (see Section 4.8.10).
Valid substitution symbols can be up to 128 characters long and must begin with a letter. The remainder of the symbol can be a combination of alphanumeric characters, underscores, and dollar signs.
Substitution symbols used as macro parameters are local to the macro they are defined in. You can define up to 32 local substitution symbols (including substitution symbols defined with the .var directive) per macro. For more information about the .var directive, see Section 6.3.6.
During macro expansion, the assembler passes arguments by variable to the macro parameters. The character-string equivalent of each argument is assigned to the corresponding parameter. Parameters without corresponding arguments are set to the null string. If the number of arguments exceeds the number of parameters, the last parameter is assigned the character-string equivalent of all remaining arguments.
If you pass a list of arguments to one parameter or if you pass a comma or semicolon to a parameter, you must surround these terms with quotation marks.
At assembly time, the assembler replaces the macro parameter/substitution symbol with its corresponding character string, then translates the source code into object code.
Example 6-2 shows the expansion of a macro with varying numbers of arguments.
Example 6-2 Calling a Macro With Varying Numbers of Arguments
Macro definition:
Parms .macro a,b,c
; a = :a:
; b = :b:
; c = :c:
.endm
Calling the macro:
Parms 100,label Parms 100,label,x,y
; a = 100 ; a = 100
; b = label ; b = label
; c = "" ; c = x,y
Parms 100, , x Parms "100,200,300",x,y
; a = 100 ; a = 100,200,300
; b = "" ; b = x
; c = x ; c = y
Parms """string""",x,y
; a = "string"; b = x
; c = y
6.3.1 Directives That Define Substitution Symbols
You can manipulate substitution symbols with the .asg and .eval directives.
- The .asg directive assigns a character string to a substitution symbol.
For the .asg directive, the quotation marks are optional. If there are no quotation marks, the assembler reads characters up to the first comma and removes leading and trailing blanks. In either case, a character string is read and assigned to the substitution symbol. The syntax of the .asg directive is:
.asg["]character string["], substitution symbol |
Example 6-3 shows character strings being assigned to substitution symbols.
- The .eval directive performs arithmetic on numeric substitution symbols.
The .eval directive evaluates the expression and assigns the string value of the result to the substitution symbol. If the expression is not well defined, the assembler generates an error and assigns the null string to the symbol. The syntax of the .eval directive is:
.evalwell-defined expression, substitution symbol |
Example 6-4 shows arithmetic being performed on substitution symbols.
Example 6-4 The .eval Directive
.asg 1,counter
.loop 100
.word counter
.eval counter + 1,counter
.endloop
In Example 6-4, the .asg directive could be replaced with the .eval directive (.eval 1, counter) without changing the output. In simple cases like this, you can use .eval and .asg interchangeably. However, you must use .eval if you want to calculate a value from an expression. While .asg only assigns a character string to a substitution symbol, .eval evaluates an expression and then assigns the character string equivalent to a substitution symbol.
See Assign a Substitution Symbol for more information about the .asg and .eval assembler directives.
6.3.2 Built-In Substitution Symbol Functions
The following built-in substitution symbol functions enable you to make decisions on the basis of the string value of substitution symbols. These functions always return a value, and they can be used in expressions. Built-in substitution symbol functions are especially useful in conditional assembly expressions. Parameters of these functions are substitution symbols or character-string constants.
In the function definitions shown in Table 6-1, a and b are parameters that represent substitution symbols or character-string constants. The term string refers to the string value of the parameter. The symbol ch represents a character constant.
Table 6-1 Substitution Symbol Functions and Return Values
Function | Return Value |
---|---|
$symlen(a) | Length of string a |
$symcmp(a,b) | < 0 if a < b; 0 if a = b; > 0 if a > b |
$firstch(a,ch) | Index of the first occurrence of character constant ch in string a |
$lastch(a,ch) | Index of the last occurrence of character constant ch in string a |
$isdefed(a) | 1 if string a is defined in the symbol table |
0 if string a is not defined in the symbol table | |
$ismember(a,b) | Top member of list b is assigned to string a |
0 if b is a null string | |
$iscons(a) | 1 if string a is a binary constant |
2 if string a is an octal constant | |
3 if string a is a hexadecimal constant | |
4 if string a is a character constant | |
5 if string a is a decimal constant | |
$isname(a) | 1 if string a is a valid symbol name |
0 if string a is not a valid symbol name | |
$isreg(a)(1) | 1 if string a is a valid predefined register name |
0 if string a is not a valid predefined register name |
Example 6-5 shows built-in substitution symbol functions.
Example 6-5 Using Built-In Substitution Symbol Functions
pushx .macro list
!
! Push more than one item
! $ismember removes the first item in the list
.var item
.loop
.break ($ismember(item, list) = 0)
STW item,*B15--[1]
.endloop
.endm
pushx A0,A1,A2,A3
6.3.3 Recursive Substitution Symbols
When the assembler encounters a substitution symbol, it attempts to substitute the corresponding character string. If that string is also a substitution symbol, the assembler performs substitution again. The assembler continues doing this until it encounters a token that is not a substitution symbol or until it encounters a substitution symbol that it has already encountered during this evaluation.
In Example 6-6, the x is substituted for z; z is substituted for y; and y is substituted for x. The assembler recognizes this as infinite recursion and ceases substitution.
Example 6-6 Recursive Substitution
.asg "x",z ; declare z and assign z = "x" .asg "z",y ; declare y and assign y = "z" .asg "y",x ; declare x and assign x = "y" MVKL x, A1
MVKH x, A1
* MVKL x, A1 ; recursive expansion
* MVKH x, A1 ; recursive expansion
6.3.4 Forced Substitution
In some cases, substitution symbols are not recognizable to the assembler. The forced substitution operator, which is a set of colons surrounding the symbol, enables you to force the substitution of a symbol's character string. Simply enclose a symbol with colons to force the substitution. Do not include any spaces between the colons and the symbol. The syntax for the forced substitution operator is:
:symbol: |
The assembler expands substitution symbols surrounded by colons before expanding other substitution symbols.
You can use the forced substitution operator only inside macros, and you cannot nest a forced substitution operator within another forced substitution operator.
Example 6-7 shows how the forced substitution operator is used.
6.3.5 Accessing Individual Characters of Subscripted Substitution Symbols
In a macro, you can access the individual characters (substrings) of a substitution symbol with subscripted substitution symbols. You must use the forced substitution operator for clarity.
You can access substrings in two ways:
- :symbol (well-defined expression):
- :symbol (well-defined expression1, well-defined expression2):
This method of subscripting evaluates to a character string with one character.
In this method, expression1 represents the substring's starting position, and expression2 represents the substring's length. You can specify exactly where to begin subscripting and the exact length of the resulting character string. The index of substring characters begins with 1, not 0.
Example 6-8 and Example 6-9 show built-in substitution symbol functions used with subscripted substitution symbols. In Example 6-8, subscripted substitution symbols redefine the STW instruction so that it handles immediates. In Example 6-9, the subscripted substitution symbol is used to find a substring strg1 beginning at position start in the string strg2. The position of the substring strg1 is assigned to the substitution symbol pos.
Example 6-8 Using Subscripted Substitution Symbols to Redefine an Instruction
storex .macro x
.var tmp
.asg :x(1):, tmp
.if $symcmp(tmp,"A") == 0
STW x,*A15--(4)
.elseif $symcmp(tmp,"B") == 0
STW x,*A15--(4)
.elseif $iscons(x)
MVK x,A0
STW A0,*A15--(4)
.else
.emsg "Bad Macro Parameter" .endif
.endm
storex 10h
storex A15
Example 6-9 Using Subscripted Substitution Symbols to Find Substrings
substr .macro start,strg1,strg2,pos
.var len1,len2,i,tmp
.if $symlen(start) = 0
.eval 1,start
.endif
.eval 0,pos
.eval start,i
.eval $symlen(strg1),len1
.eval $symlen(strg2),len2
.loop
.break I = (len2 - len1 + 1)
.asg ":strg2(i,len1):",tmp
.if $symcmp(strg1,tmp) = 0
.eval i,pos
.break
.else
.eval I + 1,i
.endif
.endloop
.endm
.asg 0,pos
.asg "ar1 ar2 ar3 ar4",regs
substr 1,"ar2",regs,pos
.word pos
6.3.6 Substitution Symbols as Local Variables in Macros
If you want to use substitution symbols as local variables within a macro, you can use the .var directive to define up to 32 local macro substitution symbols (including parameters) per macro. The .var directive creates temporary substitution symbols with the initial value of the null string. These symbols are not passed in as parameters, and they are lost after expansion.
.var sym1 [,sym2 , ... ,symn ] |
The .var directive is used in Example 6-8 and Example 6-9.
6.4 Macro Libraries
One way to define macros is by creating a macro library. A macro library is a collection of files that contain macro definitions. You must use the archiver to collect these files, or members, into a single file (called an archive). Each member of a macro library contains one macro definition. The files in a macro library must be unassembled source files. The macro name and the member name must be the same, and the macro filename's extension must be .asm. For example:
Macro Name | Filename in Macro Library |
---|---|
simple | simple.asm |
add3 | add3.asm |
You can access the macro library by using the .mlib assembler directive (described in Define Macro Library). The syntax is:
.mlibfilename |
When the assembler encounters the .mlib directive, it opens the library named by filename and creates a table of the library's contents. The assembler enters the names of the individual members within the library into the opcode tables as library entries; this redefines any existing opcodes or macros that have the same name. If one of these macros is called, the assembler extracts the entry from the library and loads it into the macro table.
The assembler expands the library entry the same way it expands other macros. See Section 6.1 for how the assembler expands macros. You can control the listing of library entry expansions with the .mlist directive. For information about the .mlist directive, see Section 6.8 and Start/Stop Macro Expansion Listing. Only macros that are actually called from the library are extracted, and they are extracted only once.
You can use the archiver to create a macro library by including the desired files in an archive. A macro library is no different from any other archive, except that the assembler expects the macro library to contain macro definitions. The assembler expects only macro definitions in a macro library; putting object code or miscellaneous source files into the library may produce undesirable results. For information about creating a macro library archive, see Section 7.1.
6.5 Using Conditional Assembly in Macros
The conditional assembly directives are .if/.elseif/.else/.endif and .loop/ .break/.endloop. They can be nested within each other up to 32 levels deep. The format of a conditional block is:
.ifwell-defined expression | |
[.elseifwell-defined expression] | |
[.else] | |
.endif |
The .elseif and .else directives are optional in conditional assembly. The .elseif directive can be used more than once within a conditional assembly code block. When .elseif and .else are omitted and when the .if expression is false (0), the assembler continues to the code following the .endif directive. See Assemble Conditional Blocks for more information on the .if/ .elseif/.else/.endif directives.
The .loop/.break/.endloop directives enable you to assemble a code block repeatedly. The format of a repeatable block is:
.loop [well-defined expression] | |
[.break [well-defined expression]] | |
.endloop |
The .loop directive's optional well-defined expression evaluates to the loop count (the number of loops to be performed). If the expression is omitted, the loop count defaults to 1024 unless the assembler encounters a .break directive with an expression that is true (nonzero). See Assemble Conditional Blocks Repeatedly for more information on the .loop/.break/.endloop directives.
The .break directive and its expression are optional in repetitive assembly. If the expression evaluates to false, the loop continues. The assembler breaks the loop when the .break expression evaluates to true or when the .break expression is omitted. When the loop is broken, the assembler continues with the code after the .endloop directive. For more information, see Section 5.7.
Example 6-10 , Example 6-11, and Example 6-12 show the .loop/.break/ .endloop directives, properly nested conditional assembly directives, and built-in substitution symbol functions used in a conditional assembly code block.
Example 6-10 The .loop/.break/.endloop Directives
.asg 1,x
.loop
.break (x == 10) ; if x == 10, quit loop/break with expression
.eval x+1,x
.endloop
Example 6-11 Nested Conditional Assembly Directives
.asg 1,x
.loop
.if (x == 10) ; if x == 10, quit loop
.break (x == 10) ; force break
.endif
.eval x+1,x
.endloop
Example 6-12 Built-In Substitution Symbol Functions in a Conditional Assembly Code Block
MACK3 .macro src1, src2, sum, k
!
! dst = dst + k * (src1 * src2)
.if k = 0
MPY src1, src2, src2
NOP
ADD src2, sum, sum
.else
MPY src1,src2,src2
MVK k,src1
MPY src1,src2,src2
NOP
ADD src2,sum,sum
.endif
.endm
MACK3 A0,A1,A3,0
MACK3 A0,A1,A3,100
6.6 Using Labels in Macros
All labels in an assembly language program must be unique. This includes labels in macros. If a macro is expanded more than once, its labels are defined more than once. Defining a label more than once is illegal. The macro language provides a method of defining labels in macros so that the labels are unique. Simply follow each label with a question mark, and the assembler replaces the question mark with a period followed by a unique number. When the macro is expanded, you do not see the unique number in the listing file. Your label appears with the question mark as it did in the macro definition. You cannot declare this label as global. See Section 4.8.3 for more about labels.
The syntax for a unique label is:
label? |
Example 6-13 shows unique label generation in a macro. The maximum label length is shortened to allow for the unique suffix. For example, if the macro is expanded fewer than 10 times, the maximum label length is 126 characters. If the macro is expanded from 10 to 99 times, the maximum label length is 125. The label with its unique suffix is shown in the cross-listing file. To obtain a cross-listing file, invoke the assembler with the --cross_reference option (see Section 4.3).
Example 6-13 Unique Labels in a Macro
1 min .macro x,y,z
2
3 MV y,z
4 || CMPLT x,y,y
5 [y] B l?
6 NOP 5
7 MV x,z
8 l?
9 .endm
10
11
12 00000000 MIN A0,A1,A2
1
1 00000000 010401A1 MV A1,A2
1 00000004 00840AF8 || CMPLT A0,A1,A1
1 00000008 80000292 [A1] B l?
1 0000000c 00008000 NOP 5
1 00000010 010001A0 MV A0,A2
1 00000014 l?
LABEL VALUE DEFN REF
.TMS320C60 00000001 0
.tms320C60 00000001 0
l$1$ 00000014' 12 12
6.7 Producing Messages in Macros
The macro language supports three directives that enable you to define your own assembly-time error and warning messages. These directives are especially useful when you want to create messages specific to your needs. The last line of the listing file shows the error and warning counts. These counts alert you to problems in your code and are especially useful during debugging.
.emsg | sends error messages to the listing file. The .emsg directive generates errors in the same manner as the assembler, incrementing the error count and preventing the assembler from producing an object file. |
.mmsg | sends assembly-time messages to the listing file. The .mmsg directive functions in the same manner as the .emsg directive but does not set the error count or prevent the creation of an object file. |
.wmsg | sends warning messages to the listing file. The .wmsg directive functions in the same manner as the .emsg directive, but it increments the warning count and does not prevent the generation of an object file. |
Macro comments are comments that appear in the definition of the macro but do not show up in the expansion of the macro. An exclamation point in column 1 identifies a macro comment. If you want your comments to appear in the macro expansion, precede your comment with an asterisk or semicolon.
Example 6-14 shows user messages in macros and macro comments that do not appear in the macro expansion.
For more information about the .emsg, .mmsg, and .wmsg assembler directives, see Define Messages.
Example 6-14 Producing Messages in a Macro
TEST .macro x,y
!
! This macro checks for the correct number of parameters.
! It generates an error message if x and y are not present.
!
! The first line tests for proper input.
!
.if ($symlen(x) + ||$symlen(y) == 0)
.emsg "ERROR --missing parameter in call to TEST" .mexit
.else
.
.
.endif
.if
.
.
.endif
.endm
6.8 Using Directives to Format the Output Listing
Macros, substitution symbols, and conditional assembly directives may hide information. You may need to see this hidden information, so the macro language supports an expanded listing capability.
By default, the assembler shows macro expansions and false conditional blocks in the list output file. You may want to turn this listing off or on within your listing file. Four sets of directives enable you to control the listing of this information:
|
||
.mlist | expands macros and .loop/.endloop blocks. The .mlist directive prints all code encountered in those blocks. | |
.mnolist |
suppresses the listing of macro expansions and .loop/ .endloop blocks. | |
For macro and loop expansion listing, .mlist is the default. | ||
|
||
.fclist | causes the assembler to include in the listing file all conditional blocks that do not generate code (false conditional blocks). Conditional blocks appear in the listing exactly as they appear in the source code. | |
.fcnolist | suppresses the listing of false conditional blocks. Only the code in conditional blocks that actually assemble appears in the listing. The .if, .elseif, .else, and .endif directives do not appear in the listing. | |
For false conditional block listing, .fclist is the default. | ||
|
||
.sslist | expands substitution symbols in the listing. This is useful for debugging the expansion of substitution symbols. The expanded line appears below the actual source line. | |
.ssnolist | turns off substitution symbol expansion in the listing. | |
For substitution symbol expansion listing, .ssnolist is the default. | ||
|
||
.drlist | causes the assembler to print to the listing file all directive lines. | |
.drnolist | suppresses the printing of certain directives in the listing file. These directives are .asg, .eval, .var, .sslist, .mlist, .fclist, .ssnolist, .mnolist, .fcnolist, .emsg, .wmsg, .mmsg, .length, .width, and .break. | |
For directive listing, .drlist is the default. |
6.9 Using Recursive and Nested Macros
The macro language supports recursive and nested macro calls. This means that you can call other macros in a macro definition. You can nest macros up to 32 levels deep. When you use recursive macros, you call a macro from its own definition (the macro calls itself).
When you create recursive or nested macros, you should pay close attention to the arguments that you pass to macro parameters because the assembler uses dynamic scoping for parameters. This means that the called macro uses the environment of the macro from which it was called.
Example 6-15 shows nested macros. The y in the in_block macro hides the y in the out_block macro. The x and z from the out_block macro, however, are accessible to the in_block macro.
Example 6-15 Using Nested Macros
in_block .macro y,a
. ; visible parameters are y,a and x,z from the calling macro
.endm
out_block .macro x,y,z
. ; visible parameters are x,y,z
.
in_block x,y ; macro call with x and y as arguments
.
.
.endm
out_block ; macro call
Example 6-16 shows recursive and fact macros. The fact macro produces assembly code necessary to calculate the factorial of n, where n is an immediate value. The result is placed in the A1 register . The fact macro accomplishes this by calling fact1, which calls itself recursively.
Example 6-16 Using Recursive Macros
.fcnolist
fact1 .macro n
.if n == 1
MVK globcnt, A1 ; Leave the answer in the A1 register.
.else
.eval 1, temp ; Compute the decrement of symbol n.
.eval globcnt*temp, globcnt ; Multiply to get a new result.
fact1 temp ; Recursive call.
.endif
.endm
fact .macro n
.if ! $iscons(n) ; Test that input is a constant.
.emsg "Parm not a constant" .elseif n < 1 ; Type check input.
MVK 0, A1
.else
.var temp
.asg n, globcnt
fact1 n ; Perform recursive procedure
.endif
.endm
6.10 Macro Directives Summary
The directives listed in Table 6-2 through Table 6-6 can be used with macros. The .macro, .mexit, .endm and .var directives are valid only with macros; the remaining directives are general assembly language directives.
Table 6-2 Creating Macros
See | |||
---|---|---|---|
Mnemonic and Syntax | Description | Macro Use | Directive |
.endm | End macro definition | Section 6.2 | .endm |
macname .macro [parameter1 ][,... , parametern ] | Define macro by macname | Section 6.2 | .macro |
.mexit | Go to .endm | Section 6.2 | Section 6.2 |
.mlib filename | Identify library containing macro definitions | Section 6.4 | .mlib |
Table 6-3 Manipulating Substitution Symbols
See | |||
---|---|---|---|
Mnemonic and Syntax | Description | Macro Use | Directive |
.asg ["]character string["], substitution symbol | Assign character string to substitution symbol | Section 6.3.1 | .asg |
.eval well-defined expression, substitution symbol | Perform arithmetic on numeric substitution symbols | Section 6.3.1 | .eval |
.var sym1 [,sym2 , ...,symn ] | Define local macro symbols | Section 6.3.6 | .var |
Table 6-4 Conditional Assembly
See | |||
---|---|---|---|
Mnemonic and Syntax | Description | Macro Use | Directive |
.break [well-defined expression] | Optional repeatable block assembly | Section 6.5 | .break |
.endif | End conditional assembly | Section 6.5 | .endif |
.endloop | End repeatable block assembly | Section 6.5 | .endloop |
.else | Optional conditional assembly block | Section 6.5 | .else |
.elseif well-defined expression | Optional conditional assembly block | Section 6.5 | .elseif |
.if well-defined expression | Begin conditional assembly | Section 6.5 | .if |
.loop [well-defined expression] | Begin repeatable block assembly | Section 6.5 | .loop |
Table 6-5 Producing Assembly-Time Messages
See | |||
---|---|---|---|
Mnemonic and Syntax | Description | Macro Use | Directive |
.emsg | Send error message to standard output | Section 6.7 | .emsg |
.mmsg | Send assembly-time message to standard output | Section 6.7 | .mmsg |
.wmsg | Send warning message to standard output | Section 6.7 | .wmsg |
Table 6-6 Formatting the Listing
See | |||
---|---|---|---|
Mnemonic and Syntax | Description | Macro Use | Directive |
.fclist | Allow false conditional code block listing (default) | Section 6.8 | .fclist |
.fcnolist | Suppress false conditional code block listing | Section 6.8 | .fcnolist |
.mlist | Allow macro listings (default) | Section 6.8 | .mlist |
.mnolist | Suppress macro listings | Section 6.8 | .mnolist |
.sslist | Allow expanded substitution symbol listing | Section 6.8 | .sslist |
.ssnolist | Suppress expanded substitution symbol listing (default) | Section 6.8 | .ssnolist |
Copyright© 2017, Texas Instruments Incorporated. An IMPORTANT NOTICE for this document addresses availability, warranty, changes, use in safety-critical applications, intellectual property matters and other important disclaimers.