To return control to the calling program, an AR mode program would:
- Place return information (if any) for the caller into AR/GPR 0,
AR/GPR 1, or both. For information about passing information through
a parameter list, see Conventions for passing information through a parameter list.
- Load the return code, if any, into GPR 15.
- Load the address of the calling program's save area from words
33-34 of the AR mode program's save area into GPR 13.
- Load the ALET of the calling program's save area from word 51
of the AR mode program's save area.
- Load the ASC mode of the calling program from word 52 of the AR
mode program's save area.
- Restore the calling program's ASC mode.
- Restore ARs 14-12 from the calling program's save area.
- Restore GPR 14 and GPRs 0-12 from the calling program's save area.
- Return to the caller via the BR 14 or BSM 0,14 instruction according
to your documentation
See Example.