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


Assembler routine

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

***********************************************************************
*   CSECT-NAME:  BPXTEPOC
*
*   DESCRIPTIVE-NAME:  Convert TOD to Epoch time
*
*   Input: R1 ->
*               address of TOD value to convert (double word)
*               address of output epoch time (one word)
***********************************************************************
BPXTEPOC CSECT
BPXTEPOC AMODE ANY
BPXTEPOC RMODE ANY
         EDCPRLG
         L     R2,0(R1)           get tod address
         LM    R14,R15,0(R2)      get tod
         LTR   R14,R14            check high word for 0
         BNZ   EPOCTOD            if input tod is 0
         STCK  0(R2)              get current tod
         LM    R14,R15,0(R2)      get tod
EPOCTOD  L     R2,4(R1)           get output area
         LM    R0,R1,EPOCJ70      get epoch tod
         SLR   R15,R1
         BC    11,*+6
         BCTR  R14,0
         SLR   R14,0
         D     R14,EPOCST         divide by seconds per tod unit
         SLR   R14,R14
         LA    R1,2
         DR    R14,R1
         ST    R15,0(R2)
         EDCEPIL
EPOCJ70  DS    0D
         DC    X'7D91048BCA000000'
EPOCST   DC    X'7A120000'
*

Go to the previous page




Copyright IBM Corporation 1990, 2014