Little explorations with HP calculators (no Prime)
|
03-22-2018, 02:16 AM
(This post was last modified: 03-22-2018 02:17 AM by brickviking.)
Post: #288
|
|||
|
|||
RE: Little explorations with Casio 9750/9860 calculators
(03-21-2018 10:45 AM)3298 Wrote: The 9860 series also adds a list label (basically a string) as List n[0], but I can't remember if that existed before OS 2.0 or only after. It's on my gII but not on my g+. I'm pretty sure it's mentioned in the manual for all gII versions, including the 9750. (03-21-2018 10:45 AM)3298 Wrote:(03-20-2018 11:59 PM)brickviking Wrote: ... I generally use the last List on the calculator in the last File so it's less likely to get in the way of already-created Lists.... You could do it this way, store the Last-Used count in the first position of List6, and start counting from *LastUsed. It's sort of a stack, with the warning that you'd better reset the pointer when you've finished with it and presumably flush the variables too. That functionality could go into the "Clean-up" phase, though as you rightly point out, this won't work as well for calling subroutines. Consider it a bit like malloc/free pairs. Even if you use the full stride of 28 each time, you'd still end up with over 35 calls before you ran out of space in your stack. If you get fiddly, you can sacrifice a slot each "segment" and use that to specify the size of the next segment, i.e. first one's 28, second one's ten, Listn[1] is how far to skip down for the first unused slot (LastUsed), Listn[2] is how large the first segment is before hitting another sement count. Code: All code refers to whichever Listn (List1..26) you're using for your stack.
I can then restore that many variables. Yes, there are weaknesses in this, I haven't fully got my head around the aspects of shutting down programs in mid-stream without cleaning up the stack list. (03-21-2018 10:45 AM)3298 Wrote: But let's get back on track, shall we? This is fun, though I suspect this post could have gone into another forum. (Post 193) Regards, BrickViking HP-50g |Casio fx-9750G+ |Casio fx-9750GII (SH4a) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)