Epson S5U1C63000A User Manual

Page 88

Advertising
background image

CHAPTER 4: ASSEMBLER

74

EPSON

S5U1C63000A MANUAL

(S1C63 FAMILY ASSEMBLER PACKAGE)

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

n

words alignment level and complete absolute address level.

.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

... 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, .data or .bss) or the next location definer (.org or .align) 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.

:

• 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

... This does not start a new CODE section.

.org 0x100

... This starts an absolute CODE section.

:

Advertising