451
Conversion Instructions
Section 3-12
Description
ASC(086) treats the contents of S as 4 hexadecimal digits, converts the des-
ignated digit(s) of S into their 8-bit ASCII equivalents, and writes this data into
the destination word(s) beginning with the specified byte in D.
Note Refer to Appendix A in the CS/CJ-series Programming Consoles Operation
Manual (W341) for a table of extended ASCII characters.
Parity
It is possible to specify the parity of the ASCII data for use in error control dur-
ing data transmissions. The leftmost bit of each ASCII character will be auto-
matically adjusted for even, odd, or no parity.
When no parity (0) is designated, the leftmost bit will always be zero. When
even parity (1) is designated, the leftmost bit will be adjusted so that the total
number of ON bits is even. When odd parity (2) is designated, the leftmost bit
of each ASCII character will be adjusted so that there is an odd number of ON
bits. The status of the parity bit does not affect the meaning of the ASCII code.
Examples of even parity:
When adjusted for even parity, ASCII “31” (00110001) will be “B1” (10110001:
parity bit turned ON to create an even number of ON bits); ASCII “36”
(00110110) will be “36” (00110110: parity bit remains OFF because the num-
ber of ON bits is already even).
Examples of odd parity:
When adjusted for odd parity, ASCII “36” (00110110) will be “B6” (10110110:
parity bit turned ON to create an odd number of ON bits); ASCII “46”
(01000110) will be “46” (01000110: parity bit remains OFF because the num-
ber of ON bits is already odd).
Examples of Di
When two or more digits are being converted, ASC(086) will read the bytes in
S from right to left and will wrap around to the rightmost byte if necessary. The
following diagram shows some example values for Di and the conversions that
they produce.
First digit to convert
Number of
digits (n+1)
Right (0)
Left (1)
Di
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...