[comp.sys.handhelds] HP48: SYSEVAL PEEK

alonzo@microsoft.UUCP (Alonzo GARIEPY) (03/17/90)

Here is a SYSEVAL based PEEK program for the HP 48.  This technique
was invented by Rick Grevelle for the HP 28.  The SYSEVAL addresses 
were found by Dave Kaffine and myself.  This is reasonably fast and 
requires no machine code.

PEEK  [CD20]
<<    
    10  -                      ;  Adjustment, 10 nybbles
    # 4003h SYSEVAL            ;  Short integer, 00002
    # 56B6h SYSEVAL DROP       ;  GET, address past 0001502A70
    # 540BBh SYSEVAL           ;  Get contents
    OBJ->                      ;  String->binary integer
>>

But the program is imperfect.  There are 24 addresses for which it 
does not work:

0291B 0293D 0295F 02981 029A7 029C9 029F2 02A14 02A36 02A58 02A7E 02AA0 
02AC2 02AE4 02B06 02B28 02B4A 02B6C 02B92 02DA7 02DD6 02E52 02E77 02E9C

Each of these is 10 greater than the address of an object type.

All the usual caveats apply.  If you're going to mess with SYSEVALS
or machine code, backup your HP 48 occasionally.

Alonzo Gariepy
alonzo@microsoft