Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Loading the Value of Zero into an AR z/OS MVS Programming: Extended Addressability Guide SA23-1394-00 |
|
When the code you are writing is in AR mode, you must be very conscious of the contents of the ARs. For instructions that reference data, the ARs must always contain the ALET that identifies the address/data space that contains the data. Therefore, even when the data is in the primary address space, the AR that accompanies the GPR that has the address of the data must contain the value "0". The following examples show several ways of placing the value "0" in an AR. Example 1 Set AR 5 to value of zero, when
GPR 5 can be changed.
Example 2 Set AR 5 to value of zero, without
changing value in GPR 5.
Another way of doing this is the following:
Example 3 Set AR 5 to value of zero, when
AR 12 is already 0.
Example 4 Set AR 12 to zero and set GPR 12
to the address contained in GPR 15. This code is useful to establish
a program's base register GPR and AR from an entry point address contained
in register 15. The example assumes that GPR 15 contains the entry
point address of the program, PGMA.
Another way to establish AR/GPR module addressability through register
12 is as follows:
Example 5Set AR 5 and GPR 5 to zero.
|
Copyright IBM Corporation 1990, 2014
|