Sleek approach to Register Exchange on HP-29C
#1

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.

#2

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

...

#3

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

#4

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.

#5

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.

#6

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...

#7

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.

#8

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.

#9

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.



Possibly Related Threads…
Thread Author Replies Views Last Post
  Little curiosity: why the fourth stack register is called "T"? Antlab 34 8,892 07-03-2013, 04:49 PM
Last Post: Walter B
  WP-34s data exchange with PC over IR Marcel Samek 3 1,566 02-26-2013, 11:53 PM
Last Post: Marcel Samek
  HP-29c keyboard dead 2nd row problem Xavier A. (Brazil) 6 2,376 07-17-2012, 07:09 AM
Last Post: Xavier A. (Brazil)
  HP-29C Counterparts Matt Agajanian 2 1,293 05-12-2012, 06:44 PM
Last Post: Matt Agajanian
  [WP34S] Register use by functions. Chris Tvergard 5 2,099 05-12-2012, 03:35 AM
Last Post: Walter B
  HP-34C Storage Register Arithmetic & Programming Matt Agajanian 14 4,352 05-08-2012, 11:04 AM
Last Post: Matt Agajanian
  My 29C's even more bizarre behaviour Matt Agajanian 5 1,999 04-25-2012, 05:46 PM
Last Post: Matt Agajanian
  29C/25C question. Matt Agajanian 7 2,367 04-03-2012, 12:03 AM
Last Post: Matt Agajanian
  My very schizophrenic 29C Matt Agajanian 9 2,880 04-02-2012, 05:12 PM
Last Post: Matt Agajanian
  Help!! My 29C may need a doctor. Matt Agajanian 5 2,060 03-31-2012, 04:23 AM
Last Post: Ignazio Cara (Italy)

Forum Jump: