Omron CP1E-E@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-114
CP1E CPU Unit Instructions Reference Manual(W483)
Flags
Function
Precautions
If the number of digits being read or written exceeds the leftmost digit of S or D, MOVD(083) will wrap to
the rightmost digit of the same word.
Sample program
When CIO 0.00 is ON in the following example, four digits of data are copied from W0 to W100. The trans-
fer begins with the digit 1 of W0 and digit 0 of W100, in accordance with the control word’s value of 31.
Note After reading the leftmost digit of S (digit 3), MOVD(083) wraps to the rightmost digit (digit 0).
Example of transferring multiple digits
The following diagram shows examples of data transfers for various values of C.
Name Label Operation
Error Flag P_ER ON if one of the first three digits of C is not within the specified range of 0 to 3.
OFF in all other cases.
MOVB(082) copies the specified bit (n) from S
to the specified bit (m) in D. The other bits in
the destination word are left unchanged.
S
m
n
D
R
C0 R
811
1215
nm
03
47
MOVD
W0
D300
W100
0.00
S
C
D
C D300 0 0
811
1215
31
03
47
D: W100 4 1
811
1215
23
3210
3210
03
47
S: W0 1 2
811
1215
34
03
47
Digit no.
Digit no.
First digit in D: Digit 0
Number of digits: 3 (4 digits)
First digit in S: Digit 1
S
C211
DS
C30
DS
C312
DS
C230
D
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3
Digit 0
Digit 1
Digit 2
Digit 3