Advertisement
TheFastFish

int array checksum

Oct 9th, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. COMMON DEF CHKSUM_IDAT(ARRAY%)
  2. VAR SUM%, I%, J%, V%, O%
  3. FOR I% = 0 TO LEN(ARRAY%) - 1
  4. FOR J% = 3 TO 0 STEP -1
  5. O% = J% * 8
  6. V% = (ARRAY[I%] AND (&HFF << O%)) >> O%
  7. SUM% = SUM% + V% AND &HFFFF
  8. NEXT
  9. NEXT
  10. RETURN SUM%
  11. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement