12 global declaration pseudo-instruction (.global) – Epson S5U1C63000A User Manual

Page 86

Advertising
background image

CHAPTER 4: ASSEMBLER

72

EPSON

S5U1C63000A MANUAL

(S1C63 FAMILY ASSEMBLER PACKAGE)

4.7.6 Section Defining Pseudo-Instructions (.code, .data, .bss)

The section defining pseudo-instructions define one related group of codes or data and make it possible
to relocate 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 (however, a warning occurs). 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 code 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).

• A CODE section is relocatable by default unless its location is specified with the .org pseudo-instruc-

tion or more loosely with the .align pseudo-instruction.

.data pseudo-instruction

Instruction format

.data

Function

Declares the start of a DATA section. Statements following this instruction are assembled as those to
be mapped in the data ROM, until another section is declared.

Precautions

• The DATA section is a static data area, and effective only for models with data ROM installed.

• In a DATA section, nothing other than the .org and .word pseudo-instructions, symbols, and com-

ments can be described.

• A DATA section can be divided among multiple locations of a source file for purpose of definition

(describing the .data pseudo-instruction in the respective start positions).

• A DATA section is relocatable by default unless its location is specified with the .org pseudo-instruc-

tion or more loosely with the .align pseudo-instruction.

Advertising