Grammar Of Assembly Source; Statements - Epson S5U1C62000A Manual

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

Advertisement

5.5 Grammar of Assembly Source

Assembly source files should be created on a general-purpose editor or the source editor of the work
bench. Save sources as standard text files. For the file name, a long file name supported in Windows can
be specified. Define the extension as ".s" when creating sources in the new syntax (for as62). When using
source files described in the old syntax (for asm62XX), the default extension ".dat" should be used.
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 re-
garded 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.
This section explains the rules and grammar involved with the creation of assembly source files.

5.5.1 Statements

Each individual instruction or definition of an assembly source is called a statement. The basic composi-
tion of a statement is as follows:
Syntax pattern
(1) Mnemonic
(2) Assembler pseudo-instruction
(3) Label:
(4) ;comment
Example:
<Statement>
#include
"define.h"
.set IO1, 0x200
; TEXT SECTION (ROM, 12bit width)
.org 0x100
START:
jp
INIT
reti
:
:
:
.org 0x110
INIT:
ld
a,0
ld
b,0
:
:
:
The example given above is an ordinary source description method. For increased visibility, the elements
composing each statement are aligned with tabs and spaces.
S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
Operand
Parameter
; execute initial routine
EPSON
(;comment)
(;comment)
(;comment)
<Syntax Pattern>
(2)
(2)
(4)
(2)
(3)
(1)
(1)
(2)
(3)
(1)
(1)
CHAPTER 5: ASSEMBLER
51

Advertisement

Table of Contents
loading

Table of Contents