Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 299

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Data Movement Instructions
Description
Flags
Example
266
Area
Index Registers
Indirect addressing
using Index Registers
XCHG(073) exchanges the contents of E1+1 and E1 with the contents of
E2+1 and E2.
E1
E1+1
To exchange 3 or more words, use XFER(070) to transfer the words to a third
set of words (a buffer) as shown in the following diagram.
E1
nd
2
XFER(070)
operation
E2
3
operation
There are no flags affected by this instruction.
When CIO 0.01 is ON in the following example, the contents of D100 and
D101 are exchanged with the contents of D200 and D201.
0.01
D100
D200
D100
D101
D100
D101
E1
IR0 to IR15
,IR0 to ,IR15
–2048 to +2047, IR0 to –2048 to +2047, IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –) IR0 to, –(– –) IR15
E2
st
1
XFER(070)
operation
Buffer
rd
XFER(070)
D200
D201
D200
D201
Section 3-7
E2
E2+1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents