[comp.sys.handhelds] New version of CHK

peraino@gmu90x.gmu.edu (peraino) (02/02/90)

Here is the latest version of CHK. This version still generates the
same checksums, and is becoming somewhat of a standard in Europe.
The addition was the inclusion of 48 CF to make sure the radix mark
is standard here and in Europe, so checksums are the same.
     Replace your old version with this one. The file on gmuvax2.gmu.edu
has been updated.



CHK - Calculate a checksum for an object
      name : checksum


CHK[1142]

<< RCLF STD HEX 64 STWS 48 CF               ;set up proper modes.
   SWAP RCL ->STR 16 STWS DUP               ;set up loop.
   #0h 1 ROT SIZE FOR j
     OVER j j SUB NUM
     R->B XOR RL                            ;work char into checksum.
   NEXT
   ->STR 3 OVER SIZE 1 - SUB                ;Restore things.
   ROT STOF SWAP DROP
>>



-----------------------------------------------------------------------------
       Bob Peraino                   UUCP    : uunet!pyrdc!gmu90x!peraino
 George Mason University             INTERNET: peraino@gmuvax.gmu.edu
UCIS, Thompson Hall, rm 2 <-         BITNET  : peraino@gmuvax
  4400 University Drive     \        PHONE   : (703)-323-2549
   Fairfax, VA  22030        \- Yeah, they put us in the basement, too.
-----------------------------------------------------------------------------