Using access registers
For storing data, MVS™ offers a program the use of a virtual storage area called a data space. Assembler instructions (such as Load, Store, Add, and Move Character) manipulate the data in a data space. When you use instructions to manipulate data in a data space, your program must use the set of general purpose registers (GPRs) plus another set of registers called access registers. This chapter describes how to use access registers to manipulate data in data spaces.
- Moving data into and out of a data space, and within a data space
- Performing arithmetic operations with values that are located in data spaces
To fully understand how to use the macros and instructions that control data spaces and access registers, you must first understand some concepts.
ARs are used when fetching and storing data, but they are not used when doing branches.
- In primary mode, your program can access data that resides in the program's primary address space. When it resolves the addresses in data-referencing instructions, the system does not use the contents of the ARs.
- In AR mode, your program can access data that resides in the address space or data space that the ARs indicate. For data-referencing instructions, the system uses the AR and the GPR together to locate an address in an address space or data space.
- SAC 512 sets the ASC mode to AR mode.
- SAC 0 sets the ASC mode to primary mode.
What does an AR contain? An AR contains a token, an access list entry token (ALET). An ALET is an index to an entry on the access list. An access list is a table of entries, each one of which points to an address space, data space, or hiperspace to which a program has access.
For programs in AR mode, when the GPR is used as a base register in an instruction, the corresponding AR must contain an ALET. Conversely, when the GPR is not used as a base register, the corresponding AR is ignored.
By placing an entry on an access list and obtaining an ALET for the entry, a program builds the connection between the program and an address space, data space, or hiperspace. The process of building this connection is called establishing addressability to an address space, data space, or hiperspace. To add the entry to the access list, your program uses the ALESERV macro, which is described in The ALESERV macro.
- Gain access to a data space or an address space through assembler instructions.
- Obtain the ALET for a hiperspace. With that ALET, the program
can use the HSPALET parameter on HSPSERV to:
- Gain additional performance from the transfer of data to and from expanded storage. Information on when and how you use an access list entry for hiperspaces is described in Obtaining additional HSPSERV performance.
- Improve its ability to share hiperspaces with other programs. The subject of sharing hiperspaces is described in Shared and non-shared standard hiperspaces.
- The subject of inter-address space communication, appropriate only for programs in supervisor state or with PSW key 0 - 7, is described in z/OS MVS Programming: Extended Addressability Guide.
- Because a program cannot use ARs to directly manipulate data in a hiperspace, the subject of how a program uses ARs and access lists to access hiperspaces differs from the discussion in the rest of this chapter.