Post Reply 
WP-34s Emulator v3.2
01-02-2014, 11:59 AM
Post: #1
WP-34s Emulator v3.2
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
Find all posts by this user
Quote this message in a reply
01-02-2014, 12:10 PM
Post: #2
RE: WP-34s Emulator v3.2
3 ENTER 2 +

The second ENTER is causing your problem.


- Pauli
Find all posts by this user
Quote this message in a reply
01-02-2014, 12:14 PM
Post: #3
RE: WP-34s Emulator v3.2
So my RPN skills were a bit confused. Thanks!!!
Find all posts by this user
Quote this message in a reply
01-02-2014, 06:10 PM
Post: #4
RE: WP-34s Emulator v3.2
(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

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-02-2014, 09:45 PM (This post was last modified: 01-02-2014 09:46 PM by Thomas Klemm.)
Post: #5
RE: WP-34s Emulator v3.2
(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
Find all posts by this user
Quote this message in a reply
01-02-2014, 11:54 PM (This post was last modified: 01-02-2014 11:56 PM by Massimo Gnerucci.)
Post: #6
RE: WP-34s Emulator v3.2
(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.

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-03-2014, 06:03 AM
Post: #7
RE: WP-34s Emulator v3.2
Nope, the second ENTER is optional on RPL machines. RPL isn't as bad as you make out Smile


Pauli
Find all posts by this user
Quote this message in a reply
01-03-2014, 12:06 PM (This post was last modified: 01-03-2014 06:34 PM by Marcus von Cube.)
Post: #8
RE: WP-34s Emulator v3.2
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.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-03-2014, 02:09 PM
Post: #9
RE: WP-34s Emulator v3.2
(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
Find all posts by this user
Quote this message in a reply
01-03-2014, 06:02 PM (This post was last modified: 01-03-2014 07:39 PM by Massimo Gnerucci.)
Post: #10
RE: WP-34s Emulator v3.2
(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?

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-03-2014, 06:38 PM
Post: #11
RE: WP-34s Emulator v3.2
(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.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-04-2014, 12:04 AM (This post was last modified: 01-04-2014 05:57 AM by Thomas Klemm.)
Post: #12
RE: WP-34s Emulator v3.2
(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.
Find all posts by this user
Quote this message in a reply
01-04-2014, 12:05 AM
Post: #13
RE: WP-34s Emulator v3.2
(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
Find all posts by this user
Quote this message in a reply
01-04-2014, 12:27 AM
Post: #14
RE: WP-34s Emulator v3.2
(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
Find all posts by this user
Quote this message in a reply
01-04-2014, 01:20 AM
Post: #15
RE: WP-34s Emulator v3.2
(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

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-04-2014, 01:22 AM
Post: #16
RE: WP-34s Emulator v3.2
(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!

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
01-04-2014, 07:53 PM (This post was last modified: 01-04-2014 07:54 PM by Marcus von Cube.)
Post: #17
RE: WP-34s Emulator v3.2
(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^.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-04-2014, 10:04 PM
Post: #18
RE: WP-34s Emulator v3.2
(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.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)