165
5-14-4 WORD SHIFT: WSFT(053)
Variations
j WSFT(053)
(053)
WSFT S St E
Operand Data AreasLadder Symbol
S: Source word CIO, G, A, T, C, #, DM, DR, IR
E: End word CIO, G, A, DM
St: Starting word CIO, G, A, DM
When the execution condition is OFF, WSFT(053) is not executed. When the ex-
ecution condition is ON, WSFT(053) shifts data between St and E in word units.
The data in S is copied into St and the content of E is lost.
F0C234521029
E St + 1 St
345210294BC0
E St + 1 St
Lost
4BC0
S
St must be less than or equal to E. St and E must be in the same data area.
The shift operation might not be completed if a power interruption occurs during
execution of the instruction.
Note 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.
The St and E words are in different areas, or St is greater
than E.
Example When CIO 000000 is ON in the following example, FF00 is shifted into D00010,
the word data in D00010 is shifted to D00011, the word data in D00011 is shifted
to D00012, and the word data in D00012 is lost.
Address Instruction Operands
00000 LD 000000
00001 WSFT(053)
#FF00
D00010
D00012
Lost data
St+1: D00011
5 6 7 8
E: D00012
5 6 7 8
St+1: D00011
9 A B C
9 A B C
St: D00010
F F 0 0
S : #FF00
E: D00012
1 2 3 4
St: D00010
Description
Precautions
Shift Instructions Section 5-14
(053)
WSFT #FF00 D00010 D00012
0000
00