Post Reply 
WP 34s stack preservation
04-01-2015, 06:22 PM
Post: #2
RE: WP 34s stack preservation
LocR if called twice resizes the local register area. So you can allocate 8 registers first and reallocate to 4 registers if the stack size allows it. Here is what should work:

Code:
LocR 8
STOS .00
SSIZE?
LocR->X

If you need more local registers just add the amount to X before the final call to LocR. Access to the stack contents before this sequence is easy: just recall from .00 to .07. If you want to return a specific value to the caller on the stack, store it to the corresponding register before the final RCLS .00.

I must admit that I didn't test the code.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
WP 34s stack preservation - signals - 04-01-2015, 05:27 PM
RE: WP 34s stack preservation - Marcus von Cube - 04-01-2015 06:22 PM
RE: WP 34s stack preservation - signals - 04-01-2015, 06:31 PM
RE: WP 34s stack preservation - signals - 04-01-2015, 07:40 PM



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