Chapter 6 Applied Instructions API 2103 Symbol: S : Source value Word D : Device in which the conversion result is stored Word/Double word Explanation: 1. The signed decimal ASCII code in S is converted into the signed decimal binary number, and the conversion result is stored in D . 2. The operand S used in the 16-bit instruction occupies three word devices, and the decimal ASCII code in S should be within the range between -32768 and 32767. If S is a string, the string should be within the range between “-32768” and “32767”. b15 b0 b7 b8 S S+1 b15 b0 D S+2 16-bit binary number 3.
If S used in the 16-bit instruction is a string and the number of characters contained in the string is less than 6, the characters which the string lacks are regarded as 0. The first character is a sign character. If the first character is “ ” (a space), the sign is a positive sign. If the first character is “-”, the sign is a negative sign. Take the string “1234” for example. S b15 b0 b7 b8 S+1 12340 b15 b0 D 16-bit binary number 4. The operand S used in the 32-bit instruction occupies six word devices, and the decimal ASCII code in S should be within the range between -2147483648 and 2147483647.
If S is a string, the string should be within the range between “-2147483648” and “2147483647”. S+2 6-449 Instruction code Operand Function D DABIN P S, D Converting the signed decimal ASCII code into the signed decimal binary number Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S D Pulse instruction 16-bit instruction (5-11 steps) 32-bit instruction (5-11 steps) AH500 AH500 AH500 ASCII code in the ten thousands place Sign ASCII code in the hundreds place ASCII code in the thousands place ASCII code in the units place ASCII code in the tens place "1" " "(Space) "3" "2" " "(Ignored) "4"