HPPACNSLD [ Compiler Library/XL Reference Manual ] MPE/iX 5.0 Documentation
Compiler Library/XL Reference Manual
HPPACNSLD
HPPACNSLD performs a decimal normalizing left shift.
Declaration
PROCEDURE HPPACNSLD (
ANYVAR operand2 :decimal_type;
op2digs :INTEGER;
ANYVAR operand1 :decimal_type;
op1digs :INTEGER;
VAR shift_amt :INTEGER;
VAR comparison_code :INTEGER;
VAR pacstatus :INTEGER;
VAR carry :INTEGER)
OPTION
DEFAULT_PARMS (
comparison_code :=NIL,
pacstatus :=NIL,
carry :=NIL)
UNCHECKABLE_ANYVAR;
EXTERNAL;
Comments
* Operand1 is moved to the operand2 field with its digits offset by the
shift amount in the low-order five bits of shift_amt.
* Leading or trailing digits in the result field that are not supplied
by the source operand will be zeros.
* If the shift amount is large enough that significant digits of
operand1 would be shifted out of the operand2 field, the effective
shift amount is reduced so operand1 is left-justified in the operand2
field. In addition, a number equal to the difference between the
specified and actual shifts amounts is left in shift_amt, and carry
is set to one.
* If the length of the operand2 field is such that significant digits
would be lost even with a shift amount of zero, a decimal overflow
trap occurs, and no data movement occurs.
Possible Traps
Decimal overflow (1)
Invalid packed-decimal digit (3)
Invalid decimal operand length (5)
MPE/iX 5.0 Documentation