Post Reply 
General info on 48/49/50 ROM entry points
12-30-2017, 04:52 PM
Post: #8
RE: General info on 48/49/50 ROM entry points
(12-30-2017 11:51 AM)grsbanks Wrote:  Both UserRPL and SysRPL operate on the stack. The big advantage of ASM over them is that you can avoid using the stack altogether except to pass parameters to your ASM routine and to return results, and therefore save time. Surely there must be an entry point somewhere for each of the basic mathematical operations that operates on data in the registers, right?

One document that I often refer to for Saturn coding information on the 50g is this one. While by no means complete, it does provide many useful entries that can at least give you a starting point for experimentation. In particular, note sections 8.4 (Long Reals) and 8.10 (Popping and Pushing).

Keep in mind that most internal numerical functions (as opposed to symbolic) are written for extended reals instead of standard reals. Several of the SysRPL standard-precision real functions that I've traced begin by first converting the arguments to extended form so that the extended real functions can then be called for them. Intermediate results are then converted back to standard reals at the end of processing. I suspect that most work that same way.

There are undoubtedly internal routines to perform basic math functions with register-based extended reals (each extended real requires two registers). I'd bet that most of those routines are unsupported, though. Using Nosy (or similar apps) allows you to step through the built-in code to find some of these gems, but using them always comes with the risk of making your code specific to the firmware version you currently have installed.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: General info on 48/49/50 ROM entry points - DavidM - 12-30-2017 04:52 PM



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