S5U1C62000A MANUAL EPSON 47
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
CHAPTER 5ASSEMBLER
This chapter will describe the functions of the Assembler as62
and grammar involved with the
creation of assembly source files.

5.1 Functions

The Assembler as62 is a tool that constitutes the core of this software package. It assembles (translates)
assembly source files and creates object files in the machine language.
The functions and features of the assembler are summarized below:
Allows absolute and relocatable sections mixed in one source.
Allows to develop programs in multiple sources by creating relocatable object files that can be com-
bined by the linker.
Can add source debugging information for source debugging on the debugger.
The assembler provides the following additional functions as well as the basic assembly functions:
•Macro definition and macro invocation
Definition of Define name
•Operators
Insertion of other file
Conditional assembly
Conversion of old-format source files created for the asm62XX into the current format.
The assembler processes source files in two stages: preprocessing stage and assembling stage. The
preprocessing stage expands the additional function part described in the source file to mnemonics that
can be assembled, and delivers them to a temporary file (preprocessed file). The assembling stage as-
semble the preprocessed file to convert the source codes into the machine codes.

5.2 Input/Output Files

Assembler
as62
file.s or file.dat
Assembly source file
file.o file.msfile.lst
Object fileRelocatable
list file
file.err
Error filePreprocessed
source file
to Linker
Fig. 5.2.1 Flow chart

5.2.1 Input File

Assembly source file
File format: Text file
File name: <File name>.s, <File name>.dat
<File name>.ms (A preprocessed source file created by the assembler or disassembler.)
Description: File in which a source program is described. If the file extension is omitted, the
assembler finds a source file that has the specified file name and an extension ".s".
Note: The extension ".dat" is allowed for assembling source files created for an old assem-
bler asm62XX. Extension ".s" is recommended for creating new sources. Actually a
".s" source file and a ".dat" source file can have the same contents with the new and
old syntax mixed. However, if the first section does not have an absolute address
specification, the section is regarded as a relocatable section in a ".s" source, while in
a ".dat" source it is regarded as an absolute section and ".org 0" is placed at the
beginning of the source by preprocessing.