4 comments, 5 blank lines, Section management – Epson S5U1C63000A User Manual

Page 70

Advertising
background image

CHAPTER 4: ASSEMBLER

56

EPSON

S5U1C63000A MANUAL

(S1C63 FAMILY ASSEMBLER PACKAGE)

Restrictions

• The maximum number of characters of a symbol is 259 (not including colon). If this number is ex-

ceeded, an error will result.

• Only the following characters can be used:

A–Z a–z _ 0–9 ?

• A symbol cannot begin with a numeral.

Examples:

;OK

;Error

FOO:

1lable:

L1:

L 1:

.set IO 0xfff0

.set #IO 0xfff0

.comm BUF 4

.lcomm 1st_BUF 2

• Since symbols are case sensitive by default, uppercase and lowercase are discriminated. When refer-

encing a defined symbol, use the characters exactly the same as the defined symbol.

Examples:

_Abcd:

:

jr

_ABCD

... Does not jump to _Abcd

However, symbols will be case insensitive if the -c option is specified.

• The symbol masks are effective only on the defined symbols. If a symbol mask is applied to a numeric

value, an error will result.

• If a symbol mask is omitted, the lower bits effective for that instruction will be used. However, if the

bit value does not fall within the instruction range, an error or warning will be issued.

• Symbols and symbol masks cannot be used on 4-bit immediate values.

4.5.4 Comments

Comments are used to describe a series of routines, or the meaning of each statement. Comments cannot
comprise part of coding.

Definition of comment

A character string beginning with a semicolon (;) and ending with a line feed code (LF) is interpreted
as a comment. Not only ASCII characters, but also other non-ASCII characters can be used to describe
a comment.

Examples:

;This line is a comment line.

LABEL: ;This is the comment for LABEL.

ld %a,%b ;This is the comment for the instruction on the left.

Restrictions

• A comment is allowed up to 259 characters, including a semicolon (;), spaces before, after and inside

the comment, and a return/line feed code.

• When a comment extends to several lines, each line must begin with a semicolon.

Examples:

;These are

comment lines.

... The second line will not be regarded as a comment. An error will

result.

;These are

; comment lines.

... Both lines will be regarded as comments.

4.5.5 Blank Lines

This assembler also allows a blank line containing only a return/line feed code. It need not be made into a
comment line using a semicolon.

Advertising