6.13.2 SHR - W & SHL - W
Input/output Operand
Data type
IN
VW, IW, QW, MW, SW, SMW, LW, T, C, AIW, AC,constant, *VD, *LD, *AC word
N
VB, IB, QB, MB, SB, SMB, LB, AC,constant, *VD, *LD, *AC
byte
OUT
VW, IW, QW, MW, SW, SMW, LW, T, C, AC, *VD, *LD, *AC
word
SHR - W: Input word "IN" and move N bits towards the
right.Then place the results in OUT.
SHL - W: Input word "IN" and move N bits towards the
left.Then place the results in OUT.
The moved out bits are filled with zero.If N is greater than
or equal to 16, you can move up to 16 bits.
SHR - W & SHL - W operations are signed. Symbol bit can
be moved.
error conditions:
0006
Indirect address
Special memory bit:
SM1.0
Zero Result
SM1.1
Overflow
Example:
When the value of M0.0 is 1, VW0 moves two bits towards the left and VW10 moves
two bits towards the right.
177
Made with FlippingBook - Online magazine maker