2-129
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Data Shift Instructions
2
SFTR
SFTR
Applicable Program Areas
Operands
C: Control Word
Note St and E must be in the same data area.
Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
REVERSIBLE SHIFT REGIS-
TER
SFTR @SFTR 084
Creates a shift register that shifts data to either the
right or the left.
Symbol
SFTR
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
C Control word UINT 1
St Starting word UINT Variable
EEnd word UINT Variable
Area
Word addresses Indirect DM addresses
Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
C,St,E OK OK OK OK OK OK OK OK OK --- --- --- ---
Name Label Operation
Error Flag P_ER • ON when St is greater than E.
• OFF in all other cases.
Carry Flag P_CY • ON when 1 is shifted into it.
• OFF when 0 is shifted into it.
• OFF when reset is set to 1.
SFTR(084)
C
St
E
C: Control word
St: Starting word
E: End word
15 14 13 12
Data input
Reset
Shift input
Shift direction
1 (ON): Left
0 (OFF): Right