301
Conversion Instructions
Section 5-20
Flags
ER:
Incorrect digit designator, or data area for destination exceeded.
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
5-20-8 ASCII CONVERT – ASC(86)
Limitations
Di must be within the values given below.
All destination words must be in the same data area.
DM 6144 to DM 6655 cannot be used for D.
Description
When the execution condition is OFF, ASC(86) is not executed. When the exe-
cution condition is ON, ASC(86) converts the designated digit(s) of S into the
equivalent 8-bit ASCII code and places it into the destination word(s) begin-
ning with D.
Any or all of the digits in S may be converted in order from the designated first
digit. The first digit, the number of digits to be converted, and the half of D to
receive the first ASCII code (rightmost or leftmost 8 bits) are designated in Di.
If multiple digits are designated, they will be placed in order starting from the
designated half of D, each requiring two digits. If more digits are designated
than remain in S (counting from the designated first digit), further digits will be
used starting back at the beginning of S.
Note
Refer to
Appendix H
for a table of ASCII characters.
E
1
1
1
0
0
1
0
0
0
1
0
1
F
1
1
1
1
0
1
0
0
0
1
1
0
Original data
Converted code (segments)
Display
Digit
Bits
–
g
f
e
d
c
b
a
S
:
Source word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Di
:
Digit designator
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Ladder Symbols
Operand Data Areas
D
:
First destination word
IR, SR, AR, DM, EM, HR, LR
ASC(86)
S
Di
D
@ASC(86)
S
Di
D