Language Environment dynamic storage area – XPLINK

An XPLINK DSA (Dynamic Storage Area) differs significantly from the non-XPLINK DSA based on the OS Type I linkage convention that is described in Figure 1.
Figure 1. Language Environment Dynamic storage area – XPLINK format
Dynamic storage area – XPLINK format
Note:
  1. This is the size of the bias between the actual value in the XPLINK stack register (R4) and the start of the DSA. This area is not usable by the current function. It will contain the DSAs of any called XPLINK functions.
  2. A called XPLINK function will only save the registers that might be altered during its execution.
  3. Used by Debug Tool.
  4. Used by stack switching glue code for compatibility with non-XPLINK functions.
  5. Area where argument list for called functions will be built. Only parameters that are not passed in registers will be stored into the argument area.

In an XPLINK function, the currently active DSA is located by R4. However, R4 is "biased" by x'800' (2048) bytes. This bias needs to be added to the contents of R4 to get the actual start of the XPLINK register save area.

XPLINK DSAs can be back-chained using the value of GPR4 in the register save area. However, GRP4 is only optionally saved. The correct way to find the caller's DSA is to add the size of the current DSA to its location.