314
6 BASIC INSTRUCTIONS
6.4 Data Transfer Instructions
16-bit data exchanges, 32-bit data exchanges
XCH(P), DXCH(P)
■XCH
• Conducts 16-bit data exchange between (D1) and (D2).
■DXCH
• Conducts 32-bit data exchange between (D1)+1, (D1) and (D2)+1, (D2).
• There is no error in the XCH(P) or DXCH(P) instruction.
(D1), (D2): Head number of the devices where the data to be exchanged is stored (BIN 16/32 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant Others
Bit Word Bit Word
(D1)
(D2)
Basic
Process
High
performance
Redundant
Universal
LCPU
Command
Command
P
D1 D2
D1 D2
XCH, DXCH
XCHP, DXCHP
indicates an instruction symbol of XCH, DXCH.
b7 b0b15 b8
Before execution
After execution
00000
111
0000
111
0
1111000000001111 0000011100001110
1111
00000000
1111
D1
D
2
b7
b0b15 b8
b7
b0b15 b8b7 b0b15 b8
D1
D
2
Before execution
After execution
+1
b15
b0
+1
b31
b16
+1+1
111 11111110000
111
0000000
1111
111 1111111
0000
111 00000001111
D1
D2
D1
b15 b0b31 b16
b15
b0b31 b16
b15 b0b31 b16
D1 D1
D2
D2
D2