wp34s - Maybe dumb question


I am writing a program for the 34s, and registers I, J and K store Matrix descriptors.
Within the program I call the vector routine V.V, which then overwrites I & J and the stack, as explained.
So, prior to calling the vector routine, I do a SAVE and later a RCF.RG to restore registers (I, J & K)and stack.
The problem is I need the result from V.V on the stack but the RCF.RG overwrites this, and I can't seem to find a solution to retrieve this value.
Is there a possible way which I am overlooking. Any comments will be appreciated.
Thanks John


Don't don't don't don't don't call SAVE from a program that is frequently executed. You will destroy the flash in the device :-( Flash has a limited number of write cycles and one is used each time SAVE is executed.

That said, RCF can be used to recall the individual registers you want. Better would be to not use I & J in your code.

Even beter would be to take the V.V routine and remove the stores to I and J:

001 ***LBL'V.V'
002 [cmplx]R[v]
003 RCL[times] T
004 R[^]
005 RCL[times] T
006 +
007 R[^]
008 ENTER[^]
009 RCL[times] T
010 RCL+ Z
011 STO Z
012 DROP
013 STO L
014 DROP
015 RTN

- Pauli

Edited: 2 Nov 2011, 6:19 a.m.


Arrrgh... Thanks Pauli, sometimes one can't see the wood for the trees.
I never even thought about removing the stores to I & J - Thanks. Also never gave the multiple writing to flash a thought(that's dumb..)
Something I haven't got figured out yet, - is RCF used to call registers in flash after a save or is there another use?
Thanks again Pauli


RCF and the arithmetic versions allow you to directly access the saved registers in the backup flash region. No other use.

- Pauli


If we run out of space we may even get rid of those. I'm working on a scheme that allows to have more data in RAM and it should then be easy to just copy the backup registers over to temporary storage for easy access.


Thanks Marcus, that would be really useful.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple? programming question [WP34S] Shawn Gibson 3 1,447 03-15-2013, 11:56 AM
Last Post: Didier Lachieze
  [wp34s] xtal question jerome ibanes 9 2,911 02-05-2013, 05:35 PM
Last Post: Massimo Gnerucci (Italy)
  [WP34S] WP34S firmware on the AT91SAM7L-STK dev kit? jerome ibanes 1 1,200 10-04-2012, 04:59 PM
Last Post: Paul Dale
  more question regarding complex operations using complex number on wp34s wildpig 22 5,313 09-02-2012, 12:54 PM
Last Post: Walter B
  WP34S solver question Reth 22 6,088 07-13-2012, 06:55 PM
Last Post: Paul Dale
  WP34s Flash Question rgray 18 5,627 06-19-2012, 03:20 AM
Last Post: Cristian Arezzini
  Another stupid WP34S question Geoff Quickfall 2 1,358 06-16-2012, 11:21 PM
Last Post: Geoff Quickfall
  WP34S beginner question Geoff Quickfall 8 2,474 06-08-2012, 09:55 PM
Last Post: geoff quickfall
  [WP34s] Assembler question fhub 6 2,161 05-14-2012, 03:08 PM
Last Post: Marcus von Cube, Germany
  WP34S program question Mike Maiorana 12 3,198 04-05-2012, 03:09 AM
Last Post: Steve Simpkin

Forum Jump: