Jump to content
IGNORED

General Purpose Checksum Programs


Larry

Recommended Posts

Are there any good (executable or Basic) general purpose checksum programs written for the A8? CRC, maybe? I'm not finding anything in my archives, nor elsewhere. If nothing else, maybe modifying one of the magazine type-in programs?

 

Thanks,

Larry

Link to comment
Share on other sites

Hi Roy-

 

Thanks! I was thinking that Russg had posted one in the past, but couldn't find it. The one I D/L'd is .COM only, so I'll see if the source is available. I'll also check and see if the SD Toolkit ones run under MyDos.

 

-Larry

Link to comment
Share on other sites

Depends on what you want to use it for but CRC is way better. Checksum has the weakness that transposed bytes will usually generate the same result which instantly makes it not very useful for type-ins.

 

Checksum can be strengthened by performing other operations on each byte, e.g. do a different Xor, rotate or other operation for each byte in sequences of 8 to help eliminate the transposition weakness but really once you start doing stuff like that you may as well call it a CRC anyway.

 

And if you're going to do a CRC you may as well generate one that will match with what industry standard CRC32 algorithms give on PC programs like *Zip

  • Like 2
Link to comment
Share on other sites

Looks good. CRC32 takes 42 cycles per byte so depending on screen mode you'd process about 32K per second.

 

I'd recommend testing against some fixed piece of data and comparing against what a PC based version e.g. Winzip produces. Something like the character set 1K would be sufficient.

How you'd finally package it depends on intended use but me - I'd probably assemble it as a USR() callable function.

It requires 4 * 256 byte blocks preferably page-aligned for it's work tables - I'd use Ram under Basic for that. Then have the thing callable with an IOCB parameter and just have it generate the CRC from an already opened file, e.g. something from D:

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...