269
Data Movement Instructions
Section 5-18
Example
The following example shows instruction ASFT(17) used to shift words in an
11-word shift register created between DM 0100 and DM 0110 with C=#6000.
Non-zero data is shifted towards St (DM 0110).
Note
The zeroes are shifted “upward” if C=4000, and the entire shift register is set
to zero if C=8000.
5-18 Data Movement Instructions
5-18-1 MOVE – MOV(21)
Limitations
DM 6144 to DM 6655 cannot be used for D.
Description
When the execution condition is OFF, MOV(21) is not executed. When the
execution condition is ON, MOV(21) copies the content of S to D.
Precautions
TIM/CNT numbers cannot be designated as D to change the PV of the timer
or counter. You can, however, easily change the PV of a timer or a counter by
using BSET(71).
Flags
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
ASFT(17)
#6000
DM 0100
DM 0110
00000
Address Instruction
Operands
00000
LD
00000
00001
ASFT(17)
#
6000
DM
0100
DM
0110
DM 0100
1234
1234
1234
DM 0101
0000
0000
2345
DM 0102
0000
2345
3456
DM 0103
2345
0000
4567
DM 0104
3456
3456
5678
DM 0105
0000
4567
6789
DM 0106
4567
0000
789A
DM 0107
5678
5678
0000
DM 0108
6789
6789
0000
DM 0109
0000
789A
0000
DM 0110
789A
0000
0000
Before
execution
After one
execution
After seven
executions
S
:
Source word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
D
:
Destination word
IR, SR, AR, DM, EM, HR, LR
Ladder Symbols
Operand Data Areas
MOV(21)
S
D
@MOV(21)
S
D
Source word
Destination word
Bit status
not changed.