295
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Data Movement Instructions
3
XFER
Function
Hint
Precautions
• Be sure that the source words (S to S+N-1) and destination words (D to D+N-1) do not exceed the
end of the data area.
• Some time will be required to complete XFER(070) when a large number of words is being
transferred. Even if an interrupt occurs, execution of this instruction will not be interrupted and
execution of the interrupt task will be started after execution of XFER(070) has been completed. If
power is interrupted during execution of XFER(070), execution may not be completed, i.e., all of the
specified data may not be transferred. One XFER(070) instruction can be replaced with two
XFER(070) instructions to help avoid this problem.
Example Programming
When CIO 0.00 is ON in the following example, the 10 words D100 through D109 are copied to D200
through D209.
XFER(070) copies N words beginning with S
(S to S+(N-1)) to the N words beginning with
D (D to D+(N-1)).
• It is possible for the source words and
destination words to overlap, so XFER(070)
can perform word-shift operations.
• The specified source and destination data
areas can overlap (word shift).
D+
S+(N−1)
(N−1)
:
:
N words
&10
D100
D102
D100
D109
D102
D111
&1000
D1000
D2000
XFER
&500
D1000
D2000
XFER
&500
D1500
D2500
XFER
&10
10
words
D200
D201
D202
D209
D100
D101
D102
D109
D100
D200
0.00