s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 179

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
11.6 Scope
Symbols defined in each source file can freely be referred to within that file. Such reference range of symbols is
termed scope.
This scope remains the same both in the relocatable and the absolute assembling. Usually, reference can be made
only within a defined file. If a symbol that does not exist in that file is referenced, the as33 creates the object file
assuming that the symbol is an undefined symbol, leaving the problem to be solved by the lk33.
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 as33 has the pseudo-instructions (.global, .comm) that can be used for this
purpose. Use these instructions to declare that the symbol is a global symbol, so that it can referenced in other
source files.
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 lk33.
Example:
SYMBOL:
LABEL:
LABEL:
The as33 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 linker.
S5U1C33000C MANUAL
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
file1: file in which global symbol is defined
file2: file in which a global symbol is referred
.global
.comm
ext
ext
call
ext
ext
ld.w
SYMBOL
VAR1
SYMBOL@rh
SYMBOL@m
SYMBOL@rl
VAR1@h
VAR1@m
%r1, VAR1@l
:
:
:
:
:
4
...Global declaration of a symbol which is to be defined in this file.
...Local symbo
...Symbol externally referred
...Symbol externally referred
...Local symbol
(Treated as a different symbol from LABEL of file1)
(Can be referred to only in this file)
EPSON
CHAPTER 11: ASSEMBLER
163

Related parts for s5u1c33000c