Help with X and Y register!!


I have a serious problem of comprehension on how does the stack work on my 41 ( same with a 32s ). I only used a 48 before... Let me explain:

Assume the 4 levels stack are empty. ( I type zero folowed byt four ENTER for that)

If I type

The result is 25, but if I type
The machine show me ZERO!!

And if I do the follow sequences:

The result is 25 but if I type
The machine show me ( the expected) 50!

In the first exemple I don't understand why the value 50 disapear!! For me it's like if the ENTER key doesn't do is job and dont copy X in the Y register.

Can you explain me that please ??

Thanks, Denis.

P.S I experiment the same problem with RDN instead of X<>Y


Hi, Denis;

please, let me clear a few points out:

Assume the 4 levels stack are empty.
Keep in mind that the 'empty stack' means one thing in RPL-based calculators (e.g.: HP48) and that all stack registers in the HP41 (X, Y, Z and T; consider also the LASTx) exist all times, even when the calculator is turnned off, and that they may contain any valid data (a number, even if zero, an ALPHA set with up to six characters, and some other 'transcendental' contents...).
If I type 50 ENTER 2 / (...) The result is 25, but if I type X<>Y The machine show me ZERO!!
Very true! Follow the stack diagram below: (first column under X is what you see)
Key        X     Y    Z     T
a b c d (if so, consider a=b=c=d=0.00)
50 50 a b c (d is lost)
ENTER 50 50 a b (C is lost; stack lift DISABLE)
2 2 50 a b (50 is overwriten)
÷ 25 a b b (stack contents DROP)

Yes, this is quite unusual for those acquainted to RPL-only. The remarks are:

keep in mind that the stack is composed by exisitng, fixed registers;

ENTER disables stack lift for next entry, so the copy left in X after ENTER is overwriten.

Follow this example, please: (observe that Rv is meant to be the roll-down key, R with an arrow pointed down)

Key        X     Y    Z     T
4 4 a b c
ENTER 4 4 a b
3 3 4 a b
ENTER 3 3 4 a
50 50 3 4 a
ENTER 50 50 3 4
2 2 50 3 4
÷ 25 3 4 4
x<>y 3 25 4 4
Rv 25 4 4 3
Rv 4 4 3 25
Rv 4 3 25 4
Rv 3 25 4 4
x<>y 25 3 4 4
x<>y 3 25 4 4
Hope this helps.

Luiz (Brazil)

Edited: 21 Mar 2005, 8:27 a.m.


Hi, Denis;

I thought it would be a good idea to post a new message instead of editing the previous one. The issue here is that if you decide to check what happens after ENTER key is pressed, the stack lift becomes enable again. Please, follow this:)

Key        X     Y    Z     T
4 4 a b c
ENTER 4 4 a b
x<>y 4 4 a b
x<>y 4 4 a b

This is because x<>y (among with almost all other functions in the HP41 'repertoire') cause the automatic stack lift to be enable. Now, please, try this::)

Key        X     Y    Z     T
4 4 a b c
ENTER 4 4 a b
3 3 4 a b
x<>y 4 3 a b
x<>y 3 4 a b

Maybe now you can see a bit more...


Luiz (Brazil)


Reading your response "enlightened" me more than an entire book on the matter!
Thanks Luiz!



It may help to read this primer on RPN


Many thanks!!!

Your example is clear, and I have to "think" differently.
Thanks Luiz!! It's time to you to write a book :)

But first I'm going to learn a little more, so I don't forget to thanks Mike for the link. Thanks Mike!!

- Denis.


Hi, Denis;

In fact, I once wrote a book...

The English translation for the title would be 'From the HP41 to the HP48'. It was written in 1995, published only in Portuguese. At that time, I was not aware of, say, 10% of what I am aware of today about how are HP calculators seen and used in the world. Have I met some guys earlier, I'd be where I am today (regarding HP calculators) at least ten years ago. I have all information contained on it yet in my computer, and I am going to find some time to prepare an English version and allow Dave to put it in the CD pack.

Best regards.


Luiz (Brazil)

Edited: 21 Mar 2005, 10:45 a.m.


LOL, very funny :)

But in my case it will be more efficient to read:
"Da HP48 para a HP41" !!!!



Hey, Denis;

Je vous comprends, mon ami. Mais je vous dis que le livre est réel (vrai)! It was actualy writen (1994, Sept. to Dec.) and printed in Brazil in 1995. The image you see is the scanned image of the actual front cover. (Maybe I did not understand the LOL...) You can see that I mentioned it in my brief biography here, at the MoHPC.

Best regards.

Luiz (Brazil)

Edited: 21 Mar 2005, 5:42 p.m.


Hi Luiz,

No doubt for me about you book. What I have found funny was the fact that I wrote somethink like "time to you to write a book", and I doesn't know, at this moment, that the book already exist!! :)

We are many who want to write a book, but only a few of us do that (for many reason, mainly due to lack of time). However I think that is the most beautiful manner to share knowledge...

Congratulation Luiz!



Hi, Denis; thanks for your post, I appreciate.

And please, forgive me. I actually thought that you thought the book was not real... I didn't notice you found the coincidence itself funny. Shame on me... <8-(

BTW, thanks to Gene Wright, I worked on another book related to HP calculators: The HP12C Platinum Solutions Handbook. I, Gene and Tony Hutchins worked straight ahead on it. It took a big chunk of my vacation time and I have no regrets at all...

I agree with you when you say that many people could write books. and the feeling of conluding the first one is hard to describe...


Luiz (Brazil)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Little curiosity: why the fourth stack register is called "T"? Antlab 34 6,164 07-03-2013, 04:49 PM
Last Post: Walter B
  [WP34S] Register use by functions. Chris Tvergard 5 1,617 05-12-2012, 03:35 AM
Last Post: Walter B
  HP-34C Storage Register Arithmetic & Programming Matt Agajanian 14 2,919 05-08-2012, 11:04 AM
Last Post: Matt Agajanian
  Sleek approach to Register Exchange on HP-29C Matt Agajanian 8 2,162 03-16-2012, 01:04 PM
Last Post: Marcus von Cube, Germany
  Vintage HP15C Key Clicks but Doesn't Register Bruce Zastera 15 3,147 01-27-2012, 06:18 PM
Last Post: uhmgawa
  How to register new HP 15C LE? hpnut 8 1,917 11-18-2011, 01:09 PM
Last Post: Martin Pinckney
  Unable to register the 15c LE Neil Carlson 3 1,091 09-29-2011, 08:27 PM
Last Post: CAD_Jockey
  hp 41 register swap Sok-khieng Chum Hun 3 1,117 06-30-2010, 08:14 PM
Last Post: Thomas Klemm
  Repair of Woodstock keyboard register problems Kees van der Sanden 0 675 04-30-2010, 03:41 AM
Last Post: Kees van der Sanden
  MCODE: The significance of a "3" in nybble 3 in register "b" Geir Isene 4 1,091 01-22-2008, 06:43 AM
Last Post: JoseL

Forum Jump: