Unix/Linux Epoch Time Converter..
12-31-2017, 06:50 PM (This post was last modified: 12-31-2017 06:56 PM by salvomic.)
Post: #9
 salvomic Senior Member Posts: 1,366 Joined: Jan 2015
RE: Unix/Linux Epoch Time Converter..
(12-31-2017 04:36 PM)Sylvain Cote Wrote:  ...
Look at the line number on the left, he just optimized it for the post
...

Thank you Bill for this nice routine and Happy New Year!

Sylvain

(12-31-2017 05:17 PM)Bill Duncan Wrote:  Yes, sorry Salvo.. I often put several lines of code on one line if I feel that it helps the clarity of the program. Obviously in this case it didn't, or I should've warned everyone anyway..

Cheers.

Thank you Sylvain and Bill!
It worked deleting line numbers, as in this code:
Code:
LBL "EPOCH" -18000   STO 00 1.01197  STO 01 86400    STO 02 SF 27 LBL A DATE  TIME LBL B X<>Y RCL 01 X<>Y DDAYS RCL 02 * X<>Y HR 3600 * + RCL 00 - RTN LBL C RCL 00 + ENTER ENTER RCL 02 / INT RCL 01 X<>Y DATE+ CLA ADATE AVIEW PSE X<>Y RCL 02 MOD 3600 / HMS CLA ATIME AVIEW END
I got the .raw for HP42/Free42 (DM42), that' this code:
Code:
00 { 94-Byte Prgm } 01▸LBL "EPOCH" 02 -18000 03 STO 00 04 1.01197 05 STO 01 06 86400 07 STO 02 08 SF 27 09▸LBL A 10 DATE 11 TIME 12▸LBL B 13 X<>Y 14 RCL 01 15 X<>Y 16 DDAYS 17 RCL 02 18 × 19 X<>Y 20 →HR 21 3600 22 × 23 + 24 RCL 00 25 - 26 RTN 27▸LBL C 28 RCL 00 29 + 30 ENTER 31 ENTER 32 RCL 02 33 ÷ 34 IP 35 RCL 01 36 X<>Y 37 DATE+ 38 CLA 39 ADATE 40 AVIEW 41 PSE 42 X<>Y 43 RCL 02 44 MOD 45 3600 46 ÷ 47 →HMS 48 CLA 49 ATIME 50 AVIEW 51 END
To use the attached file, delete the .txt extension.

I wonder how to simulate in Free42 the "user mode" (HP41CX) and A, B, C.
I'm testing it only executing XEQ "EPOCH" for now...

The raw is not good in the emulator i41CX however. Is there a tool to get raw files from text for HP41CX, like the tool by Swiss Micros?

Thank you,
HNY!

Salvo

Attached File(s)