Chapter 6 Applied Instructions If the data in S ~ S +3 is -123.45, the calculation is as follows. S b15 b0 b7 b8 2 7 D1 D1 +1 S+1 -12345 D2 S+2 S+3 If there is 16#20 or 16#30 between the sign character and the first value which is not 0 in the string, 16#20 or 16#30 is ignored when the string is converted into the binary number. - 1 2 3 4 5 . 8 Number of characters - 123.45 2 Number of decimal places Ignored -12345 Binary number Number of characters 0.0012 7 4 Number of decimal places Binary number If 16#2E, which represents the decimal point, is ignored, the string in S should be within the range between -32768 and 32767.
For example, if the string is “1235.3”, users have to check whether “12353” is within the range. 3. D$VAL: The operand S occupies seven word devices at most. The number of characters contained in the string in S should be within the range between 2 and 13. If there is a decimal point in the string in S , 16#2E should be stored between the first character after the sign character and the last character. Ignored Sign 12 (D1+1,D1) (D1+3,D1+2) b15 b0 b7 b8 S+1 S S+2 S+3 S+4 S+5 S+6 Sign First ASCII code ..................................................
(D2+1,D2) Twelfth AS CII code 6-465 16#31(1) 16#2D(-) 16#33(3) 16#32(2) 16#34(4) 16#2E(.) 16#00 16#35(5) Number o f ch aracters Number of d Number of d ecimal places First ASCII code Sign Third AS CII code Second A SCII code Fifth ASCII code Fourth ASCII code Seventh AS CII code Sixth ASCII code Ninth ASCII code Eighth AS CII code Elevnth A SCII code Tenth A SCII code 16#00 Twelfth AS CII code Binary num ber