BPX4MPI (mvspauseinit) example

The following code prepares the thread for a subsequent MVSpause invocation. A list of Event Control Block addresses is passed to the system with the last address having the high order bit on. This syscall will use the first ECB pointed to from the list as the signal ECB, therefore at least one ECB address must be passed to the system. For the callable service, see mvspause (BPX1MP, BPX4MP) — Wait on user events plus signals. AMODE 31 callers use BPX1MPI (mvspauseinit) example.
                                              
         LA    R15,BUFFERA           Load address of ECB address list   
         STG   R15,BUFA              Save address for future parameter  
*                                     to be passed to BPX4MPI           
         SR    R15,R15               Clear R15                          
         ST    R15,ECB01             Clear ECB01                        
         ST    R15,ECB02             Clear ECB02                        
         LA    R15,ECB01             Load address of first ECB          
         ST    R15,BUFFERA           Save ECB address in list of        
*                                       pointers                        
         LA    R15,ECB02             Load address of second ECB         
         ST    R15,BUFFERA+4         Save ECB address in list of        
*                                       pointers                        
         OI    BUFFERA+4,X'80'       Denote end of ECB pointers         
         SPACE ,                                                        
         CALL  BPX4MPI,              MVS Pause initialize              +
               (BUFA,                Input ->list of ECB@, x'80' ended +
               RETVAL,               Return value: 0, -1               +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------