The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Bug in WP34S?
Message #1 Posted by Namir on 5 Aug 2012, 11:55 a.m.

Hi all,

I am using WP34S emulator version 3.1, Build date June 2, 2012, Svn revision 3103. I wrote a program that compares the value of the X register in the stack with values in global registers. The tests (especially x<=? -> 22 and the like) did not return the expected logical result. Replacing indirect testing with old fashioned (HP-41C style) comparison made the program work as expected.

Has this bug been caught and corrected in subsequent builds?

Namir

      
Re: Bug in WP34S?
Message #2 Posted by Walter B on 5 Aug 2012, 5:25 p.m.,
in response to message #1 by Namir

Hi Namir,

Please be a little bit more specific: What exactly did you try which doesn't work as expected?

TIA

            
Re: Bug in WP34S?
Message #3 Posted by Namir on 5 Aug 2012, 6:01 p.m.,
in response to message #2 by Walter B

Walter,

Here is an example. The 41-style code that works is:

RCL 22
RCL 11
x<=? Y
GTO 15
...

When memory register 11 has a value less than or equal to the value in memory register 22, the program executes the GTO 15 command.

When I translated it to:

RCL 11
x<=?-> 22
GTO 15
...

It won't work. The program ignores GTO 15 and moves on to the next commands. Am I using the new test in reverse? Should it be?

RCL 22
x<=?-> 11
GTO 15
...

This "bug" appeared in several places in the program. When I translated the new stack-to-register tests to equivalent X/Y stack registers tests, the program worked.

I would like to use the new WP34S features. My hope is that the WP34S program in question can make it to the web-based HP Solve newsletter.

Namir

Edited: 5 Aug 2012, 6:10 p.m.

                  
Re: Bug in WP34S?
Message #4 Posted by Paul Dale on 5 Aug 2012, 6:14 p.m.,
in response to message #3 by Namir

I don't think you need the indirection. The code should be:

RCL 11
x[<=]? 22
GTO 15

The conditional is looking into the register already. Adding indirection takes it to a completely different register based on the contents of register 22.

- Pauli

      
Re: Bug in WP34S?
Message #5 Posted by Paul Dale on 5 Aug 2012, 6:12 p.m.,
in response to message #1 by Namir

Any chance of an example of this failure? I've tried a few simple tests and there doesn't seem to be anything wrong. Fro example:

Reg  Value
22     16
16     44
X      35

x[<=]->22 gives true.

Change X to 66 and repeat gives false.

All indirection is handled in a single place in the code, a bug here will manifest in other indirections in all likelihood. So I'd rather like to get this fixed.

- Pauli

            
Re: Bug in WP34S?
Message #6 Posted by Namir on 5 Aug 2012, 6:32 p.m.,
in response to message #5 by Paul Dale

OK, I found what I was doing wrong. After I select a test, I need to click the ENTER key and then enter the register number. I was clicking the right-pointing arrow key on the top row and then entering a register number. Bad move!

Sorry for the false alarm. I am going back to my code and edit it to correctly use this feature.

Merci!!!

Namir


[ Return to Index | Top of Index ]

Go back to the main exhibit hall