The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
HMS-> & ->HMS Prog. for 12C
01-10-2018, 05:18 AM
Post: #1
HMS-> & ->HMS Prog. for 12C
I am inspired by Gamo to post some HP-12C programs! I have honed these 2 programs for a couple of months now. Since I collect driving times everyday, I need to convert the DD.MMSSSS into a number and vice versa.

Here is HMS to decimal format
Code:

01  [ENTER]
02  [g] [INTG]
03  [SWAP]
04  [g] [FRAC]
05  [EEX]
06  2
07  [x]
08  [ENTER]
09  [g] [INTG]
10  [SWAP]
11  [g] [FRAC]
12  [ . ]
13  6
14  [ / ]
15  [+]
16  6
17  0
18  [ / ]
19  [+]

Now here is my other program that converts from decimal to DD.MMSSSS
Code:

01  [ENTER]
02  [g] [INTG]
03  [SWAP]
04  [g] [FRAC]
05  6
06  0
07  [x]
08  [ENTER]
09  [g] [INTG]
10  [EEX]
11  2
12  [ / ]
13  [SWAP]
14  [g] [FRAC]
15  6
16  0
17  [x]
18  [EEX]
19  4
20  [ / ]
21  [+]
22  [+]

I even dare say this program is better than Eddie Shore's program (I ran into his program as I was scouring the forums to check for a similar post as this one) This is because it is shorter, doesn't use any registers, and both of our (Me & Eddie) programs completely wipe any intermediate results stored in the stack before program execution. However, I can't say who's is better in the contest of speed, as I only have a modern HP-12C.

The only reason why I bring up Eddie's program is because he writes a lot of programs and seems experienced. So I'm comparing my first programs with his. And I wrote this program completely on my own, with refinements over time.

I also expect Deiter (I think I spelled his name right) to check and cirque my program. Just like with Gamo's programs.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HMS-> & ->HMS Prog. for 12C - Carsen - 01-10-2018 05:18 AM
RE: HMS-> & ->HMS Prog. for 12C - Carsen - 01-10-2018, 05:22 AM
RE: HMS-> & ->HMS Prog. for 12C - Gamo - 01-10-2018, 06:49 AM
RE: HMS-> & ->HMS Prog. for 12C - Dieter - 01-10-2018, 10:37 AM
RE: HMS-> & ->HMS Prog. for 12C - Carsen - 01-11-2018, 04:46 AM
RE: HMS-> & ->HMS Prog. for 12C - Pekis - 01-11-2018, 06:08 AM
RE: HMS-> & ->HMS Prog. for 12C - Dieter - 01-11-2018, 07:03 PM
RE: HMS-> & ->HMS Prog. for 12C - Pekis - 01-11-2018, 09:22 PM
RE: HMS-> & ->HMS Prog. for 12C - Dieter - 01-12-2018, 09:13 AM
RE: HMS-> & ->HMS Prog. for 12C - Carsen - 01-13-2018, 01:26 AM
RE: HMS-> & ->HMS Prog. for 12C - Pekis - 01-12-2018, 12:36 PM
RE: HMS-> & ->HMS Prog. for 12C - Dieter - 01-12-2018, 12:50 PM



User(s) browsing this thread: 8 Guest(s)