HP Forums

Full Version: WP-34s Emulator v3.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there. I used the Emulator for the first time today. Win 7 32bit. Version 3.2

I have used RPN Calcs before. Most basic input 3 ENTER; 2 ENTER; +

The problem is that it sets Regsiters X and Y to the Number I entered before the ENTER, meaning that I get 4 as a result of the example above.

looking like that, before I hit +

x: 2
y: 2
z: 3

help appreciated, I am sure there is a setting for that, right?

Regards
3 ENTER 2 +

The second ENTER is causing your problem.


- Pauli
So my RPN skills were a bit confused. Thanks!!!
(01-02-2014 11:59 AM)Bernhard Wrote: [ -> ]I have used RPN Calcs before. Most basic input 3 ENTER; 2 ENTER; +

Well, maybe you were used to RPL calcs... Wink
(01-02-2014 06:10 PM)Massimo Gnerucci Wrote: [ -> ]
(01-02-2014 11:59 AM)Bernhard Wrote: [ -> ]I have used RPN Calcs before. Most basic input 3 ENTER; 2 ENTER; +
Well, maybe you were used to RPL calcs... Wink
(12-18-2013 09:32 PM)eri Wrote: [ -> ]I'm finding it tough to break the habit of hitting enter after each entry.
I'd never use that 2nd ENTER. It's like adding parentheses where they can be omitted. Never had a problem with that on the HP-48 but I was used to the HP-41. So maybe the transition into this direction is easier?

What I don't understand is the use of RPN vs. RPL. Both HP-41 and HP-48 use RPN. It's a notation. Thus both are RPN calculators.
RPL is a language. You can compare that to FOCAL if you want.

Cheers
Thomas
(01-02-2014 09:45 PM)Thomas Klemm Wrote: [ -> ]I'd never use that 2nd ENTER. It's like adding parentheses where they can be omitted.

Neither would I

(01-02-2014 09:45 PM)Thomas Klemm Wrote: [ -> ]Never had a problem with that on the HP-48 but I was used to the HP-41. So maybe the transition into this direction is easier?

What I don't understand is the use of RPN vs. RPL. Both HP-41 and HP-48 use RPN. It's a notation. Thus both are RPN calculators.
RPL is a language. You can compare that to FOCAL if you want.

Cheers
Thomas

On a 28/48/49/50 you can input 3 ENTER 2 ENTER + and have 5 for an answer. Unlike on RPN machines where you have no input line and work on register X directly and the second ENTER copies X in Y.
Nope, the second ENTER is optional on RPL machines. RPL isn't as bad as you make out Smile


Pauli
I'm speaking of RPN and RPL both as languages here... Smile

In an RPL program, ENTER does not appear as a command as in classic RPN. If you press ENTER on an empty entry line, you'll get DUP. It's just a shortcut.

If you put in 1 ENTER 2 ENTER + on an RPL machine the code executed is 1 2 +. ENTER just terminates the digit entry.

The same input on the 34S (or a 35) yields 1 ENTER^ 2 +. ENTER^ is in fact the same as the DUP command in RPL. The equivalent of separating the two numbers 1 and 2 by a space in RPL is ENTER^ in RPN.

In RPN, 10 ENTER^ * yields 100 (10^2). This makes some functions, such as x^2, expendable as keyboard functions for most manual calculations on the classic machines. To achieve the same in RPL, 10 DUP * is the correct way to go. This can be entered as 10 ENTER ENTER + in direct mode. In a program, you'll need the explicit stack manipulation command DUP.
(01-03-2014 12:06 PM)Marcus von Cube Wrote: [ -> ]In RPN, 10 ENTER^ * yields 100 (10^2). This makes some functions, such as x^2, expendable as keyboard functions for most manual calculations on the classic machines. To achieve the same in RPL, 10 DUP + is the correct way to go. This can be entered as 10 ENTER ENTER + in direct mode. In a program, you'll need the explicit stack manipulation command DUP.
Why +? Typo?

The equivalent of DUP in a FOCAL program is RCL X. But that takes 2 bytes and isn't available on all machines. So you use ENTER and hope the next command enables the stack lift. Otherwise a RCL 00 following directly the ENTER will just overwrite X instead of inserting the value.
In this situation I often used some command like CLA that was needed somewhere else but didn't make much sense at that specific line:

