TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Paul Edwards
from: Bob Lawrence
date: 1996-09-19 08:15:28
subject: Public Domain Pascal

BL> You did a terrific job, BTW. What a pity you write in such a
 BL> crappy language. The Pascal version is much neater, smaller,
 BL> and probably quicker.

 PE> First of all, I don't think "xor" is standard pascal, yet
 PE> another example of pascal being a completely inadequate
 PE> language, you have to use compiler extensions just to write CRC
 PE> routines. Secondly, why do you think it would be faster?

  I knew if I said that, you'd check my code.

  I see what you mean about speed, though. I was worried that doing
the CRC for every character would be really slow, but using the
table is does it in the same time as incrementing a pointer, which is
the fastest thing the profiler can measure!   

 PE> The only thing I can think of is that you seem to have omitted
 PE> the masking with 0xffff in case word sizes are > 16 bits, ie
 PE> you've tied the code down to a particular platform. That's not
 PE> an advantage. 

  It worked... you did look at the code.

  Shit! I should have used an integer with a defined size. I *know*
that, but I forgot.
 
BTW, the reason I did the translation is that the Pascal SWAG was
stuffed up with three different answers. You are the only one who 
knows what he is doing with CRCs.

BTWTW... why do you rabbit on about unsigned longints in your code?
All the operations are bitwise, so why does it matter?

BTWTBW... adding the CRC to the serial port is  messy, isn't it? It
would be nicer to generate the CRC as a little array, since that's
the way it gets sent.

Regards,
Bob
___ Blue Wave/QWK v2.12
@EOT:

---
* Origin: Precision Nonsense, Sydney (3:711/934.12)
SEEN-BY: 711/934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.