HP Forums
WP-34S: Bug with STOS command - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: WP-34S: Bug with STOS command (/thread-246084.html)



WP-34S: Bug with STOS command - Marcel Samek - 07-06-2013

I have a stack size of 8. I create a function and allocate 8 local registers in it. When I do a STOS to those local registers, the function will not return. For example the following code does not work. It goes into an infinite loop in BBB. If I change the LocR from 8 to 9 then everything works OK.

LBL'AAA'
SSIZE8
XEQ'BBB'
4
STO 00
RTN
END

LBL'BBB'
LocR 008
STOS .00
RTN
END




Re: WP-34S: Bug with STOS command - Walter B - 07-06-2013

Looks like a bug. Thanks for reporting. We'll look into it.

d:-)


Re: WP-34S: Bug with STOS command - fhub - 07-07-2013

Yes, the same bug for SSIZE4 and LocR 004.

It seems that the STOS command destroys the program stack pointer if the number of local registers equals the stacksize.

Single-stepping through the program shows that the RTN command in the 'BBB' subroutine resets the program stack pointer to zero (BEG in the display), so the program 'AAA' restarts again.

Franz


Re: WP-34S: Bug with STOS command - Marcus von Cube, Germany - 07-07-2013

Thanks for the analysis so far. I'll check it out. Since this happens in the emulator too it should be easy to debug.


Re: WP-34S: Bug with STOS command - Marcus von Cube, Germany - 07-07-2013

The issue should be fixed now. It was a single vs double precision bug in STOS and RCLS. It was not specifically related to local registers.


Re: WP-34S: Bug with STOS command - fhub - 07-07-2013

Yes, it's working again - thanks for the quick fix!

Franz