Post Reply 
Programming Exercise (HP-15C, 15C LE - and others)
03-28-2014, 03:18 AM
Post: #42
RE: Programming Exercise (HP-15C, 15C LE - and others)
I implemented the two term version of this on my "HP55".
Here is the code (sorry its not in location/keycode form but you get the idea):
Code:

  1 -
  STO 0
  0
  STO 1
08:  X<>Y
  ENTER
  ENTER
  *
  +
  1/x
  STO + 1
  2
  STO - 0
  RCL 0
  0
  X<=Y 0 8
  RCL 1
  GTO 0 0
R0 holds the current iteration and R1 is the series sum.

For N=100, it took about 82sec to finish. Based on this it would take about 2.25hours for N=10000.

Notice that I used double quotes around "HP55", that's because I don't own a real HP55 calculator (I only own a HP32SII, HP48SX, HP48GX, and HP50G). What to do if you don't own a classic HP? Use an emulator? -- Boring!! You build your own classic HP calculator, of course. For a learning experience (and for fun), I implemented a classic HP "core" in a Xilinx FPGA (designed in VHDL). I build this from scratch based on info I gleamed from the web (including the HP Museum). It can run ROMs for a HP35, HP45 and HP55.

My "HP55" runs at two speeds:
  1. real mode -- matches the original HP55's 3500 instructions per second. The HP55 timer runs accurately in this mode.
  2. turbo mode -- no throttling of instruction execution rate.

In turbo mode, with N=10000, my "HP55" completes this task in just under 5 seconds! I think, even if its not the fastest time posted, that's a record for classic HP hardware. Smile

Brian

(If anyone wants more info on the FPGA Classic HP Core I designed, let me know and I'll try to write something up for a thread in the "Not quite HP Calculators - but related" forum.)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming Exercise (HP-15C, 15C LE - and others) - bkn42 - 03-28-2014 03:18 AM



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