Post Reply 
Which calculators run RPL under the hood?
12-16-2019, 05:42 PM
Post: #28
RE: Which calculators run RPL under the hood?
(12-16-2019 03:54 PM)David Hayden Wrote:  It seems to me that adding a new object to RPL goes beyond creating a prolog. You also need hooks for:
  • Computing the object size

This is automatically taken care of in the solution I provided. The library in port 0 would have each object prolog prefixed by the direct execution code and =SKIPOB code for that object. =xSIZE calls =OSIZE which in turn calls =SKIPOB on the object, which then calls the object under consideration's custom skip code Smile

Quote:
  • compiling an object from text

  • This involves modifying palparse, the master parser for the HP48. Unfortunately, I forget if palparse can be tweaked by overriding any libraries :/

    Quote:
  • decompiling an object to text

  • The same goes for the de-compiler.

    Quote:You also need a way to compare objects, and you may want to apply arithmetic operations (and other mathematical operations) to it, or convert it to an existing type so it can apply arithmetic.

    Well, unfortunately, the type dispatching code on the HP48 series can't be overridden unless one takes "extreme" measures Tongue You'd either need one ( or, preferably, two ) RAM cards, or, you could de-solder the HP48 ROM chip and add a NAND flash chip, but, you'd probably have to use a tiny daughterboard, which would be tricky Smile

    I'll have to look at some of my old notes and/or do a little disassembly to fully answer your questions about parsing and object to string conversion.

    ...

    Well, I went ahead and did some digging and on the HP48 at least, and, most of what constitutes palparse can be overridden by a custom library, and the same goes for the object to string de-compiler Smile

    I would imagine that the custom objects, created as I've described them, would only be used within the confines of, say, a secondary and would not be stored -- the more general solution is harder.

    Regards,

    Jonathan

    Aeternitas modo est. Longa non est, paene nil.
    Find all posts by this user
    Quote this message in a reply
    Post Reply 


    Messages In This Thread
    RE: Which calculators run RPL under the hood? - Jonathan Busby - 12-16-2019 05:42 PM



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