
Programming an HP-15C (2013) - luu
https://blog.plover.com/brain/hp-15c.html
======
GeorgeTirebiter
I bought a 15C new. I still have it on my EE bench (replacing my slide rule,
of course). Every 8 or 9 years I replace the three LR44 batteries. And writing
little programs to tickle the Inner Nerd is always fun. HP: we miss you!

~~~
lmilcin
I have been using HP 42S for the past 15 years and would not replace it for
any other. It is a pity that the LCD fades out in these and now it is only
possible to see it at specific angles.

~~~
StreakyCobra
You may be interested by this [1]

The device is reliable, the screen is amazing, the USB connectivity brings a
lot of value and the community on SwissMicros' forum are passionate HP people.

I'm not affiliated with them in any way, just an happy geeky customer :)

[1]
[https://www.swissmicros.com/dm42.php](https://www.swissmicros.com/dm42.php)

~~~
golem14
Seconded. Their replicas are amazing, even better than the already awesome
originals. I own a few, only god knows why :)

Maybe I'll ask to be buried with them, so I can be dug up in a few thousand
years and worry archeologists ;)

------
gshubert17
I think the "someone who brought it back" is Swiss Micros, which makes a
compatible calculator (which they call DM-15) as well as other models in the
same family. They say their chip that emulates the original cpu is quite a bit
faster than the original.

