SPRUI04F july 2015 – april 2023
A source statement can contain five ordered fields (label, mnemonic, unit specifier, operand list, and comment). The general syntax for source statements is as follows:
label[:] | Labels are optional for all assembly language instructions and for most (but not all) assembly optimizer directives. When used, a label must begin in column 1 of a source statement. A label can be followed by a colon. |
[ register] | Square brackets ([ ]) enclose conditional instructions. The machine-instruction mnemonic is executed based on the value of the register within the brackets; valid register names are A0, A1, A2, B0, B1, B2, or symbolic. |
mnemonic | The mnemonic is a machine-instruction (such as ADDK, MVKH, B) or assembly optimizer directive (such as .proc, .trip) |
unit specifier | The optional unit specifier enables you to specify the functional unit operand. Only the specified unit side is used; other specifications are ignored. The preferred method is specifying register sides. |
operand list | The operand list is not required for all instructions or directives. The operands can be symbols, constants, or expressions and must be separated by commas. |
comment | Comments are optional. Comments that begin in column 1 must begin with a semicolon or an asterisk; comments that begin in any other column must begin with a semicolon. |
The C6000 assembly optimizer reads up to 200 characters per line. Any characters beyond 200 are truncated. Keep the operational part of your source statements (that is, everything other than comments) less than 200 characters in length for correct assembly. Your comments can extend beyond the character limit, but the truncated portion is not included in the .asm file.
Follow these guidelines in writing linear assembly code:
Refer to the TMS320C6000 Assembly Language Tools User's Guide for information on the syntax of C6000 instructions, including conditional instructions, labels, and operands.