Section 3: Assembler
185
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
.global / .globl — Declare External a Defined Symbol
Syntax
.global
symbol [, symbol] . . .
.globl
symbol [, symbol] . . .
Description
symbol
Specifies a symbol that is defined in the current file. Section
names and floating-point symbols are not allowed.
The .global and .globl directives declare the scope of the symbol
symbol to be
external. This is necessary when the symbol is referenced in other source files
since the default symbol scope is static. These directives are synonyms for the
.xdef directive.
Examples
.globl main, jmp_tbl
.global diag_list, proc1, eval
.ifdef — Assemble If Symbol Defined
Syntax
.ifdef
symbol
Description
symbol
Specifies a user-defined symbol.
The .ifdef directive introduces a conditional assembly block. If the specified
symbol
symbol is defined when the directive is encountered, then the statements
between this directive and the first matching .elifdef, .else, or .endif directive are
assembled and the remainder of the block is skipped. Otherwise, the statements
associated with the .ifdef directive are skipped and control passes to the
aforementioned matching directive.
Conditional assembly directives can be nested to 40 levels.
Example
.ifdef serial
move.l #serial_dev, io_func
.endif