Post Reply 
newRPL - Wiki examples for PEEK, POKE and NEWOB commands
09-22-2021, 07:17 AM
Post: #3
RE: newRPL - Wiki examples for PEEK, POKE and NEWOB commands
(09-22-2021 12:31 AM)Claudio L. Wrote:  PEEK and POKE are low-level commands, can only be used by "certain people" with "certain knowledge". It's OK if there's no examples, they simply read or write a 32-bit word at a word-aligned ARM address. They aren't meant for the general public, but mainly to aid the developers on hardware debugging. Using "some random address" you will either cause a crash (data abort exception), or corrupt your precious data.

I'll add a big caveat in the usage section then. Wink

(09-22-2021 12:31 AM)Claudio L. Wrote:  NEWOB is exactly the same as the HP48 command NEWOB. There's one very important use for this command:
Let's say you have a list of 1000 numbers. Using GET to put one of the objects on the stack will place a pointer to the object that's *within the list* on the stack. And for as long as you keep that one number around, you'll keep the entire list eating out your memory.
You can simply use NEWOB after GET to create a stand-alone copy of the number, and the list will be gone in the next garbage collection.
It's an obscure command used by memory-intensive applications.

That's the example from the AUR that I had in mind: I wanted to document this behavior showing how the used memory can be reclaimed after NEWOB is launched, but I suppose that the 1000-items list living in the undo stack hides the effect of the command.

Is there a way to clear or disable the undo stack? If not, I'll stick with a simple description of the process.

Thanks for the insight!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL - Wiki examples for PEEK, POKE and NEWOB commands - JoJo1973 - 09-22-2021 07:17 AM



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