SHIFTRIGHTA


 

The SHIFTRIGHTA instruction performs a right algebraic shift of variable's bits. It uses the following format:

 

 

[label]

SHIFTRIGHTA

{source},{count}

 

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:

  1. The SHIFTRIGHTA instruction performs a right algebraic shift of the {source] variable bits by the {count} bit count value.

  2. The {source} variable bit value is treated as a signed value.

  3. High order bits that are shifted right are replaced with a bit value of zero.

  4. Lower order bits that are shifted beyond the lowest bit value are truncated and lost.

  5. The ZERO flag is set if the resulting {source} variable value is zero.

 

 

See Also: SHIFTLEFT, SHIFTLEFTA, SHIFTRIGHT, ROTATERIGHT, ROTATELEFT, Mathematical Instructions

 



PL/B Language Reference SHIFTRIGHT SIN