beautypg.com

4 comments, 5 blank lines, 6 register names – Epson S5U1C62000A User Manual

Page 68

background image

56

EPSON

S5U1C62000A MANUAL

(S1C60/62 FAMILY ASSEMBLER PACKAGE)

CHAPTER 5: ASSEMBLER

5.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.

5.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.

5.5.6 Register Names

The CPU register names may be written in either uppercase or lowercase letters.

Table 5.5.6.1 Notations of register names

Register/memory location/flag

Notation

A

A register

a or A

B

B register

b or B

XP

Four high-order bits of IX register

xp or XP

YP

Four high-order bits of IY register

yp or YP

X

Eight low-order bits of IX register

x or X

Y

Eight low-order bits of IY register

y or Y

XH

Four high-order bits of XHL register

xh or XH

XL

Four low-order bits of XHL register

xl or XL

YH

Four high-order bits of YHL register

yh or YH

YL

Four low-order bits of YHL register

yl or YL

SP

Stack pointer SP

sp or SP

SPH

Four high-order bits of stack pointer SP

sph or SPH

SPL

Four low-order bits of stack pointer SP

spl or SPL

MX

Data memory location whose address is specified by IX

mx or MX

MY

Data memory location whose address is specified by IY

my or MY

M0–MF

Data memory location in the register area (0x000–0x00f)

m0–mf or M0–MF

F

Flag register (IDZC)

f or F

C

Carry

c or C

NC

No carry

nc or NC

Z

Zero

z or Z

NZ

Not zero

nz or NZ

Note: These symbols are reserved words, therefore they cannot be used as user-defined symbol names.