[https://www.swissmicros.com](https://www.swissmicros.com)

~~~
jonsen
HP still makes a decent HP-15-like calculator:

[https://en.m.wikipedia.org/wiki/HP_35s](https://en.m.wikipedia.org/wiki/HP_35s)

~~~
golem14
The HP store shows many of their remaining 7 (!) calculator models out of
stock quite often. I'm not taking any bets on how long HP is going to make any
calculators at all. I feel sad every time I visit their store...

They already stopped making any kind of graphing calculator, apparently.

~~~
SkyMarshal
HP ported their calculators to iPhone and Android apps. Most people who want
an HP calc probably just use those now instead, except for the few who want
the tactile feel of calculator buttons.

~~~
metaphor
For the discerning STEM student/professional, 15c is the only relevant RPN
emulator on mobile officially released by HP and it's an overpriced
disappointment IMHO.

HP didn't even extend a courtesy reach-around for our CS/CpE brethren with 16c
integration despite their $16.99! Even if you were in the market circa 2011 to
pre-order one (or a few) 15c LE--which came with a copy of the desktop app--
you'd still have to pony up even more for the mobile app!

On Android, I'd highly recommend skipping the "official" HP garbage and
supporting CalcTastic Plus[1] for a mere $0.99. Even the free version makes
the HP emulator look like a complete joke. I've been rolling with a 35s as
workhorse since undergrad days, but couldn't care less if today's zombie HP
literally disappeared from the market tomorrow.

[1]
[https://play.google.com/store/apps/details?id=com.shaytastic...](https://play.google.com/store/apps/details?id=com.shaytasticsoftware.calctastic)

~~~
SkyMarshal
Good info, thanks for the update!

------
drivers99
Wow that sounds a lot more complicated than the one I had, HP 42S, because you
had to use codes for the instructions instead of just pulling up the
instructions in readable ASCII.

I found this random example of entering a program on a 42S:
[https://www.youtube.com/watch?v=JQMOOxup8bI](https://www.youtube.com/watch?v=JQMOOxup8bI)
Coincidentally, it even uses the FP (fractional part) and X=0? test that the
OP mentioned.

I wanted to see what programming the 15C looked like, so I found this as well:
[https://www.youtube.com/watch?v=m4dF5nF8I88](https://www.youtube.com/watch?v=m4dF5nF8I88)
Looks like you can enter the program without knowing the codes, but reviewing
the code just shows codes.

~~~
opencl
The HP codes aren't too bad because they correspond to the location of the
keys on the keyboard, i.e. y^x is 21 because it's the second row and first
column of the keyboard. If you want something really confusing try programming
a Soviet Elekronika calculator, they actually work fairly similarly to the HPs
but the codes displayed on the screen when inputting a program are in
hexadecimal displayed with weird symbols because you can't actually show A-F
on a seven segment display.

~~~
a_e_k
I've typically seen A-F rendered like so:

    
    
       _         _        _   _
      |_|  |_   |    _|  |_  |_
      | |  |_|  |_  |_|  |_  |
    

(Variations would be a double-story lower case 'a' and lower case 'c'.)

~~~
kps
But if they cloned the 7447 decoder they'd look like

    
    
                       _     
         _    _   |_| |_   |_ 
        |_    _|       _   |_
    

with 15 blank.

------
edeion
Given how hard it can be for me to focus when the web is just one click away,
these dedicated tools are such a boon. Plus the hacker touch of these
programming languages has something lovely.

(I don't get what's so funny with the 38x3, though...)

~~~
cr0sh
Yeah - I'm not mathematically inclined enough to understand what would be so
funny about the 38x^3 denominator either?

Unless it's something that would cause an error due to memory/register size
constraints, or cause the calculator to sit there forever on some of the other
larger squares or test values due to 1986 speed of the ALU or whatever is in
the calc?

My gut assumption is that it's some mathematics inside joke of some sort...

~~~
krallja
All of the other constants are expected. 1, 2, 9, 10 ok those make sense.
Where does 38 come from? Ha ha. So random.

~~~
mjd
I could not have put it better myself.

------
cameldrv
Related: it’s been sad to see the HP48 emulators bitrotting. m48 is no longer
available on the App Store, and I can’t find anything that works anymore for
the Mac.

~~~
msla
There's a port of Emu48 to MacOS

[https://sourceforge.net/projects/emu48mac/](https://sourceforge.net/projects/emu48mac/)

Kinda Mac-related is i48 for iOS:

[https://apps.apple.com/us/app/i48/id329454950](https://apps.apple.com/us/app/i48/id329454950)

hpcalc.org has a list of emulators:

[https://www.hpcalc.org/hp48/pc/emulators/](https://www.hpcalc.org/hp48/pc/emulators/)

Best seems to be Emu48, as mentioned above:

[https://hp.giesselink.com/emu48.htm](https://hp.giesselink.com/emu48.htm)

x48 is open source, like Emu48:

[https://sourceforge.net/projects/x48.berlios/](https://sourceforge.net/projects/x48.berlios/)

~~~
cameldrv
Unfortunately I couldn't get any of em to build anymore. Emu48 is definitely
the best, but it needs help to build on new MacOS. x48 doesn't build anymore,
and is also X11 based, which is not great on Mac anymore either.

------
0culus
I have both the HP15C and two HP16Cs, though I am not old enough to have
bought one new. :o) Truly awesome calculators, even if they are a bit slow
sometimes. The form factor of the Voyagers is amazingly perfect; in fact the
ratio of the length to width is approximately the Golden Ratio if I recall.

I use mine regularly as I prefer a tactile instrument. Plus the mental
challenge of implementing programs in a constrained environment is
invigorating.

------
slowhand09
Upvote because I still own and occasionally use my HP-11C. It may be on its
4th set of batteries, after 30+ years. I haven't written code on it for 20yrs,
but the last was a sight-reduction program for celestial navigation. I do have
and use emulation of HP-15C on every computer I cam, plus my phone.

------
RedNifre
Oh, yeah, I wrote a Brainfuck interpreter for those
[https://steemit.com/programming/@michaelzinn/babbage-s-
diffe...](https://steemit.com/programming/@michaelzinn/babbage-s-difference-
engine-in-brainfuck-on-a-calculator)

I also did a C64 BASIC compiler in Idris for it, if you have a copy with over
800 lines of program memory you can play HAMURABI on it:
[https://forum.swissmicros.com/viewtopic.php?f=23&t=2193](https://forum.swissmicros.com/viewtopic.php?f=23&t=2193)

I strongly recommend that calculator, it's a great programming toy.

------
pflanze
I'm currently implementing a concatenative language, and have added OP's
program as an example:
[https://github.com/pflanze/copycat/blob/master/examples/hp.s...](https://github.com/pflanze/copycat/blob/master/examples/hp.scm)

This is closer to how the later HP models worked, where naming and quotations
are available (via « »).

(I happen to have had an HP-15C as well as my first calculator :)

------
s_T_e_v_o
I still have mine and the user manual sits on a shelf in my basement. I bought
mine in a private deal from a guy whose father was a distributor. Cost me $110
in 1984. It allowed me to invert a 4x4 matrix, thereby earning me an A in my
power engineering class. I programmed a sinc function to the amazement of my
linear systems instructor. And I programmed complex multiplication and
division routines. This was pretty cutting edge back in the day, long before
mathcad.

------
madengr
Reminds me to start collecting HP calculators. I have a few, but would like to
collect all of them and put them in a display case. Anything non-RPN is an
abomination.

~~~
rfdave
Are you familiar with www.hpmuseum.org? Collectors and users of HP calculators
hang out there. Hp41.org is great for the HP41

------
slowhand09
On a different note, I stumbled on my TI-Programmer LED calculator and power
supply a few days ago. I plugged it in, but no response. I guess rechargable
batteries weren't meant to last nearly 40 yrs. I am now obligated to attempt
resurrection. In case I need octal, hex, or bit operations.

------
markandrewj
I have an HP 200LX that I acquired recently. I have been using it for writing
mainly, it's pretty fun. I also have an old PCMCIA Ethernet card that I want
to use with the 200LX so I can connect to IRC (mainly for Twitch chat).

------
JorgeGT
I have one from my grandfather and one from my father. Amazing things. I
wonder what device I should leave for my future children! Maybe my Ti-83...

------
DNied
I use a magnificent HP emulator called nonpareil for almost all my RPN needs
(the rest being covered by dc and xcalc -rpn).

