6F3B0253
Basic Hardware and Function 139
7. Instructions
FUN 022 XCHG Data exchange
Expression
Input [ A XCHG B ] Output
Function
When the input is ON, the data of A and the data of B is exchanged.
Execution condition
Input Operation Output
OFF No execution OFF
ON Execution ON
Operand
Name Device Register Constant Index
X Y R S T. C. XWYWRWSW T C D I J K
AOperation data √√√√√√√√√ √
BOperation data √√√√√√√√√ √
Example
When R005 is ON, the data of RW23 and D0100 is exchanged. If the original data of RW23 is
23456 and that of D0100 is 291, the operation result is as follows.
RW23 23456 RW23 291
D0100 291 D0100 23456
Before operation After operation