142
Section 3: Assembler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
By default, the scope of a symbol is
static (i.e., local to the file in which it is
defined). The scope of a symbol can be extended to
external with the
.xdef / XDEF directive; this allows it to be referenced from within any other
source file that declares it to be external (see .xref / XREF directive). The term
local is reserved for describing scopes that are limited to a subset of a source file
(e.g., a label local to a macro invocation).
The remainder of this section describes the syntax of symbol names and the
methods available to define symbols, set their values, and modify their scopes.
3.3.5.1. Symbol
Syntax
The syntax used for constructing symbol names differs between the two
assemblers. When using asm68, symbol names can be composed of the
following characters:
•
The alphabetical characters A – Z and a – z.
•
The numerical characters 0 – 9.
•
The underscore ( _ ).
They cannot begin with a numerical character. When using asm68k, symbol
names can be composed of the following characters:
•
The alphabetical characters A – Z and a – z.
•
The numerical characters 0 – 9.
•
The underscore ( _ ).
•
The period ( . ).
•
The dollar sign ( $ ).
They cannot begin with a numerical character or the dollar sign. For certain types
of symbol names, there are exceptions to these rules. They are clearly noted
where applicable.
Symbol names are case-sensitive by default. The OPT NOCASE directive can
be used to render symbol names case-insensitive (asm68k). When symbol
names are case-insensitive, they are converted to lowercase before entry into
the symbol table. There is no explicit maximum length for symbol names. Their
length is limited only by the maximum length of a source input line, which is 256
characters. All characters of a symbol name are significant.