z/OS MVS Programming: Extended Addressability Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Manipulating the contents of ARs

z/OS MVS Programming: Extended Addressability Guide
SA23-1394-00

Whether the ASC mode of a program is primary or AR, the program can use assembler instructions to save, restore, and modify the contents of the 16 ARs. Both problem state and supervisor state programs can use these instructions.

The set of instructions that manipulate ARs includes:
  • CPYA — Copy the contents of one AR into another AR.
  • EAR — Copy the contents of an AR into a GPR.
  • LAE — Load a specified ALET/address into an AR/GPR pair.
  • SAR — Place the contents of a GPR into an AR.
  • LAM — Load the contents of one or more ARs from a specified location.
  • STAM — Store contents of one or more ARs at a specified location.

For their syntax and help with how to use them, see Principles of Operation.

Example of Loading an ALET into an AR

An action that is very important when a program is in AR mode, is the loading of an ALET into an AR. The following example shows how you can use the LAM instruction to load an ALET into an AR.

The following instruction loads an ALET (located at DSALET) into AR 2:
        LAM   2,2,DSALET           LOAD ALET OF DATA SPACE INTO AR2
        .
DSALET  DS   F                     DATA SPACE ALET

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014