174
Section 3: Assembler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
.def — Begin Symbol Attribute Block
Syntax
.def
symbol
Description
symbol
Specifies a symbol that is defined in the current assembler source
file or corresponding C source file.
The .def directive begins an attribute block for the symbol
symbol. The .dim,
.line, .scl, .size, .tag, .type, and .val directives are used to set the various
attributes of a symbol (see section 1.4 Object File Format). The .endef directive
must be used to end an attribute block. For convenience, the directives that
comprise a symbol attribute block can be specified as a backslash-separated list.
The information contained in an attribute block is stored in the object file’s symbol
table for purposes of symbolic debugging. The Sierra C compiler automatically
generates these attribute blocks for all symbols when the
-q
command line flag
is specified. They can be written manually when performing assembler
source-level debugging, but this is not recommended. Adequate debugging
information can be generated with the
-L
assembler command line flag, which
directs the assembler to generate line number information, and with the .type
directive, which can be used to specify symbol types directly (i.e., without a
symbol attribute block).
Examples
.def init
.val init
.scl 2
.type 0x24
.endef
.def tbl \ .val 12 \ .scl 3 \ .type 0x4 \ .endef