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