Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another email...
#1
[to me as webmaster of qbnz]

_____________

Do you know where I can go to get quick basic utility on CRC error checking?

I need a utility that can generate CRC -16 error checking.

Any help would be most appreciated!
Reply
#2
.................yay?
Reply
#3
^^^ is that increasing post count?

As webmaster of a "big" qb site I recieve mail like this all the time...
Reply
#4
Do you actually have any idea what he means? Have you tried google on CRC - 16?
Reply
#5
CRC means Cyclic Redundance Check. It is used to check if some data is correct. A CRC value is generated upon the data doing some math, and then it is used to compare it with received/extracted data to see if it has been received/extracted correctly.

CRC16 means that the CRC is 16 bits long.

This code takes a text string and returns the CRC16 code associated:

Code:
BBS: Inland Empire Archive
Date: 02-14-93 (22:02)             Number: 304
From: DOUGLAS LUSHER               Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: CRC16                          Conf: (2) Quik_Bas Someone requested code for 16 bit CRC not long ago. Some code
was posted in response, but I thought I would post mine too. This
routine should be much faster than the code posted previously, and
if speed is critical, this can be made to run even faster with
just a bit of ASM code. If some one requests it, I will post that.
Also note that the previously posted code returns the CRC in a
long integer, my routine returns an integer.

DEFINT A-Z
FUNCTION CRC16% (Target$)
'returns the 16 bit CRC for the supplied string
'by Douglas H. Lusher, 13 Feb 1993
STATIC Initialized%, CRCTable%()

IF Initialized% GOTO CalcCRC16

REDIM CRCTable%(255)
FOR Ptr% = 0 TO 255
   CRC& = Ptr% * 256&
   FOR Bit% = 0 TO 7
     Carry% = ((CRC& AND &H8000) <> 0)
     CRC& = (CRC& * 2) AND &HFFFF&
     CRC& = CRC& XOR (Carry% AND &H1021)
   NEXT
   CRCTable%(Ptr%) = (CRC& - 32768) XOR &H8000
NEXT
Initialized% = -1

CalcCRC16:

CRC& = 0
FOR Ptr% = 1 TO LEN(Target$)
   Char% = ASC(MID$(Target$, Ptr%))
   CRC& = CRC& * &H100
   CRC& = CRCTable%(((CRC& AND &HFF0000)\ &H10000) XOR Char%) _
             XOR (CRC& AND &HFF00&)    'append this to the line above
NEXT
CRC16% = ((CRC& AND &HFFFF&) - 32768) XOR &H8000

END FUNCTION


--- TMail v1.30.4
* Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#6
Quote:^^^ is that increasing post count?

As webmaster of a "big" qb site I recieve mail like this all the time...

Oooooooooooooooooh, I'm sorry. The little line you put in the post made the rest of it look like your sig, so it pretty much just looked like

Quote:[to me as webmaster of qbnz]

....and so, yeah. I had no idea. Smile Can't answer your question...
Reply
#7
CRC32 would be better. Smile
I'd knock on wood, but my desk is particle board.
Reply
#8
Quote:.................yay?

And you pester me about posting useless posts :barf:
Reply
#9
TBBQ: read his second post... :roll:
Reply
#10
Blarg!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)