z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Reentrant entry linkage

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

This entry linkage is reentrant and saves the caller's registers, allocates a save area and dynamic storage, and establishes program and dynamic storage base registers. This entry linkage is paired with the return linkage that is located at the end of the executable program; see Reentrant return linkage.

         TITLE 'Alphabetical Invocation of OpenMVS Callable Services'
BPXB5SM6 CSECT ,                     Reentrant entry linkage
BPXB5SM6 AMODE 31
BPXB5SM6 RMODE ANY
         USING *,R15                 Program addressability
@ENTRY0  B     @ENTRY1               Branch around program header
         DROP  R15                   R15 not needed for addressability
         DC    C'BPXB5SM6 - Reentrant callable service examples'
         DS    0H                    Ensure half word boundary
@ENTRY1  STM   R14,R12,12(R13)       Save caller's registers
         LR    R2,R13                Hold address of caller's area
         LR    R3,R1                 Hold parameter register
         LR    R12,R15               R12 program base register
         LA    R11,2048(,R12)        Second program base register
         LA    R11,2048(,R11)        Second program base register
         LA    R9,2048(,R11)         Third program base register
         LA    R9,2048(,R9)          Third program base register
         USING @ENTRY0,R12,R11,R9    Program addressability
         L     R0,@SIZEDAT           Size this program's getmain area
         GETMAIN RU,LV=(0)           Getmain storage
         LR    R13,R1                R13 -> this program's save area
         LA    R10,2048(,R13)        Second getmain base register
         LA    R10,2048(,R10)        Second getmain base register
         USING @STORE,R13,R10        Getmain addressability
         ST    R2,@BACK              Save caller's save area pointer
         ST    R13,8(,R2)            Give caller our save area
         LR    R1,R3                 Restore parameter register
@ENTRY2  EQU   *  *  *  *  *  *  *   End of the entry linkage code
         SPACE ,
PSEUDO   EQU   *                     Dummy label used throughout       

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014