Location Defining Pseudo-Instructions (.Org, .Align) - Epson S5U1C63000A User Manual

Cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

CHAPTER 4: ASSEMBLER

4.7.7 Location Defining Pseudo-Instructions (.org, .align)

The absolute addressing pseudo-instructions (.align and .org) work to specify absolute location of a
section in different precision such as 2
.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 65,535 (0xffff).
• 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, DATA 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, .data or .bss) or the next location definer (.org or .align) appears.
Example:
:
.code
:
.org 0x100
:
.bss
:
.code
:
• If the .org pseudo-instruction is defined immediately after a section definer (.code, .data or .bss), the
section definer does not start a new section. But .org starts a new section with the attribute of the
section definer.
Example:
.code
.org 0x100
:
74
n
words alignment level and complete absolute address level.
... 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.
... This does not start a new CODE section.
... This starts an absolute CODE section.
EPSON
S5U1C63000A MANUAL
(S1C63 FAMILY ASSEMBLER PACKAGE)

Advertisement

Table of Contents
loading

Table of Contents