CROSS ASSEMBLER ASM62XX
III-8
EPSON
S1C62 FAMILY
DEVELOPMENT TOOL REFERENCE MANUAL
4.3.2
Symbol
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
(See Section 4.5 for EQU.)
OFF
EQU
0
:
LD
A,ON
; = LD A,1
:
LD
A,OFF
; = LD A,0
:
4.4 Constant and Operational Expression
This section explains the immediate data description formats.
4.4.1
Numeric constant
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
→
ABC is defined as 1FFFH.
LD
A,65535
→
An error occurs because it exceeds the significant digit
count (4 bits).
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.
4.4.2
Character constant
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),
'BC'
(=0243H),
'PQ'
(=1051H),
'DEFGH'
→
'GH'
(=0748H; DEF is ignored.)
The apostrophe itself cannot be processed as a character constant, so it must be written as a numeric
constant, such as 27H or 39.
Summary of Contents for S1C62 Family
Page 1: ...MF599 06 Development Tool Reference Manual CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C62 Family ...
Page 4: ......
Page 6: ......
Page 8: ......
Page 10: ......
Page 18: ......
Page 20: ......
Page 22: ......
Page 26: ......
Page 28: ......
Page 30: ......
Page 54: ......
Page 56: ......
Page 58: ......
Page 70: ......
Page 72: ......
Page 74: ......
Page 82: ......
Page 84: ......
Page 86: ......
Page 98: ......
Page 100: ......
Page 112: ......
Page 206: ......
Page 208: ......
Page 210: ......