62 EPSON S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
5.6.3 Sample Definition of Sections
:
CODE1 (Relocatable program)
:
.bss
:
BSS1 (Relocatable RAM area definition)
:
.code
:
CODE2 (Relocatable program)
:
.bss
.org 0x100 ...
If this specification is omitted, a BSS section begins from the address following BSS1.
:
BSS2 (Absolute RAM area definition)
:
.code
:
CODE3 (Relocatable program)
:
.code
.org 0x0
:
CODE4 (Absolute program)
:
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.
BSS2 and CODE4 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 ... Warning; A new bss section begins
.bss
ld a,b ... Warning; A new code section begins
One section cannot cross over a bank or page boundary.