C$LogicalShiftRight

Performs a logical shift right operation on a non-numeric or numeric operand.

When calling this routine, ensure you are using the 1024 calling convention.

Syntax:

CALL "C$LogicalShiftRight"
[GIVING result]
 USING operand [shiftcount]

Parameters:

result
PIC 9(n)
operand
A non-numeric or numeric operand
shiftcount
PIC 9(n)

On Entry:

operand
A non-numeric or numeric operand.
shiftcount
The number of positions to shift during the operation.

On Exit:

result
The result of the operation.

Comments:

If operandrefers to a non-numeric data item, the value of the data item is shifted right by the number of bit positions specified by shiftcount. Any bits shifted off the right end are lost and zero-valued bits are shifted into the left end. The value of Result is set to a non-zero value if any character of operand is non-zero after the operation completes and zero otherwise.

If operand refers to a numeric data item, the operand is converted, if necessary, to a 32-bit binary integer. The 32-bit binary value is logically shifted right by the number of bit positions specified by shiftcount. If the GIVING phrase is specified, the result of this operation is stored in result and the value of operand is not modified. If the GIVING phrase is not specified, the result of this operation is stored in operand.