User`s guide
Preparing to Port Macro-32 Code
1.3 Step-by-Step Porting Process for OpenVMS VAX to OpenVMS Alpha or OpenVMS I64
indirect JSB instruction if the routine is written in a language other than
Macro-32. See Appendix B for more information.
8. Repeat Steps 3 through 7 until the compiler generates informational
messages only for Macro-32 source code that you have verified produces
correct OpenVMS Alpha or OpenVMS I64 object code.
9. If your module is common to both OpenVMS VAX and OpenVMS Alpha or
OpenVMS I64 systems (a coding convention discussed in Section 1.7), your
porting effort is not complete until the module is acceptable to the VAX
MACRO assembler as well as the compiler.
Once you have some experience in porting VAX MACRO modules, it will be easier
to recognize certain problems while inspecting the source and to fix them before
your initial invocation of the compiler.
1.4 Step-by-Step Porting Process for OpenVMS Alpha to OpenVMS
I64
Porting VAX MACRO code already running on OpenVMS Alpha to OpenVMS I64
is a relatively simple process. In contrast to porting from OpenVMS VAX, most
VAX MACRO code will recompile with no changes required.
Due to differences in the calling standards between OpenVMS Alpha and
OpenVMS I64, the compiler needs to know about:
• MACRO code that uses the JSB or BSBW instructions to jump to code that is
not written in VAX MACRO
• MACRO code that uses the CALLS or CALLG instructions to call routines
that return values in registers other than R0 or R1
You need to add linkage direcives (.CALL_LINKAGE, .DEFINE_LINKAGE)
to tell the compiler about routines that return values in registers other than
R0/R1 and about routines written in a language other than Macro-32 that
are called with a JSB/BSBW instruction. In addition, you need to add the
.USE_LINKAGE directive at each indirect CALLS/CALLG instruction if the
routine has a nonstandard return. Add the .USE_LINKAGE directive at each
indirect JSB/BSBW instruction if the routine is written in a language other than
Macro-32. See Appendix B, Specialized Directives for more information.
1.5 Identifying Nonportable VAX MACRO Coding Practices
When examining a VAX MACRO module that you intend to compile to OpenVMS
Alpha or OpenVMS I64 object code, you need to look for nonportable coding
constructs. The occurrence of these in a module can make porting take longer
than it would otherwise. Although the compiler can identify many of these
practices, recognizing them yourself will speed up the porting effort. For more
information about nonportable MACRO coding practices, including some that
occur less frequently and are less easy to detect, see Chapter 3.
Look for these nonportable MACRO coding practices:
• Removing the return address from the stack to return to the caller’s caller,
such as the following (see Section 3.3.4):
TSTL (SP)+ ; remove return address
RSB ; return to caller’s caller
1–6 Preparing to Port Macro-32 Code