2 Instructions
2-144 CP1E CPU Unit Instructions Reference Manual(W483)
NASR/NSRL
Applicable Program Areas
Operands
C: Control word
Operand Specifications
Instruction Mnemonic Variations Function
code Function
SHIFT N-BITS RIGHT NASR @NASR 581 Shifts the specified 16 bits of word data to the right by
the specified number of bits.
DOUBLE SHIFT N-BITS
RIGHT NSRL @NSRL 583 Shifts the specified 32 bits of word data to the right by
the specified number of bits.
Symbol
NASR NSRL
Area Step program areas Subroutines Interrupt tasks
Usage OK OK OK
Operand Description Data type Size
NASR NSRL NASR NSRL
D Shift Word UINT UDINT 1 2
C Control word UINT UDINT 1 1

NASR NSRL

Area Word addresses Indirect DM addresses Constants CF Pulse bits TR bits
CIO WR HR AR T C DM @DM *DM
DOK OK OK OK OK OK OK OK OK --- --- --- ---
COK
NASR(581)
D
CC: Control word
D: Shift word
NSRL(583)
D
CC: Control word
D: Shift word
15 8 011 712
C0
No. of bits to shift: 00 to 10 Hex
Always 0.
Data shifted into register
0 Hex: 0 shifted in
8 Hex: Contents of rightmost bit shifted in
15 8 011 712
C0
No. of bits to shift: 00 to 20 Hex
Always 0.
Data shifted into register
0 Hex: 0 shifted in
8 Hex: Contents of rightmost bit shifted in