Tony,
this is what I did in SHOWzOS
ICM R1,B'1111',FS_CLONETIME_TVSEC epoch time
JZ USSF182_M
BRASL R14,EPOCH2TOD convert EPOCH TO TOD
EPOCH2TOD BAKR R14,0
LA R2,TENWORDS get output area address
M R0,TODMILL uS since 1970 in R0 & R1
AL R1,TODDIFF+4 Add right half of offset
BRC 12,NOOFL Skip if no overflow
AHI R0,1 Bump up left half (LA would wor
NOOFL AL R0,TODDIFF Add left half of offset
SLDL R0,12 Turn uS into TOD format
STM R0,R1,0(R2)
PR Back
TODMILL DC F'1000000'
TODDIFF DC FL8'2208988800000000'
Roland
>I can use the assembler TIME macro to create a time of day and date in
>various formats
>I can use the assembler STCKCONV macro to convert a TOD clock value to
>time of day and date.
>( Zeller's Congruence. gives me the day.)
>It all comes from the TOD which represents microseconds since 00:00:00 UTC
>on January 1, 1900 (the epoch)
>
>However, Unix system services presents time in the format of 'time' and
>'time_64'.
>This is the time in seconds since 00:00:00 (UTC), January 1, 1970 (a
>different epoch and measurement increment).
>
>(Tourist info -> http://en.wikipedia.org/wiki/System_time )
>
>My question is:-
>How do I create a human readable date / time value in an assembler program
>from the unix 'time' value. ?
>
>I started thinking about converting seconds to microseconds, removing the
>70 years and then using STCKCONV,
>Then I thought about a whole bunch of divide instructions.
>Then I thought, someone must do this. There has to be an easier way.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html