Chapter 3. Assembly Language
This chapter describes the most important aspects of the TASKING assembly language for TriCore. For a complete overview of the architecture you are using, refer to the target's core Architecture Manual (for example the TriCore2 Architecture Manual [2002, Infineon]).
3.1. Assembly Syntax
An assembly program consists of statements. A statement may optionally be followed by a comment.
Any source statement can be extended to more lines by including the line continuation character (\) as the last character on the line. The length of a source statement (first line and continuation lines) is only limited by the amount of available memory.
Mnemonics and directives are case insensitive. Labels, symbols, directive arguments, and literal strings are case sensitive.
The syntax of an assembly statement is:
[label[:]] [instruction | directive | macro_call] [;comment]
label
A label is a special symbol which is assigned the value and type of the current program location counter. A label can consist of letters, digits and underscore characters (_). The first character cannot be a digit. A label which is prefixed by whitespace (spaces or tabs) has to be followed by a colon (:). The size of an identifier is only limited by the amount of available memory.
Examples:
LAB1: ; This label is followed by a colon and
; can be prefixed by whitespace
LAB1 ; This label has to start at the beginning
; of a line
instruction directive macro_call
An instruction consists of a mnemonic and zero, one or more operands. It must not start in the first column.
Operands are described in
Section 3.3, Operands of an Assembly Instruction
.
The instructions are described in the target's core Architecture Manual.
With directives you can control the assembler from within the assembly source.
Except for preprocessing directives, these must not start in the first column.
Directives are described in
Section 3.9, Assembler Directives and Controls
.
A call to a previously defined macro. It must not start in the first column. See
Section 3.10, Macro Operations .
Comment, preceded by a ; (semicolon).
comment
You can use empty lines or lines with only comments.
87