ENTER
CLA
RCL 00


This little hack makes it difficult to understand and maintain the code later. I often would have preferred to just use:

DUP
RCL 00


A similar thing is with CLX. In a program you generally don't want to disable the stack lift. I see that as the biggest drawbacks of ENTER in FOCAL programs.

Cheers
Thomas
(01-03-2014 02:09 PM)Thomas Klemm Wrote: [ -> ]The equivalent of DUP in a FOCAL program is RCL X. But that takes 2 bytes and isn't available on all machines.

Sorry? FOCAL (as long as HP calculators are concerned) stands for Forty-One CAlculator Language. We can count in the 42s as well...

How's that RCL X isn't available on all (41C-CV-CX,42) machines?
(01-03-2014 02:09 PM)Thomas Klemm Wrote: [ -> ]Why +? Typo?
Typo! Corrected.

RCL X isn't exacly the same as ENTER^ because RPN has the concept of stack lift enable/disable which is alien to RPL. ENTER^ leaves stack lift disabled which makes it work as DUP in all cases except when followed by a number. RPN is not always easier then RPL.
(01-03-2014 06:38 PM)Marcus von Cube Wrote: [ -> ]ENTER^ leaves stack lift disabled which makes it work as DUP in all cases except when followed by a number.
The same happens with RCL nn and LASTX.
(01-03-2014 06:02 PM)Massimo Gnerucci Wrote: [ -> ]How's that RCL X isn't available on all (41C-CV-CX,42) machines?

It is: [RCL] [.] [X] on 41, [RCL] [.] [ST X] on 42
(01-03-2014 06:02 PM)Massimo Gnerucci Wrote: [ -> ]How's that RCL X isn't available on all (41C-CV-CX,42) machines?
I consider the operations available in the HP-11C or HP-15C a subset of FOCAL. That isn't correct in all cases. The HP-41 doesn't provide RCL-arithmetic while the HP-15C or the HP-42S does. Nevertheless most of the programs can be translated without much effort from one model to another. Exceptions are RCL/STO stack-operations wich are missing in the voyagers.
The best I come up with for an equivalent of DUP that works on all models is:

ENTER
X<>Y


Cheers
Thomas
(01-04-2014 12:05 AM)Didier Lachieze Wrote: [ -> ]
(01-03-2014 06:02 PM)Massimo Gnerucci Wrote: [ -> ]How's that RCL X isn't available on all (41C-CV-CX,42) machines?

It is: [RCL] [.] [X] on 41, [RCL] [.] [ST X] on 42

Didier, I know it is, that was the point...
Just a rhetorical question. Smile
(01-04-2014 12:27 AM)Thomas Klemm Wrote: [ -> ]
(01-03-2014 06:02 PM)Massimo Gnerucci Wrote: [ -> ]How's that RCL X isn't available on all (41C-CV-CX,42) machines?
I consider the operations available in the HP-11C or HP-15C a subset of FOCAL. That isn't correct in all cases.

Ok but, in my opinion, FOCAL should be confined to the 41 (and 42) series.

Ciao Thomas!
(01-04-2014 12:04 AM)Thomas Klemm Wrote: [ -> ]
(01-03-2014 06:38 PM)Marcus von Cube Wrote: [ -> ]ENTER^ leaves stack lift disabled which makes it work as DUP in all cases except when followed by a number.
The same happens with RCL nn and LASTX.
Are you sure? RCL (and LastX) should leave stack lift enabled, not disabled. That's exactly the difference between RCL X and ENTER^.
(01-04-2014 07:53 PM)Marcus von Cube Wrote: [ -> ]
(01-04-2014 12:04 AM)Thomas Klemm Wrote: [ -> ]The same happens with RCL nn and LASTX.
Are you sure? RCL (and LastX) should leave stack lift enabled, not disabled. That's exactly the difference between RCL X and ENTER^.
Sorry, I meant that the same happens when ENTER is followed by RCL nn or LASTX.
So you can add these two to the list of exceptions.
Reference URL's