Delta AH500 — 6.21.2 Explanation of String Processing Instructions

AH500 Programming Manual 0 D0 16#1234570 D1 D12 D11 1 D2 D3 3 D4 3 D10 The value in D0 is 0 because the binary-coded decimal floating-point number is a positive number. 16#1234570 is stored in (D2, D1). The value in D3 is 1 because the exponent is a negative number. The value in D4 is 3. 1234570E-3, the binary-coded decimal floating-point number in D0~D4, is converted into the 1234.57. Since the value in D10 is 3, the decimal point in 1234.57 in is moved to the left by three places. The result is 1.23457, and is stored in (D12, D11). Additional remark: 1. If the value in S 1 is neither 0 nor 1, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 2.

If the number of digits in ( S 1 +2, S 1 +1) is larger than 7, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 3. If the value in ( S 1 +2, S 1 +1) is not a binary-coded decimal value (The value is represented by the hexadecimal number, but one of digits is not within the range between 0 and 9.), the operation error occurs, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200D. 4. If the value in S 1 +3 is neither 0 nor 1, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 5.

If the value in S 1 +4 is less than 0 or larger than 38, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003 6. If the value in S 2 is less than 0 or larger than 7, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 7. If the operand S 1 used during the execution of the 32-bit instruction is declared in ISPSoft, the data type will be ARRAY [5] of WORD/INTT. 6-500 1.23 457