![Epson S1C88 Series Manual Download Page 234](http://html.mh-extra.com/html/epson/s1c88-series/s1c88-series_manual_106917234.webp)
APPENDIX A ASSEMBLER (Sub tool chain)
222
EPSON
S5U1C88000C MANUAL II
WORKBENCH/DEV TOOLS/OLD ASSEMBLER
<Example of section definition>
Let's look at the section definition procedures through a simple example.
First, the method to actualize a memory mapping as indicated in Figure A.2.4.2.1 will be explained.
It will be assumed that "prg1.s" describing C1 and D1, "prg2.s" describing C2 and "prg3.s" describing C3
is assembled and then each respective relocatable object file "prg1.o", "prg2.o" and "prg3.o" is created.
In this case, C indicates the CODE section and D indicates the DATA section.
The flag to link88 can be specified through input redirect operations.
When the following flag specification is performed and a link command parameter file (filename.1cm)
that is used to allocate the address and define the section is created following by executing
link88<filename.lcm, a memory mapping as indicated in Figure A.2.4.2.1 will be created.
C1
C2
C3
D1
I/O
Memory
000000H
00001FH
000100H
002xxxH
00F000H
00F800H
00FFFFH
00F7xxH
C1
D1
prg1.o
C2
prg2.o
C3
prg3.o
Fig. A.2.4.2.1 Memory mapping example
Contents of the file transferred to link88 (link88<filename.lcm)
-o prg.a
...(1)
+code -p0x000000
...(2)
+data -p0x00f000
...(3)
prg1.o
...(4)
+code -p0x000100
...(5)
prg2.o prg3.0
...(6)
(1) Specifies the absolute object file that is output with the -o flag.
(2) Defines the CODE section that starts with a physical address from 000000H.
(3) Defines the DATA section that starts with a physical address from 00F000H.
(4) Allocates "prg1.o" to the sections defined in (2) and (3) indicated above.
In this case, the contents of the CODE section C1 in "prg1.o" will be allocated from the beginning
of the CODE section defined in (2) and the contents of the DATA section D1 will be allocated at the
head of the DATA section defined in (3).
(5) Defines the CODE section that starts with a physical address from 000100H. This CODE section is
different from the CODE section defined in (2). The CODE section (2) will be completed when a
new section is defined at this point.
(6) The "prg2.o" CODE section of C2, and "prg3.o" CODE section C3 will be continuously be allocated
in respective order.
In this example, "prg2.o" and "prg3.o" does not have a DATA section. However, if there is a DATA
section then it will be allocated from the address following D1 of the DATA section defined in (3).
There are three sections defined and linked in this example as indicated above. When the link is success-
ful an absolute object file named "prg.a" will be created.
Multiple modules can be allocated in these sections defined as long as it is within the allowable capacity
limit. What's more, multiple sections can be allocated within one bank as well.