(Comp.sys.hp48) Item: 2761 by detlef@dmhh.hanse.de [Detlef Mueller] Subj: About finding moved ROM entries.. Date: 28 Jan 1993 Hi all, The number of people owning a ROM rev J HP48 grows and most sys-RPL/assembler programs available as standalone objects or libraries are using 'unsupported' ROM entry points simply because lot's of low level function aren't 'supported' (eg. library handling, port management). The little library provided in this article is a 1st step in trying to find moved RPL code. It is written using only ROM entries listed in ENTRIES.A of the HP toolkit, which should be safe on any HP48 ROM version. It provides two commands, CKOB and CKLIB. CKOB expects an object of any type on the stack, CKLIB a real number representing the library ID of an installed library. The object, resp. the objects of a library, are searched for RPL pointer into the ROM, each is checked for pointing to a valid RPL object. The following rules define a valid RPL pointer (PTR) into the ROM: - a pointer to a primitive code object, ie. [PTR] = PTR - 5 - a pointer to a RPL object, ie. [[PTR]] = PRLG - a pointer to the pointer DupAndThen, ie. [PTR] = DupAndThen In case no invalid RPL pointer where found, both commands reports All inspected RPL pointer are valid... in the status display area and leave the stack unchanged. If the commands detect ROM pointer not following the above rules, !!! Warning !!! Found void RPL pointer is reported in the display status area, the passed object is dropped and a list of binary numbers is placed on the stack. The binary numbers are the values of the illegal pointer. If you get a new piece of software, which was written on a HP48 with a different ROM revision than yours, run CKOB (or CKLIB in case it's a library) on it. If CHKIT reports any invalid RPL pointer, remove the new software immidately from your HP48, send the list of the illegal pointer to the author of the software and publish it in comp.sys.hp48 (please include the name of the software, where you get it from and what ROM rev your HP48 have). If CHKIT don't report a problem, this only means that the RPL pointer are valid from the scope of RPL execution, not that the used ROM based code didn't move ! Also RPL bases on assembler routines; there are some supported assembler ROM entries and a lot of unsupported ones. Many programs have emdedded CODE objects, containing assembler code slices or are completely written in assembler (eg. <-LIB->, QED, StrWrt etc.). These entries can't be checked for beeing valid without a complete entries list of each ROM rev ! CKLIB only works on an installed library - that may cause trouble, if its configuration code makes use of unsupported entries ! However, I would really appreciate if someone owning a rev J HP48 will install the <-LIB-> library (be shure, that flag 5 is clear !), then executing 1221 CKLIB and mailing me the result.. Bye, 8-Detlef +------------------------------------+--------------------------------------+ |`What a depressingly stupid machine'| Detlef Mueller | | -- Marvin | detlef@dmhh.hanse.de | +------------------------------------+--------------------------------------+