Using the linkage stack

To add an entry to the linkage stack, the target program issues the BAKR instruction. The BAKR instruction stores all ARs and 64-bit GPRs and the ASC mode on the linkage stack. The target program must then indicate that it used the linkage stack, which is useful information for anyone who later needs to trace the program linkages. The procedure for indicating use of the linkage stack is described in:

When the target program is ready to return to the calling program, it issues the PR instruction. The PR instruction restores the calling program's ARs 2-14 and 64-bit GPRs 2-14 and ASC mode from the linkage stack, removes the entry from the linkage stack, and returns control to the calling program.