Kaiyi — 6.21.2 Explanation of String Processing Instructions

AH500 Programming Manual S1 5 S1+1 1 b15 b0 b7 b8 D S ign - 3 1 1 2 . D+ D+ 2 S2 -123 3. D$ STR : The value in S 1 should be within the range between 2 and 13. value in S 1 +1 should be within the range between 0 and 10, and should be less than or equal to the value in S 1 minus 3. The value in S 2 should be within the range 2147483647. The between -2147483648 and (S1+1, S1) b15 b0 b7 b8 (S1+2, S1+3) D D+2 D+1 . D+3 D+4 D+5 S2+1 Sign S2 D+6 32-bit binary number Automatically stored at the end of the string Suppo r of chara se the numbe cters is 8, the number of decimal places is 3, and the value is . The conversion result is as follows.

-654321 (S1+1,S1) (S1+3, S1+2) b15 b0 b7 b8 D D+1 - 6 5 4 2 3 1 . D+2 D+3 D+4 4. If the value in S 2 is a positive value, the sign code in D is 16#20. If the value in S 2 is a negative value, the sign code in D is 16#2D. 5. The code in D which represents the decimal point is 16#2E. 6. y If the value in S 1 +1 is larger than the number of digits in S 2 , the missing digits are replaced b 0. 32-bit binary number Number of characters 13 Number of decimal places 10 0.0000054321 7. If the value in S 1 is larger than the number of digits in S 2 plus the number of characters which include the decimal point and the sign, the missing digits are replaced by 0.

Binary number 54321 The missing digits are replaced by 0. 6-465 16 #31(1) 16 #2D(-) 16#2E(.) 16#32(2) 16#00(Ending character) 16#33(3) Numbe r of ch aracters First ASCII code Sign Third ASCII code Second ASCII code Fifth ASCII code Fourth ASCII code Seventh AS CII code Sixth ASCII code Ninth ASCII code Eighth ASCII code Elevnth A SCII code Tenth A SCII code 16#00 (Ending character) Twelfth AS CII code Number of dec imal places High word Low word 8 3 16#36(6) 16#2D(-) 16#34(4) 16#35(5) 16#33(3) 16#2E(.) 16#31(1) 16#32(2) 16#00 (Ending character) (S2+1, S2) -654321 -654 32