Post Reply 
EXC/ x<>Rn for stack efficiency
06-14-2017, 06:23 PM (This post was last modified: 06-14-2017 06:24 PM by Dieter.)
Post: #15
RE: EXC/ x<>Rn for stack efficiency
(06-14-2017 03:04 PM)Matt Agajanian Wrote:  First, let me apologise for my frustration. I'm trying too hard to fit an advanced technique (67/97/34) into a basic 25/33 (forgive me) programming language.

Well, of course most of the HP67/97 and maybe also 34C programs are so complex that they simply won't fit the 25 or 33. After all it is 224 steps plus 26 registers vs. 49 steps and 8 registers... plus a less comprehensive command set. So at least a more or less direct program transfer must fail. That said, many clever programs for the 25 exist that prove what can be done even with its limited ressources.

(06-14-2017 03:04 PM)Matt Agajanian Wrote:  Second, I do appreciate your straughtforward four-to-multiple step variations. I shouldn't try so hard to make the most direct method into an elaborate one. Besides, I need to adapt to what a calculator does best by its own merits. For example, I can't expect the 25 or 33 to handle the memory register gymnastics for a Moving Averages program.

While we're at it: I just looked at the HP67/97 moving average program that came with the Standard Pac. At one point the oldest value is removed from the curent sum while the newest one is added and stored. This can be done with an EXC command, if available, but the 67/97 does it this way:

Code:
...  ...
037  RCL i
038  ST- 0
039  x<>y
040  STO i
041  ST+ 0
042  R↓
...  ...

Compare this with the suggestion in my first post. ;-)

(06-14-2017 03:04 PM)Matt Agajanian Wrote:  If I want to code for something that complex, I should use the right tool for the task, a 67/97, 34C, or later. Besides, as capable as the 65 is, a Moving Averages program, for example, requiring indirect addressing isn't that feasable.

OK. But there are other programs that can be done on the 25. I recommend looking at the HP-25 Library by Jim Davidson, a list of programs that have been published in PPC Journal between 1976 and 1978 (this index can be found in PPC V5 P6). I think it was Gene who posted the whole package as a PDF about half a year ago.

But... I am still waiting for an SR56 program with the infamous EXC instruction that is waiting for a translation to HP25/33 code. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: EXC/ x<>Rn for stack efficiency - Dieter - 06-14-2017 06:23 PM



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