BPX1STR (setitimer) example

The following code returns the time remaining an alarm, or ITIMER_REAL as set by setitimer. For the callable service, see setitimer (BPX1STR, BPX4STR) — Set the value of the iterval timer. For the data structure, see BPXYITIM — Map getitimer, setitimer structure. AMODE 64 callers use BPX4STR (setitimer) example.
                                              
         LA    R15,2                 Initial value 2.5 seconds          
         ST    R15,ITIMISECONDS                                         
         L     R15,=A(500000)                                           
         ST    R15,ITIMIMICROSEC                                        
         L     R15,0                 No reload value                    
         ST    R15,ITIMRSECONDS                                         
         ST    R15,ITIMRMICROSEC                                        
         LA    R15,ITIM              Output mapping structure           
         ST    R15,ITIMA             ->structure                        
         CALL  BPX1STR,              Get process data                  +
               (=A(ITIMER_REAL),     Input: Relative process token     +
               ITIMA,                In : ->Buffer, mapped by BPXYITIM +
               ITIMA,                Out: ->Buffer, mapped by BPXYITIM +
               RETVAL,               Return value: -1, 0               +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------