HP Forums

Full Version: wp34s - Maybe dumb question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.
John