▼
Posts: 980
Threads: 239
Joined: Aug 2006
Hello there.
I'm looking to port over my SR-56, TI-58C programs to my 29C. One of the memory functions which is missing on the 29C is the register exchange.
Has anyone come up with a sequence which is efficient and doesn't disrupt the stack too much? If a method loses the T register and leaves the exchanged register's old value in the X register, I don't mind. But, if I can retain the stack with the T register undisturbed and the exchanged register's old value in the X register, that's even better.
Edited: 15 Mar 2012, 11:08 p.m.
▼
Posts: 875
Threads: 37
Joined: Jul 2005
I assume you have already developed the following (or similar) un-sleek and inefficient approaches:
Without Preserving t, does preserve Last x:
RCL n
x<>y
STO n
Rv (Roll down)
Preserves t, loses Last x:
Rv
Rv
Rv
ABS (or INT, or FRAC)
CLx
RCL n
x<>y
STO n
CLx
LAST x
Rv
Preserves t and Last x: (requires use of register 0 or other for temporary storage of t)
Rv
Rv
Rv
STO 0
CLx
RCL n
x<>y
STO n
CLx
RCL 0
Rv
...
▼
Posts: 980
Threads: 239
Joined: Aug 2006
Thanks indeed!
I didn't think of your 4-step approach but, on my own, I did ironically come up with the 5-step approach found in the HP-35A's Math Applications book (although I lose the T-register):
RCL N
X<>Y
STO N
CLx
+
BUT, you got me there! Your first algorithm proves to be the winner even if I need to lose T. Even though, in both yours & my approaches, further down the line, provided I don't lose the Z register, the Z register (which is the last T register value) gets pushed back up to T anyway. So, with that in mind, the next pop will save T and copy to Z. Thus, the net effect will be as if I didn't lose T in the first place.
If I can streamline my SR-56/TI-58C progs enough for the 29C, I'd be willing to use your version that preserves both the T and LASTx registers.
Edited: 16 Mar 2012, 12:27 p.m. after one or more responses were posted
▼
Posts: 875
Threads: 37
Joined: Jul 2005
Glad they were of some help.
I started thinking about this a bit last night after I read your post. I used to have 29C, which I used for about 3 years from 1979 to 1982. Then I lost track of it before I came to realize that I'd like to collect. In any case, going from memory of how the 29C worked, my first ideas for saving stack-t involved using Roll-up. Surely the 29C had Roll-up, right? Wrong, so three Roll-downs are needed instead. Darn.
▼
Posts: 980
Threads: 239
Joined: Aug 2006
I have an old book from (of all places) TK Enterprises, entitled "Everything You've Always Wanted to Know About RPN (But Were Afraid to Pursue)" and from there I got the idea for the R^. But, I dumped the R^ idea because I was looking to shorten keystrokes. After that, I just jumbled around to come up with the least amount of keystrokes for the exchange and the pop to use a zero value, although I'd lose Last X. But, even as I was thinking about saving the T register, I realised my approach would lose the T registed. But, ironically, the 'CLx +' pop preserves T as the RCL n op pushes Z to T anyway (presuming Z still has the last value of T). So, all I really lost was Last X in my version. But, you did help in all ways, including reducing my method to four strokes in the first method.
Edited: 16 Mar 2012, 12:45 p.m.
▼
Posts: 167
Threads: 33
Joined: Jul 2011
Googling on <Everything you've ' know about RPN> {sic} yields a link to a PDF of that old book (Copyright 1976), which is aimed (according to its cover) at the Corvus 500, the APS 55, the Omron 12-SR, and others. "HP" does not appear anywhere in the book, which runs to 113 pages plus index.
▼
Posts: 980
Threads: 239
Joined: Aug 2006
I entered that into Google AND, in addition, I saw the following listing "The Joys of RPN." no, not an April Fools' Joke (check your calendar). I watched some of the video. Pretty nifty stuff.
Here's the link:
The Joys of RPN
Edited: 16 Mar 2012, 4:02 p.m.
Posts: 980
Threads: 239
Joined: Aug 2006
Hey there! Thanks for the tip on that 'Everything You've Always Wanted to Know...' book as a PDF. That will come in very handy.
Now if I could just find either a PDF or physical copy of "Tips & Programs for the HP-32S".
Any ideas?
Edited: 16 Mar 2012, 4:18 p.m.
Posts: 3,283
Threads: 104
Joined: Jul 2005
Can you publish your old programs? If they are on the original programming sheets, a scan to PDF would be perfect.
My first programmable was the SR-56, so you know why I'm interested...
|