6 BASIC INSTRUCTIONS
6.5 Data Conversion Instructions
281
6
When "20H" exists between the sign and the first non-zero number (a signed value is specified)
When "30H" exists between the sign and the first non-zero number
• Store sign data, "space (20H)" or "- (2DH)" in the 1st byte (low-order 8 bits of the head device set in (s)). Only the ASCII
data "0 (30H)" to "9 (39H)", "space (20H)" and "decimal point (2EH)" can be stored from the 2nd byte to the "00H" at the
end of the character string in (s). If "- (2DH)" is stored in the 2nd byte or later, an operation error occurs.
Error code
(SD0/SD8067)
Description
2820 The device specified by (d1) exceeds the corresponding device range.
When "00H" is not set in the corresponding device range after the device specified in (s).
3401 The number of characters of the character string specified by (s) is other than 2 to 13 characters.
The number of characters of the decimal part of the character string specified by (s) is other than 0 to 10 characters.
The relationship between the total number of characters specified by (s) and the number of characters of the decimal part is other than
that described below.
Total number of characters - 3Number of characters in the decimal part
An ASCII code other than 20H, 2DH is set in the sign.
Two or more decimal points are set.
The converted binary value exceeds the range that can be converted by each instruction.
Signed operation: -2147483648 to +2147483647, unsigned operation: 0 to 4294967295
6543. 21
12
2
65
4
3
21
-
-
Total number of digits
Number of digits of the decimal part
32-bit binary data
Ignore
0 000
5
4321
11
8
.
54321
Total number of digits
Number of digits of the decimal part
32-bit binary data
Ignore
Sign