Relocatable List File - Epson S5U1C62000A Manual

Epson cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

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
Example
Assembler 62 ver x.xx Relocatable List File MAIN.LST Wed Apr 22 15:31:00 1998
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
0100
e08
15:
0101
fe0
16:
0102
e00
17:
0103
ff0
18:
0104
400
19:
20:
0105
400
21:
0106
000
22:
23:
24:
25:
26:
0000
00
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.
84
Source statement
; main.s
; test program (main routine)
;
;***** INITIAL SP ADDRESS DEFINITION *****
#define
SP_INIT_ADDR 0x80
;***** BOOT, LOOP *****
.global
INIT_RAM_BLK1
.global
INC_RAM_BLK1
.org
0x100
BOOT:
ld
a,SP_INIT_ADDR>>4
ld
sph,a
ld
a, SP_INIT_ADDR&0xf
ld
spl,a
call
INIT_RAM_BLK1
LOOP:
call
INC_RAM_BLK1
jp
LOOP
;***** RAM block *****
.bss
.org
0x000
.comm RAM_BLK1,4
EPSON
;SP init addr = 0x80
; subroutine
; subroutine
; set SP
; initialize RAM block 1
; increment RAM block 1
; infinity loop
S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)

Advertisement

Table of Contents
loading

Table of Contents