User`s guide
Recommended and Required Source Changes
3.2 Instruction Stream
Prober_mac - ; This one works, too.
r1, -
r2, -
r3
.end
3.3 Flow Control Mechanisms
Certain flow control mechanisms used with VAX MACRO do not produce the
desired results on OpenVMS Alpha or OpenVMS I64 systems. Therefore, some
changes to your code are either recommended or required.
Included in this category are several frequently used variations of modifying the
return address on the stack, from within a JSB routine, to change the flow of
control. All must be recoded.
3.3.1 Communication by Condition Codes
The compiler detects a JSB instruction followed immediately by a conditional
branch, or a conditional branch as the first instruction in a routine, and generates
an error message.
Recommended Change
Return a status value or a flag parameter to take the place of implicit
communication by means of condition codes.
For example:
BSBW GET_CHAR
BNEQ ERROR ; Or BEQL, or BLSS or BGTR, etc
can be replaced with:
BSBW GET_CHAR
BLBC R0, ERROR ; Or BLBS
If you are already using R0, you must push it onto the stack and restore it later
when you have handled the error.
3.3.2 Branches from JSB Routines into CALL Routines
The compiler will flag, with an information-level message, a branch from a
JSB routine into a CALL routine, if the .JSB_ENTRY routine saves registers.
The reason such a branch is flagged is because the procedure’s epilogue code to
restore the saved registers will not be executed. If the registers do not have to be
restored, no change is necessary.
Recommended Change
The .JSB_ENTRY routine is probably trying to execute a RET on behalf of its
caller. If the registers that were saved by the JSB_ENTRY must be restored
before executing the RET, change the common code in the .CALL_ENTRY to a
.JSB_ENTRY which may be invoked from both routines.
For example, consider the following code example:
3–8 Recommended and Required Source Changes