![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: Missing instructions EDITPC and POLYx on conversion from VAX to ALPHA - What do we do? Are these available as subroutines anywhere? "Porting VAX MACRO Code to OpenVMS Alpha" p2-14 does not make it clear that EDITPC is not supported at all. The Answer is : The Packed decimal conversion to a character string instruction (EDITPC) is not supported in the Alpha Macro32 compiler. All packed decimal string operations must be emulated on the Alpha architecture. The POLY instructions are available via RTL call. In most cases, the actual need for these instructions is not present. They provided shortcuts to more common functions. Close examination of their usage should provide insight as to what is actually required. Without an example of the Macro32 source code involved, it is difficult to determine the correct course of action. Having ported code using these on numerous occasions, the OpenVMS Wizard generally finds the converted code simpler to understand and in some cases even faster than the use of these Macro32 instructions. COBOL and the COBOL RTL, as well as BASIC and the BASIC RTL can deal with packed decimal strings, and may be the best approach when porting this code -- consider calling a subroutine written in one of these languages to process and convert the necessary packed decimal data. Alternatively, convert the packed decimal string to a decimal string (NBDS or otherwise) or to an integer or floating point value, and use the various RTL or language-specific routines to manipulate it, and then convert back to packed decimal when/if necessary. The lib$polyf, lib$polyg, and lib$polyh calls are available, and allow access to the polynomial functions. Also available are a set of packed decimal routines in the OTS RTL, and the lib$cvt_dx_dx call using the DSC$K_DTYPE_P datatype. If you are not comfortable with the coding changes, please refer the problem to the Compaq Customer Support Center.
|