(35S) Save/Recall Stack
|
05-17-2017, 05:16 AM
(This post was last modified: 06-15-2017 01:16 PM by Gene.)
Post: #1
|
|||
|
|||
(35S) Save/Recall Stack
These programs save and recall the stack on the 35s. This has already been tackled by MarkHaysHarris777, but I think I have made a few improvements. These programs store the stack relative to the current value of I, rather than at a fixed location. This allows the user to save several stacks and recall them in sequence. In addition, no variables are clobbered except I and J. A downside to this approach is that it is non-trivial to exchange two stacks, as this is a fundamentally stack-based approach (with regard to indirect variable usage).
Simply execute LBL S to save the current stack (non-destructive), and LBL R to recall it. The user can even pop individual values off the stack by entering 0 [DSE] I [x<>] (I), though they must be careful to ensure I is a multiple of 4 before restoring another stack. Code: S001 LBL S Code: R001 LBL R |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)