S5U1C62000A MANUAL EPSON 71
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
5.7.5 Section Defining Pseudo-Instructions (.code, .bss)
The section defining pseudo-instructions define one related group of codes or data and make it possible
to reallocate by the groups at the later linking stage. Even if these section defining pseudo-instructions
are not used, the section kind will be automatically judged by its contents and causes no error. If the new
codes or data without section definition are different from the previous code or data kind, they will be
taken as another new section.
.code pseudo-instruction
Instruction format
.code
Function
Declares the start of a CODE section. Statements following this instruction are assembled as those to
be mapped in the program ROM, until another section is declared.
The CODE section is set by default in the assembler. Therefore, the .code pseudo-instruction can be
omitted at top of a source file. Always describe it when you change a section to a CODE section.
Precautions
•A CODE section can be divided among multiple locations of a source file for purpose of definition
(describing the .code pseudo-instruction in the respective start positions).
Sections are relocatable by default unless those locations are specified with the .org, .page or .bank
pseudo-instructions, or more loosely with the .align pseudo-instruction.
.bss pseudo-instruction
Instruction format
.bss
Function
Declares the start of a BSS section. Statements following this instruction are assembled as those to be
mapped in the RAM, until another section is declared.
Precautions
In a BSS section, nothing else other than the .comm, .lcomm, and .org pseudo-instructions, symbols,
and comments can be described.
•A BSS section can be divided among multiple locations of a source file for purpose of definition
(describing the .bss pseudo-instruction in the respective start positions).
•A BSS section is relocatable by default unless its address is specified with the .org pseudo-instruction.
It is possible to specify absolute locations for CODE sections by page number with the .page pseudo-
instruction or by bank number with the .bank pseudo-instruction, or by 2n words alignment with the
.align pseudo-instruction, but only the .org and .align pseudo-instructions are applicable to BSS
sections to define completely absolute location.