WP-34S: Bug with STOS command



#2

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


#3

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

d:-)

#4

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


#5

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

#6

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.


#7

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

Franz


Possibly Related Threads...
Thread Author Replies Views Last Post
  [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 875 12-10-2013, 11:37 PM
Last Post: Les Bell
  WP-34S (Emulator Program Load/Save) Barry Mead 1 490 12-09-2013, 05:29 PM
Last Post: Marcus von Cube, Germany
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 635 12-07-2013, 07:15 PM
Last Post: CompSystems
  DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 684 12-04-2013, 11:14 AM
Last Post: Barry Mead
  HP Prime - most favorite command bluesun08 2 545 11-12-2013, 11:29 AM
Last Post: bluesun08
  hp prime - command syntax bluesun08 6 823 11-10-2013, 11:57 AM
Last Post: bluesun08
  WP 34S/43 ?'s Richard Berler 3 641 11-10-2013, 02:27 AM
Last Post: Walter B
  My FrankenCulator (wp-34s) FORTIN Pascal 4 660 11-09-2013, 06:18 PM
Last Post: FORTIN Pascal
  WP 34S Owner's Handbook Walter B 5 847 11-09-2013, 05:34 PM
Last Post: Harald
  wp 34s overlay and programming. FORTIN Pascal 6 860 11-08-2013, 01:28 PM
Last Post: Nick_S

Forum Jump: