EasyManua.ls Logo

Inovance H3U Series - Page 157

Inovance H3U Series
737 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
156
4
4 Instructions4.5.1 Data Conversion
The value stored in [S] to [S+2] ranges from –32,768 to +32,767.
When the number to be converted is positive, the sign (lowest byte) is set to 20H (space). When the
number to be converted is negative, the sign is set to 2DH (minus sign).
The ASCII code of every digit is in the range 30H to 39H.
When the ASCII code of every digit is 20H (space) or 00H (NULL), it is processed as 30H.
2) 32-bit instruction
The ASCII-encoded decimal number (30H to 39H) stored in [S] to [S+5] is converted to a 32-bit BIN
number. The result is stored in [D+1, D].
ASCII billions place ASCII sign bit
ASCII ten-millions
place
ASCII hundred-
millions place
ASCII hundred-
thousands place
ASCII millions
place
S+0
+1
+2
b15------------------b8---b7---------------------b0
Higher 16 bits
ASCII thousands
place
ASCII ten-
thousands place
ASCII tens place
ASCII hundreds
place
Ignored ASCII ones place
+3
+4
+5
Lower 16 bits
[D+1][D]
The value stored in [S] to [S+5] ranges from –2,147,483,648 to +2,147,483,647. The higher bytes in
[S+5] are ignored.
The ASCII code of every digit is in the range 30H to 39H.
When the ASCII code of every digit is 20H (space) or 00H (NULL), it is processed as 30H.
An operation error occurs in the following conditions. The error ag M8067 is set to ON to identify this error
and the error code is stored in D8067.
Error 6706 is returned when the sign bit is not 20H (space) or 2DH (minus sign).
Error 6706 is returned when the ASCII codes of data bits exceed the range 30H to 39H or are not 20H
(space) or 00H (NULL).
Error 6706 is returned when the number after conversion exceeds the 16- or 32-bit signed value range.
Error 6705 is returned when elements in [S+2] (16-bit operation) or [S+5] (32-bit operation) are out of
range.

Table of Contents

Other manuals for Inovance H3U Series

Related product manuals