s5u1c17001c Epson Electronics America, Inc., s5u1c17001c Datasheet - Page 358

no-image

s5u1c17001c

Manufacturer Part Number
s5u1c17001c
Description
Cmos 16-bit Application Specific Controller
Manufacturer
Epson Electronics America, Inc.
Datasheet
8 ASSEMBLER
8.4 Scope
Symbols defined in each source file can freely be referred to within that file. Such reference range of symbols is
termed scope.
Usually, reference can be made only within a defined file. If a symbol that does not exist in that file is referenced,
the as assembler creates the object file assuming that the symbol is an undefined symbol, leaving the problem to be
solved by the ld linker.
If your development project requires the use of multiple source files, it is necessary for the scope to be extended to
cover other source files. The as assembler has the pseudo-instructions that can be used for this purpose.
Symbols that can be referenced in only the file where they are defined are called "local symbols". Symbols that
are declared to be global are called "global symbols". Local symbols – even when symbols of the same name
are specified in two or more different files – are handled as different symbols. Global symbols – if defined as
overlapping in multiple files – cause a warning to be generated in the ld linker.
Example:
The as assembler regards the symbols SYMBOL and VAR1 in the file2 as those of undefined addresses in the
assembling, and includes that information in the object file it delivers. Those addresses are finally determined by
the processing of the ld linker.
8-4
file1: file in which global symbol is defined
SYMBOL:
LABEL:
VAR1:
file2: file in which a global symbol is referred
LABEL:
.global
.global
.section .bss
.align
.zero
xcall
xld.a
:
:
:
:
:
SYMBOL
%r1,VAR1
SYMBOL
VAR1
2
4
...Global declaration of symbols that are to be defined in this file.
...Local symbol
...Symbol externally referred
...Symbol externally referred
...Local symbol
(Can be referred to only in this file)
(Treated as a different symbol from LABEL of file1)
EPSON
(C COMPILER PACKAGE FOR S1C17 FAMILY) (Ver. 1.1)
S5U1C17001C MANUAL

Related parts for s5u1c17001c