I haven't tried this (yet), but nice work!
On Sun, Apr 9, 2017 at 1:16 PM, Mateusz Viste <mate...@nospam.viste.fr> wrote:
> I needed to verify the integrity of a few files after transferring them
> to/from my 8086 PC the other day. The obvious method for such task is
> computing a checksum of the file, like MD5, SHA1, etc...
These days, MD5 and SHA1 are normally considered broken and obsolete,
but they're still good for simple private checks against corruption.
Having said that, I normally prefer MD5 myself, but in DOS I often
(also) use CRC32, which is fairly universal (and used by archivers
> However, on an 8086 this may take ages (even on a fairly fast 386,
> computing the MD5 sum of a 2 MiB file takes one minute).
It would be interesting to see some benchmark numbers for that (for
various specific tools, 8086, 386, etc).
I know Blair's (16-bit) MD5SUM is usually half the speed of DOS386's
FBMD5 (32-bit). Of course that can vary by cpu family and other
factors. Also, like all things, I'm sure there's plenty of room for
AFAIK, the 386 (often with little or no cache?) preferred much smaller
code (similar to 8086) vs. 486's pipelined way of preferring simpler
instructions. The 486 was also allegedly very sensitive to alignment.
I'm not sure many compilers truly took full advantage of those
> Since I don't like waiting, I created an alternative tool over the weekend:
> bsum is a tiny DOS tool that computes the BSD checksum of a file. It's
> very tiny: only 256 bytes (half of which is taken by the help screen), so
> it will easily fit in a single disk sector. A BSD checksum is obviously
> not as strong as MD5 or SHA1, but it's still more than enough for
> verifying whether or not a file got corrupted during a transfer.
> bsum is compatible with 8086 and requires only a few kilobytes of memory.
> Also, it's very fast.
Splurge on the memory, give it 32 kb or so. It'll "probably" be faster
with a bigger buffer.
> Homepage: http://bsum.sourceforge.net
Sounds good. Although I admit to being mostly unfamiliar with BSD cksum.
I did recently try to mirror some CRC32 tools to iBiblio, just for completeness.
Charles Dye's CHKSUM is fairly feature-packed (albeit only CRC32 and
DR-DOS XDIR sums), roughly 5 kb.
The other CRC32 util is a very simplistic (but good) .COM of roughly 1
kb, which is what I often use in a pinch (mostly due to its small
size). And I think the author of that one still frequents FreeDOS
Again, feel free to benchmark some of these, and tell us the results.
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Freedos-user mailing list