HP 35s "Low footprint" Linear Interpolation  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: HP 35s "Low footprint" Linear Interpolation (/thread146636.html) 
HP 35s "Low footprint" Linear Interpolation  Elliott W Jackson  02082009 Hello, I went to college from '80'84, and lived and died by my HP 41CV. I wrote dozens of programs for it as I progressed through my courses. I recently picked up a new HP 35s, and decided to convert one of my oldest, mostused HP41 programs to the 35 as a learning exercise mainly. The program just does simple linear interpolation. Suppose we have a table of data such as
... Given any value X, it simply estimates Y using linear interpolation. The equation to do that is brutally simple, it is just such a frequent need that it is a great candidate for a quickie program. As a further requirement however, I decided that I wanted to make it "low footprint," i.e. such that it only used the absolute minimum of the 26 A..Z named storage registers, and relied instead on the 800 indirectaddressed unnamed storage registers for any temporary storage requirements. I'm not sure how strong a need that is, frankly, but I thought it might be, to preserve the named registers for use as variables in equations, and allow those values to remain unmolested and untrampledupon. That design decision did complicate things a bit, resulting in some muddylooking code as the program plays games with the stack, but it's not too bad. Program Name: "L" (it lived for years as "LIP" in my HP41 calculators) Named storage registers used: I Unnamed indirect addressed storage registers used: "n" through "n+3", where the value of "n" is set early in the program and can be easily changed if needed. Default = 10.
L001 LBL L As mentioned, the linear interpolation equation is trivial and straightforward and not really worthy of much discussion. The only thing possibly novel in this program is my attempt to make it "low footprint", and use the unnamed storage registers as much as possible for temporary storage needs, rather than the named A..Z registers. That decision did complicate the code a bit, as I had to manipulate I in the middle of the "real math", which complicates the listing somewhat.
Best, Re: HP 35s "Low footprint" Linear Interpolation  Cliff V  02152009 thanks for the program. step 23 is missing.
Re: HP 35s "Low footprint" Linear Interpolation  Elliott W Jackson  02152009 Oops, thanks for noticing. It's actually not missing, my line numbers are just messed up. The LN and CK numbers are correct, and the program should end on line L048.
