SPL to HP C/XL Migration Guide (30231-90001)

5- 16
Table 5-17. SPL 48-Bit Shift Operators
-------------------------------------------------------------------------------------------
| |
| shift-op Operation |
| |
-------------------------------------------------------------------------------------------
| |
| TASL arithmetic shift left (sign retained) |
| |
| TASR arithmetic shift right (no sign extension) |
| |
| TNSL normalizing shift left |
| |
-------------------------------------------------------------------------------------------
Because there is no triple-word data type in MPE V (early versions of
LONG were three words), the use of these operations is extremely rare,
and is generally preceded by stack operations, which must be recoded in
HP C/XL. The TNSL operation normalizes a triple-word floating point
number, and is even more rare in SPL than the first two. If necessary,
these operations could be written in HP C/XL in a manner similar to the
examples above.
64-Bit Shift Operators.
Finally, the two SPL 64-bit (four-word) shift operators are described in
Table 5-18.
Table 5-18. SPL 64-Bit Shift Operators
-------------------------------------------------------------------------------------------
| |
| shift-op Operation |
| |
-------------------------------------------------------------------------------------------
| |
| QASL arithmetic shift left (sign retained) |
| |
| QASR arithmetic shift right (sign extended) |
| |
-------------------------------------------------------------------------------------------
Because the only four-word data type in SPL is LONG (a floating point
number in a format unique to the hardware for which SPL was designed),
any use of these operators would almost certainly have to be recoded.
They could, however, be emulated by slight modification of the DASL and
DASR macro directives above.
Arithmetic Expressions
Table 5-19. Arithmetic Expressions
---------------------------------------------------------------------------------------------
|||
| SPL | HP C/XL Equivalent |
|||
---------------------------------------------------------------------------------------------
|||
|
arithmetic-expression
: | Same as SPL, except as noted below. |
|||
|[
sign
]
primary
[
operator primary
][,...] | |
|||
---------------------------------------------------------------------------------------------