bdfs1m15 | Structured Programming Macros |
Use this macro group to call common subroutines. Generally, subroutines:
The #SUBR macro group includes the following macros:
See #SUBR Macro Group Processing for a diagram that shows the processing flow of the #SUBR macro group.
Format
|
|
The register specified on the #SUBR macro must be the same register specified on the #PERF macro. If there is a conflict between the registers, an assembly error is issued and the register specified on #SUBR is ignored.
If you do not specify save2 on the #SUBR macro, reg is not saved.
Entry Requirements
None.
Return Conditions
Control is returned to the next sequential instruction.
Programming Considerations
#@LBn EQU *
Where:
You can use the PREFIX parameter to change the standard link-label prefix.
In the following example, there is a call to subroutine XSR1RLCH.
#PERF R14,XSR1RLCH,EBW080 Release old chain * * R14 is stored in EBW080, the subroutine is executed, * then R14 is reloaded from EBW080. * Processing continues with R14 as it was before the * subroutine was invoked by #PERF * (assuming the subroutine itself did not corrupt * EBW080 through EBW083). : : : * #SUBR XSR1RLCH,R14,EBW084 Chain-release subroutine * * The return register (R14) is stored in EBW084 and can be * used in subroutine logic (but do not change the contents * of EBW080 through EBW087...). : * subroutine processing : #ESUB End of subroutine named XSR1RLCH * R14 is restored from EBW084 * before the BR to return
Related Macros