Symbol; Constant And Operational Expression; Numeric Constant; Character Constant - Epson S1C62 Family Reference Manual

Cmos 4-bit single chip microcomputer development tool
Table of Contents

Advertisement

CROSS ASSEMBLER ASM62XX

Symbol

4.3.2
A symbol is an index that indicates a numeric or character constant, and must be defined before its value is
referenced (usually at the beginning of the program). The defined symbol can be used as the operand that
specifies immediate data in an instruction.
Example:
ON
EQU 1
OFF EQU 0
:
LD
:
LD
:

4.4 Constant and Operational Expression

This section explains the immediate data description formats.

Numeric constant

4.4.1
A numeric constant is processed as a 13-bit value by ASM62XX. If a numeric constant greater than 13 bits
is written, bit 13 and subsequent high-order bits are ignored.
Note that the number of actual significant bits depends on the operand of each instruction. If the value of a
constant is greater than the value that can be accommodated by the actual number of significant digits, an
error occurs.
Example:
ABC EQU 0FFFFH
LD
The default radix is decimal. The radix description formats are as follows:
Binary numeral:
A numeral suffixed with B, such as 1010B (=10) or 01100100B (=100).
Octal numeral:
A numeral suffixed with O or Q, such as 012O (=10) or 144Q (=100).
Decimal numeral:
A numeral alone or a numeral suffixed with D, such as 10 or 100D (=100).
Hexadecimal numeral: A numeral suffixed with H, such as 0AH (=10) or 64H (=100).
If the value begins with a letter from A to F, it must be prefixed with 0 to distinguish
it from a name.

Character constant

4.4.2
A character constant is one or two ASCII characters enclosed by apostrophes (' '). A single ASCII character
is processed as eight-bit data. If two or more ASCII characters are written, only the last two characters are
significant as 13-bit data.
Examples:
'A'
(=41H),
The apostrophe itself cannot be processed as a character constant, so it must be written as a numeric
constant, such as 27H or 39.
III-8
(See Section 4.5 for EQU.)
A,ON
; = LD A,1
A,OFF
; = LD A,0
ABC is defined as 1FFFH.
A,65535
An error occurs because it exceeds the significant digit
count (4 bits).
'BC'
(=0243H),
'PQ'
(=1051H),
EPSON
'DEFGH'
'GH'
(=0748H; DEF is ignored.)
DEVELOPMENT TOOL REFERENCE MANUAL
S1C62 FAMILY

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c62 series

Table of Contents