2 Instructions
2-206 CP1E CPU Unit Instructions Reference Manual(W483)
Operand Specifications
Flags
Function
Hint
The parity bit is appended to the data to enable detection of errors when the data is transmitted. By
adding this bit, the number of bits that are 1 in the data can be indicated as odd or even, and if the
number of 1s in the received data is not similarly odd or even, it is assumed that an error has
occurred.
Precaution
When multiple digits are specified in the number of digits to be converted (C), the digits are converted
in order from the starting conversion position (C) of S going to the left word side, and the conversion
results are stored in order from the output starting bit (C) of D going to the left (returns to digit 0 after
digit 3).
Among the data in the conversion result output word, data of bits that are not to be output are held
(kept the same as before).
The following table shows ASCII data which can be contained in the source word(s) (excluding parity
bits) and corresponding hexadecimal digits.
Area Word addresses Indirect DM addresses Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
S
OK OK OK OK OK OK OK OK OK
---
--- --- ---DI OK
D---
Name Label Operation
Error Flag P_ER ON if there is a parity error in the ASCII data.
ON if the ASCII data in the source words is not equivalent to hexadecimal digits
ON if the content of Di is not within the specified ranges.
OFF in all other cases.
HEX(162) treats the contents of the source
word(s) as ASCII data representing hexa-
decimal digits (0 to 9 and A to F), converts
the specified number of bytes to hexadeci-
mal, and writes the hexadecimal data to the
destination word beginning at the specified
digit.
When converting data, the leftmost bit of
the ASCII code data can be treated as an
odd or even parity bit according to the parity
specification.
ASCII data (2 hexadecimal digits) Hexadecimal digits
30 to 39 0 to 9
41 to 46 A to F
Di 0 0/1 nm
D
m
234
n+1
ASCII
HEX
S
S+1
33 32
34
Number of digits (n+1)
Right (0)Left (1)
First digit to write
First byte to convert