Post Reply 
WP 34s programming bug
10-10-2023, 01:37 AM
Post: #1
WP 34s programming bug
I found a bug that causes the WP 34s to reach an unstable state (or at least not an expected or predictable state). This was tested on the WP 34s with version 3.3 R3915, another WP 34s with crystal installed - version 3.3T R3686, and the iOS WP 34s (latest version).

The below steps were done on a WP 34s with version 3.3 R3915.

Use fresh batteries and remove from calculator. Press ON button to drain any residual power. Reinstall batteries. Screen should say "Restored"
Press P/R
001 LBL 01
002 1
003 STO+ 11
004 GTO 01
Press P/R (exit program mode)
Press R/S (start running)
Wait for 10 seconds
Press R/S again
Press <- (back arrow)
RCL 11
Press P/R
Press down arrow to go to last step (004)
Press <- (back arrow (or delete program step)) 4 times.
Press P/R (exit program mode)
Press R/S (IMPORTANT STEP)
Press P/R again (enter program mode)
Press <- (delete program step)
Press <- again

Steps remaining is now 928
Display will slightly dim
Find all posts by this user
Quote this message in a reply
10-11-2023, 07:49 AM
Post: #2
RE: WP 34s programming bug
I think I've half an idea where this problem originates from (deleting programme steps while retaining the execution stack), I doubt it will be fixed. The WP 34S is well past its use by date. The hardware isn't readily available and I'm not sure we can build new firmware images anymore.


Pauli
(the P in WP)
Find all posts by this user
Quote this message in a reply
10-11-2023, 09:22 AM
Post: #3
RE: WP 34s programming bug
(10-11-2023 07:49 AM)Paul Dale Wrote:  I think I've half an idea where this problem originates from (deleting programme steps while retaining the execution stack), I doubt it will be fixed. The WP 34S is well past its use by date. The hardware isn't readily available and I'm not sure we can build new firmware images anymore.

Pauli
(the P in WP)

The problem exists with build 3914 in the Windows app.

Following your hint, I have found that adding clrretstk() to delprog() (the "delete program step" function in storage.c) fixes the problem, at least in the Windows version. I haven't yet tried it on the hardware, but it seems likely that it will work there too.

I note that stoprog() (which adds program steps) already includes clrretstk(), so I don't expect a problem if I add this function to delprog() as well.

If this seems reasonable I'll try to upload a new build later today, or perhaps tomorrow.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
10-11-2023, 10:19 AM
Post: #4
RE: WP 34s programming bug
Thanks Nigel, that's almost certainly the required fix.
Feel free to submit the change to the source repository.

As noted, I'm not sure we can even build the firmware anymore -- that was Marcus's area.


Pauli
Find all posts by this user
Quote this message in a reply
10-12-2023, 10:29 AM
Post: #5
RE: WP 34s programming bug
I've uploaded what turns out to be release 3916 with the fix for this bug and for an alpha-scrolling bug that I discovered earlier. I've updated the emulators and the calculator .bin files for both the main WP34S code and for the WP34C (complex) branch. My laptop dates from 2012 and is still able to build the firmware!

The WP31S didn't require either of these fixes; I am no longer able to compile the V2.2 code, but probably no-one is using it.

To find the new files go to the Code tab of the WP34S Sourceforge page and then go to trunk/realbuild for the .bin files, or to trunk/windows/bin for the emulators.

I don't know how to update the files available for download through the Files tab, which are several years out of date! Never mind.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
10-12-2023, 06:42 PM
Post: #6
RE: WP 34s programming bug
Nigel, thanks for fixing this and building images.
Find all posts by this user
Quote this message in a reply
Post Reply 




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