+Larry Posted October 25, 2016 Share Posted October 25, 2016 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 Quote Link to comment Share on other sites More sharing options...
Roydea6 Posted October 25, 2016 Share Posted October 25, 2016 russg did an action program not long ago to do individual or folder checksums called CRC32N2.COM and works with MyDos or SpartaDos and also in the newest SpartaDos X toolkit there is a CRC32.COM with a CRC32.DLL to do the same. 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted October 25, 2016 Author Share Posted October 25, 2016 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 Quote Link to comment Share on other sites More sharing options...
Roydea6 Posted October 25, 2016 Share Posted October 25, 2016 crc32n2.zip I found the com file but had to zip it for upload.. Quote Link to comment Share on other sites More sharing options...
Rybags Posted October 25, 2016 Share Posted October 25, 2016 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 2 Quote Link to comment Share on other sites More sharing options...
+Larry Posted October 26, 2016 Author Share Posted October 26, 2016 I found this source code for CRC16 and CRC32 at 6502.org http://6502.org/source/integers/crc.htm -Larry Quote Link to comment Share on other sites More sharing options...
Rybags Posted October 26, 2016 Share Posted October 26, 2016 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: 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.