Post Reply 
HP 49G, 49g+ & 50g: Built-in Zints
09-01-2017, 07:06 PM
Post: #8
RE: HP 49G, 49g+ & 50g: Built-in Zints
(09-01-2017 09:18 AM)Gerald H Wrote:  In my Sys RPL programmes I use names such as

Z0_

to represent the built-in form of

ZINT 0

thus reducing the size of programmes & hopefully making them faster.

Using #273AB as pointer for ZINT 0 save 6 nibbles of code but defintely makes execution slower!

In the case of the most other constants you save 7 nibbles, 5 nibbles length field, the number of digits (1) and the sign nibble. Execution is slower because executing an RPL pointer is nothing else than leaving the current RPL stream and calling a subroutine.

Code:
    
* ZINT 0
    CON(5)    =DOINT
    CON(6)    6
    
* ZINT 8
    CON(5)    =DOINT
    CON(5)    7
    NIBHEX    80

Using undocumented RPL entry points in general has always the risk that these entry points are moving and so your program may not work on every published OS version. Sometimes you have no chance to avoid using undocumented entries, because there's no equal functionality with supported entries, but in the actual case you save 3 or 3.5 bytes! when using an undocumented entry. Is it worth? Think about.

I know that Wolfgang Rautenberg massively used undocumented entries in his HP49 tools to save some nibbles, but in the early times with new ROM's from time to time, some of his programs quit working because some of the entries moved.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 49G, 49g+ & 50g: Built-in Zints - Christoph Giesselink - 09-01-2017 07:06 PM



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