SPRU513Y August 2001 – June 2022 SM320F28335-EP
Each line in a TMS320C28x assembly input file can be empty, a comment, an assembler directive, a macro invocation, or an assembly instruction.
Assembly language source statements can contain four ordered fields (label, mnemonic, operand list, and comment). The general syntax for source statements is as follows:
[label[:] ] [||] mnemonic [operand list] [;comment] |
Labels cannot be placed on instructions that have parallel bars.
Following are examples of source statements:
two .set 2 ; Symbol two = 2
Begin: MOV AR1,#two ; Load AR1 with 2
.word 016h ; Initialize a word with 016h
The C28x assembler reads an unlimited number of characters per line. Source statements that extend beyond 400 characters in length (including comments) are truncated in the listing file.
Follow these guidelines:
A mnemonic cannot begin in column 1 or it will be interpreted as a label. Mnemonic opcodes and assembler directive names without the . prefix are valid label names. Remember to always use whitespace before the mnemonic, or the assembler will think the identifier is a new label definition.
The following sections describe each of the fields.