s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 178

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
CHAPTER 11: ASSEMBLER
11.5 Relocatable Assembling and Absolute Assembling
The as33 supports both the relocatable assembling and the absolute assembling. It even allows to develop
software with relocatable modules and absolute modules existing in a mixed fashion.
11.5.1 Relocatable Assembling
The relocatable assembling is a method that assembles files without fixing addresses, so that the program will be
able to work wherever on the memory the modules may be mapped. Therefore, no absolute address specification
will be made in the source files. The C Compiler delivers assembly source files in the relocatable format.
In the relocatable assembling, the assembler performs the processing by applying the relative addresses from top
of each section to the individual codes.
This information is output in the object file along with the codes, and all the addresses are determined by the
processing of the Linker lk33.
Modules assembled by this method can freely be combined with other modules. This will let you use
general-purpose modules thus assembled relocatably as a library in the software development for other models.
For relocation by the Linker lk33, refer to Chapter 12, "Linker".
Refer to Chapter 15, "Librarian", for making libraries using the output objects.
The .abs pseudo-instruction, .org pseudo-instruction, and .set pseudo-instruction cannot be employed in the
relocatable source files.
11.5.2 Absolute Assembling
The absolute assembling is a method that assembles source files by priory specifying the addresses where codes
are to be mapped.
However, since the usefulness of the source files for various purposes is lost when they are linked with other
modules, do not use this method unless you are creating a simple test program.
The absolute assembling is specified by the .abs pseudo-instruction written in the first line of the source file, and
the address are set by using the .org pseudo-instruction. The .org pseudo-instruction and the .set
pseudo-instruction to define absolute addresses can be employed only in the absolute source.
Example:
BOOT:
This method causes all the codes in that file to have absolute addresses. It cannot make part of a file relocatable.
However, even when a program is created in the form of one absolute source file, it needs to be passed through
the Linker lk33 in order to obtain an execution file in which final addresses are defined. (In case of one file,
remove the check on the [use .cm file] in the Work Bench wb33 for linking.)
Make sure there is only one instance of the CODE section, DATA section, and BSS section in each absolute file.
Basically, create a relocatable assembly source file, then relocate it by using the map function of the lk33.
162
.abs
.code
.org
.word
ext
ld.w
ld.w
ld.w
.data
.org
.word
:
0x80000
0x80004
0x20
%r8,0x0
%sp,%r8 ; set SP
%r8,0x0
0xC0000 ...Maps the following data from address 0xC0000.
0x12345678
...Specifies the absolute assembling.
...Maps the following codes from address 0x80000.
; set global pointer
EPSON
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
S5U1C33000C MANUAL

Related parts for s5u1c33000c