Saving and restoring the high halves of General Purpose Registers in assembler programs

In this topic, you can find information about how to save and restore the high halves of General Purpose Registers (GPRs) in assembler programs that will call or be called by Enterprise COBOL V5 or V6.

Do not use the F5SA or F8SA save area formats as described in the MVS Programming: Assembler Services Guide.

You can save the high halves of GPRs to and restore from anywhere in your user storage, but you might want to choose the model used by COBOL when HGPR(PRESERVE) is in effect. In this case, the COBOL V5 or V6 compiler always uses a block of storage in the same relative location as is used to save the lower halves of the registers. Here is an example of what COBOL V5 does to save and restore the high halves of GPRs:
  1. On entry:
    1. Reserve 72 bytes in DSA, currently at about offset +136
    2. Specify STMH R1,R15,136(,R13)
  2. On exit, specify LMH R1,R15,136(,R13)