192
5-15-6 DOUBLE DATA EXCHANGE: XCGL(035)
(035)
XCGL E
1
E
2
E
2
: 2
nd
Exchange word CIO, G, A, T, C, DM
E
1
: 1
st
Exchange word CIO, G, A, T, C, DM
Operand Data AreasLadder Symbol
Variations
j XCGL(035)
When the execution condition is OFF, XCGL(035) is not executed. When the ex-
ecution condition is ON, XCGL(035) exchanges the content of E
1
and E
1
+1 with
that of E
2
and E
2
+1.
E
2
E
1
E
1
+1 E
2
+2
If you want to exchange the content of blocks longer than 2 words, use
XCGL(035) and/or XCHG(034) and use work words as an intermediate buffer to
hold one of the blocks.
Data 2Data 1
Buffer
Step 1
Step 2
Step 3
Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Content of *DM word is not BCD when set for BCD.
Example When CIO 000000 is ON in the following example, the contents of CIO 0000 and
CIO 0001 are moved to D01500 and D01501, and the contents D01500 and
D01501 are moved to CIO 0000 and CIO 0001.
Address Instruction Operands
00000 LD 000000
00001 XCGL(035)
1000
D01500
1234 5678 9ABC DEF0
9ABC DEF0 1234
D01501
5678
D01500
CIO 1001 CIO 1000
D01501
D01500
CIO 1001 CIO 1000
Before execution
After execution
Description
Precautions
Data Movement Instructions Section 5-15
(035)
XCGL 1000 D01500
0000
00