Sleek approach to Register Exchange on HP-29C « Next Oldest | Next Newest »

 ▼ Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 03-15-2012, 06:37 PM 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. ▼ Jeff O. Posting Freak Posts: 875 Threads: 37 Joined: Jul 2005 03-16-2012, 08:42 AM 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 ``` ... ▼ Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 03-16-2012, 11:43 AM 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 ▼ Jeff O. Posting Freak Posts: 875 Threads: 37 Joined: Jul 2005 03-16-2012, 12:26 PM 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. ▼ Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 03-16-2012, 12:39 PM 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. ▼ Peter Murphy (Livermore) Member Posts: 167 Threads: 33 Joined: Jul 2011 03-16-2012, 02:21 PM Googling on {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. ▼ Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 03-16-2012, 03:55 PM 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:Edited: 16 Mar 2012, 4:02 p.m. Matt Agajanian Posting Freak Posts: 980 Threads: 239 Joined: Aug 2006 03-16-2012, 04:16 PM 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. Marcus von Cube, Germany Posting Freak Posts: 3,283 Threads: 104 Joined: Jul 2005 03-16-2012, 01:04 PM 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...

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

Forum Jump: