flat assembler
Message board for the users of flat assembler.
Index
> Windows > CRC32 Calculation ( Sorry for posting so many threads) 
Author 

bogdanontanu
Heh, for somebody with "crc32" name ... is this ironical or what?


19 Nov 2004, 01:20 

Matrix
hy,
i see you're serious about the problem , but could you describe your problem? why is it good for you to post similar in many posts? you won't get more help that way. if your problem is manual calculation, then it fully depends on you if you can do it without a computer. ps.: anyway crc i guess is not os dependent, so it could fit easily in main 

19 Nov 2004, 01:29 

crc32
Hi there,
The problem is manually calculation CRC values... I can get the crc values from code with ease... but I need to understand how to do it manually, so that I can work with NONSTANDARD POLY. The reason for putting in different threads = they are all different problems, but all related to CRC. I figured if I put them all in one thread, I will confuse more people. I don't have a problem calculating with computer, but I do have a problem doing LongHand calculation. If you know how to do it for CRC32, then please advice. thanks for your time reading. regards Jim Matrix wrote: hy, _________________ CRC32 Manual Calculation: HELP>>>> I am stuck 

19 Nov 2004, 02:07 

Matrix
Code: PROGRAM CRCTable; {CRCTable generates the table of constants needed for bytewise CRC16 calculations. The constants are formatted for inclusion in the CRC UNIT. (C) Copyright 1989, Earl F. Glynn, Overland Park, KS. Compuserve 73257,3527. All Rights Reserved. This Turbo Pascal 5.5 PROGRAM may be freely distributed for noncommercial use. This program was derived from the CRCV FORTRAN 77 program given in "Bytewise CRC Calculations" by Aram Perez in IEEE Micro, June 1983, pp. 4050. The constants here are for the CRC16 generator polynomial X^16 + X^15 + X^2 + 1. Other generator polynomials could be used but a new derivation would be needed to calculate the 'v' variables below.} CONST hexdigit: ARRAY[0..15] OF CHAR = '0123456789ABCDEF'; v : ARRAY[1..16] OF 0..1 = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); VAR count: 0..256; i,j : 1..4; k,sum: 0..16; x,x1,x2,x3,x4,x5,x6,x7,x8: 0..1; BEGIN count := 0; FOR x8 := 0 TO 1 DO FOR x7 := 0 TO 1 DO FOR x6 := 0 TO 1 DO FOR x5 := 0 TO 1 DO FOR x4 := 0 TO 1 DO FOR x3 := 0 TO 1 DO FOR x2 := 0 TO 1 DO FOR x1 := 0 TO 1 DO BEGIN x := x7 XOR x6 XOR x5 XOR x4 XOR x3 XOR x2 XOR x1; v[16] := x8 XOR x; v[15] := x; v[14] := x8 XOR x7; v[13] := x7 XOR x6; v[12] := x6 XOR x5; v[11] := x5 XOR x4; v[10] := x4 XOR x3; v[ 9] := x3 XOR x2; v[ 8] := x2 XOR x1; v[ 7] := x1; v[ 1] := x8 XOR x; k := 16; WRITE ('$'); FOR i := 1 TO 4 DO BEGIN FOR j := 1 TO 4 DO BEGIN IF j = 1 THEN sum := v[k] ELSE sum := 2*sum + v[k]; DEC (k) END; WRITE (hexdigit[sum]) END; WRITE (','); INC (count); IF count MOD 11 = 0 THEN WRITELN END END {CRCTable}. this helps? you can find more here and a google search here 

19 Nov 2004, 02:34 

< Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar.
Powered by rwasa.