329
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Data Shift Instruction
3
NSFL/NSFR
NSFL/NSFR
Applicable Program Areas
Operands
C: Beginning bit
0000 to 000F hex (0 to 15)
N: Shift data length
0000 to FFFF hex (0 to 65535)
Note All words in the shift register must be in the same area.
z Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
SHIFT N-BIT DATA LEFT NSFL @NSFL 578 Shifts the specified number of bits to the left.
SHIFT N-BIT DATA RIGHT NSFR @NSFR 579 Shifts the specified number of bits to the right.
Symbol
NSFL NSFR
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
D Beginning word for shift UINT Variable
C Beginning bit UINT 1
N Shift data length UINT 1
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
D
OK OK OK OK OK OK OK OK OK OK
--- ---
--- OK --- --- --- ---C
OK OK
N
Name Label Operation
Error Flag ER • ON when C data is not between 0000 and 000F hex.
• OFF in all other cases.
Carry Flag CY • ON when 1 is shifted into the Carry Flag (CY).
• OFF in all other cases.
NSFL(578)
D
C
N
N: Shift data length
D: Beginning word for shift
C: Beginning bit
NSFR(579)
D
C
N
N: Shift data length
D: Beginning word for shift
C: Beginning bit