Epson S5U1C62000A User Manual
Page 84
72
EPSON
S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
5.7.6 Location Defining Pseudo-Instructions (.org, .bank, .page, .align)
The absolute addressing pseudo-instructions (.bank, .page, .align and .org) work to specify absolute
location of a section in different precision such as bank number level, page number level, 2
n
words
alignment level and complete absolute address level.
The .bank and .page pseudo-instructions are applicable to CODE section only, others are applicable to
any kinds of sections (CODE and BSS sections).
.org pseudo-instruction
Instruction format
.org
:
Absolute address specification
• Only decimal, binary and hexadecimal numbers can be described.
• The addresses that can be specified are from 0 to 8,192 (0x1fff).
• One or more spaces or tabs are necessary between the instruction and the address.
Sample description:
.code
.org
0x0100
Function
Specifies an absolute address location of a CODE or BSS section in an assembly source file. The section
with the .org pseudo-instruction is taken as an absolute section.
Precautions
• If an overlap occurs as the result of specifying absolute locations with the .org pseudo-instruction, an
error will result.
Examples:
.bss
.org 0x00
.comm RAM0 4
... RAM secured area (0x00–0x03)
.org 0x01
.comm RAM1 4
... Error (because the area of 0x01–0x03 is overlapped)
• When the .org pseudo-instruction appears in a section, a new absolute section starts at that point. The
section type does not change. The .org pseudo-instruction keeps its effect only in that section until the
next section definer (.code or .bss) or the next location definer (.org, .align, .page, or .bank) appears.
Example:
:
.code
... The latest relocatable section definition.
:
.org 0x100
... Starts new absolute CODE section from address 0x100.
:
.bss
... This section is relocatable not affected by the ".org" pseudo-instruction.
:
.code
... This section is also relocatable not affected by the ".org" pseudo-instruction.
: