SHIFTRIGHT
The SHIFTRIGHT instruction performs a right logical shift of variable's bits. It uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
source
Required. An Integer variable that is modified.
count
Required. A number of bits to shift.
Flags Affected: ZERO
Note the following:
The SHIFTRIGHT instruction performs a right logical shift of the {source] variable bits by the {count} bit count value.
The {source} variable bit value is treated as an unsigned value.
High order bits that are shifted right are replaced with a bit value of zero.
Lower order bits that are shifted beyond the lowest bit value are truncated and lost.
The ZERO flag is set if the resulting {source} variable value is zero.
See Also: SHIFTLEFT, SHIFTLEFTA, SHIFTRIGHTA, ROTATERIGHT, ROTATELEFT, Mathematical Instructions
![]() |