hp 50G SysRPL linked arrays
|
08-08-2018, 01:55 AM
Post: #2
|
|||
|
|||
RE: hp 50G SysRPL linked arrays
(08-07-2018 01:32 PM)Podalirius Wrote: Hi, I am investigating in some "Hi-End" features of System RPL. I'm not aware of any books describing the use of LNKARRYs, but you can find a few small bits of information in archived usenet posts from comp.sys.hp48. The only semi-official documentation I've ever run across is the listing of the data structure in James Donnelly's "An Introduction to HP 48 System RPL and Assembly Language Programming". I believe that same structure is probably documented in a couple of other places as well. Despite searching for it, I've never run across any formal documentation pertaining to the use of these arrays. Theoretically, they should allow faster access to specific elements for some arrays, though I've never seen any conclusive comparisons made. I would expect the biggest performance differences to occur with very large arrays and/or specially-formatted arrays created for specific purposes. Arrays of strings would probably benefit more than arrays of objects with coherent sizes, since locating the start of the string object with the included pointers should be much easier than the sequential skipping that would otherwise be required. SysRPL compilers provide limited support for creating simple LNKARRYs, but the more complicated structures can be coded manually (using labels to facilitate the pointer creation). As an example (using Debug4x): Code: LNKARRY [ % 1 % 2 % 3 ] To truly take advantage of the LNKARRY features, though, you probably need to be more explicit about how the array is defined. For example, if you wanted to build a 6-element LNKARRY that has 3 unique numbers each repeated twice, you could do it as follows: Code: ASSEMBLEM This creates the equivalent LNKARRY for a UserRPL [ 3. 2. 1. 2. 1. 3. ]. If you look closely at how the above is defined, you'll see that the 3 raw elements are only defined once, and the offsets specify the ordering (and quantity) of the final elements in the array. I've never seen any descriptions of which internal array functions support LNKARRYs, but I suspect most of the documented SysRPL ones do. Hopefully others can clarify with more detail. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
hp 50G SysRPL linked arrays - Podalirius - 08-07-2018, 01:32 PM
RE: hp 50G SysRPL linked arrays - DavidM - 08-08-2018 01:55 AM
RE: hp 50G SysRPL linked arrays - Claudio L. - 08-08-2018, 02:18 AM
RE: hp 50G SysRPL linked arrays - DavidM - 08-08-2018, 03:07 AM
RE: hp 50G SysRPL linked arrays - Claudio L. - 08-09-2018, 10:01 PM
RE: hp 50G SysRPL linked arrays - cyrille de brébisson - 08-09-2018, 09:34 AM
|
User(s) browsing this thread: 1 Guest(s)