Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!dan From: dan@Apple.COM (Dan Allen) Newsgroups: comp.sys.handhelds Subject: HP-48SX BYTES Function Keywords: HP-48SX, calculators, portable computers, handhelds, HP Message-ID: <39410@apple.Apple.COM> Date: 12 Mar 90 03:52:22 GMT Distribution: comp.sys.handhelds Organization: Apple Computer Inc, Cupertino, CA Lines: 18 The HP-48SX has a neat function that returns the amount of memory any object occupies, as well as a binary checksum. This BYTES function seems to do a good job of hashing objects. Does anyone know the details of the internal checksumming routine? Note: the numbers -9 through 9 checksum to zero, as they are 2.5 byte objects (pointers to these frequently used numbers in ROM), whereas other numbers are 10.5 bytes and have a very well scattered range of checksums. Note #2: the checksum operation is VERY fast compared to any comparable checksumming operations that I have written. Conjecture #1: if you need to create a hash table on the HP-48, using BYTES as your hash function would be the way to go. Any comments? Dan Allen Apple Computer