S5U1C62000A MANUAL
EPSON
57
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
CHAPTER 5: ASSEMBLER
5.5.7 Numerical Notations
This Assembler supports three kinds of numerical notations: decimal, hexadecimal, and binary.
Decimal notations of values
Notations represented with 0–9 only will be regarded as decimal numbers. To specify a negative
value, put a minus sign (-) before the value.
Examples:
1 255 -3
Characters other than 0–9 and the sign (-) cannot be used.
Hexadecimal notations of values
To specify a hexadecimal number, place "0x" before the value.
Examples:
0x1a 0xff00
"0x" cannot be followed by characters other than 0–9, a–f, and A–F.
Binary notations of values
To specify a binary number, place "0b" before the value.
Examples:
0b1001 0b1001100
"0b" cannot be followed by characters other than 0 or 1.
Specified ranges of values
The size (specified range) of immediate data varies with each instruction.
The specifiable ranges of different immediate data are given below.
Table 5.5.7.1 Types of immediate data and their specifiable ranges
Symbol
*
Type
Decimal
Hexadecimal
Binary
p
5-bit immediate data/label
0–31
0x0–0x1f
0b0–0b11111
s
8-bit immediate data/label
0–255
0x0–0xff
0b0–0b11111111
l
8-bit immediate data
0–255
0x0–0xff
0b0–0b11111111
i
4-bit immediate data
0–15
0x0–0xf
0b0–0b1111
∗
These symbols are used in the instruction list of the "S1C6200/6200A Core CPU Manual"
or Quick Reference.
Compatibility with the older tools
The assembler allows the notation in the old syntax for the asm62XX.
Thus the following numerical notations can be used:
nnnnB
: Binary numbers
nnnnO
: Octal numbers
nnnnQ
: Octal numbers
nnnnH
: Hexadecimal numbers
"nnnnB" (binary numbers) and "nnnnH" (hexadecimal numbers) are converted into the new format
("0bnnnn" and "0xnnnn") in the preprocessing stage.
"nnnnO" and "nnnnQ" (octal numbers) are converted into hexadecimal numbers ("0xnnnn") in the
preprocessing stage.