84
EPSON
S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
5.9 Relocatable List File
The relocatable list file is an assembly source file that carries assembled results (offset addresses and
object codes) added to the first half of each line. It is delivered only when the start-up option (-l) is
specified.
Its file format is a text file, and the file name, <File name>.lst. (The <File name> is the same as that of the
input source file.)
The format of each line of the assembly list file is as follows:
Line No.: Address Code Source statement
Example
Assembler 62 ver x.xx Relocatable List File MAIN.LST Wed Apr 22 15:31:00 1998
1:
; main.s
2:
; test program (main routine)
3:
;
4:
5:
;***** INITIAL SP ADDRESS DEFINITION *****
6:
#define
SP_INIT_ADDR 0x80
;SP init addr = 0x80
7:
8:
;***** BOOT, LOOP *****
9:
.global
INIT_RAM_BLK1
; subroutine
10:
.global
INC_RAM_BLK1
; subroutine
11:
12:
.org
0x100
13:
BOOT:
14: 0100 e08
ld
a,SP_INIT_ADDR>>4
; set SP
15: 0101 fe0
ld
sph,a
16: 0102 e00
ld
a, SP_INIT_ADDR&0xf
17: 0103 ff0
ld
spl,a
18: 0104 400
call
INIT_RAM_BLK1
; initialize RAM block 1
19:
LOOP:
20: 0105 400
call
INC_RAM_BLK1
; increment RAM block 1
21: 0106 000
jp
LOOP
; infinity loop
22:
23:
;***** RAM block *****
24:
.bss
25:
.org
0x000
26: 0000 00
.comm
RAM_BLK1,4
Content of line No.
The source line number from top of the file will be delivered.
Content of address
In the case of an absolute section, an absolute address will be delivered in hexadecimal number.
In the case of a relocatable section, a relative address will be delivered in hexadecimal number from
top of the file.
Content of code
CODE section: The instruction (machine language) codes are delivered in hexadecimal numbers. One
address corresponds with one instruction. The assembler sets the operand (immediate
data) of the code that refers to unresolved address to 0. The immediate data will be
decided by the linker.
BSS section:
Irrespective of the size of the secured area, 00 is always delivered here.
Only the address defined for a symbol (top address of the secured area) is delivered as
the address of the BSS section.