Sample Definition Of Sections - Epson S5U1C63000A User Manual

Cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

CHAPTER 4: ASSEMBLER

4.6.3 Sample Definition of Sections

:
CODE1 (Relocatable program)
:
.data
:
DATA1 (Relocatable data definition)
:
.bss
:
BSS1 (Relocatable RAM area definition)
:
.code
... If this specification is omitted, a CODE section begins from the address following CODE1.
.org
0x0
:
CODE2 (Absolute program)
:
.bss
.org
0x0
... If this specification is omitted, a BSS section begins from the address following BSS1.
:
BSS2 (Absolute RAM area definition)
:
.code
:
CODE3 (Relocatable program)
:
.data
... If this specification is omitted, a DATA section begins from the address following DATA1.
.org
0x8000
:
DATA2 (Absolute data definition)
:
In the section definition shown above, absolute sections and relocatable sections are mixed in one source.
Absolute sections are sections whose absolute addresses are specified with the .org pseudo-instructions.
CODE2, BSS2 and DATA2 are absolute sections. Absolute sections will be located at the place specified.
Other sections are relocatable in the sense that the absolute location addresses are not fixed at the assem-
bly stage and will be fixed later at the linking stage.
Precautions
When there appears in a section a statement which is designed for other section, a warning will be
issued and a new section will be started according to the statement.
Examples: .code
.comm BUF 16
.bss
ld
62
... Warning; A new bss section begins
... Warning; A new code section begins
%a,%b
EPSON
(S1C63 FAMILY ASSEMBLER PACKAGE)
S5U1C63000A MANUAL

Advertisement

Table of Contents
loading

Table of Contents