The procedures for the program in the accessing address space include
writing a stacking PC routine (Step 1), establishing the environment
in which it can be called (Steps 2 through 6), and invoking the PC
routine (Step 7). The procedures are as follows:
- Write a PC routine that will run in the accessing address space.
The
PC routine contains the ALESERV ADD request for an address space and
any code that manipulates data in the target address space. (See
Step 7.)
- Issue the AXRES macro to reserve an AX to be placed in the entry table
descriptor (ETD) as the EAX value of the PC routine.
- Place the AX in a common area so that a program in the target
address space can obtain it and set its AT accordingly.
- Issue the ETDEF macro to build the PC routine's ETD.
On
the EAX parameter, code the address of the AX value that is to be
the EAX of the PC routine.
- Establish the cross memory structures in the accessing address
space so that the stacking PC routine can be called.
- Issue the ETCRE macro to build the entry table.
- Issue the LXRES macro to reserve a linkage index (LX) in the linkage
table.
- Issue the ETCON macro to connect the entry table to the linkage table
entry.
- Wait (using the WAIT macro) for the program in the target address
space to set its authority table entry.
The program in the target
address space will accept the EAX value and set the authority table
accordingly. In this way, the target address space "gives permission" to
the accessing program to reference data in the address space.
- Invoke the stacking PC routine to gain EAX-authorization.
While
the PC routine is running, the caller has the EAX value that the EAX
parameter on ETDEF defined. The PC routine can perform the following
actions: