Location Defining Pseudo-Instructions (.Org, .Bank, .Page, .Align) - Epson S5U1C62000A Manual

Epson cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

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
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
<Address>
<Address>:
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
.org
0x01
.comm RAM1
4
• 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
:
.org 0x100
:
.bss
:
.code
:
72
... RAM secured area (0x00–0x03)
... Error (because the area of 0x01–0x03 is overlapped)
... The latest relocatable section definition.
... Starts new absolute CODE section from address 0x100.
... This section is relocatable not affected by the ".org" pseudo-instruction.
... This section is also relocatable not affected by the ".org" pseudo-instruction.
EPSON
n
words
S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)

Advertisement

Table of Contents
loading

Table of Contents