資源簡介
zmodem協議Linux下的實現代碼,非常完整。

代碼片段和文件信息
/*%?cc?-O?-K?-dos?%?-o?crc.exe
*/
/*
?*??Crc?-?32?BIT?ANSI?X3.66?CRC?checksum?files
?*/
#include?
#define?OK?0
#define?ERROR?(-1)
#define?LINT_ARGS
/**********************************************************************\
|*????????????????????????????????????????????????????????????????????*|
|*?Demonstration?program?to?compute?the?32-bit?CRC?used?as?the?frame??*|
|*?check?sequence?in?ADCCP?(ANSI?X3.66?also?known?as?FIPS?PUB?71?????*|
|*?and?FED-STD-1003?the?U.S.?versions?of?CCITT‘s?X.25?link-level?????*|
|*?protocol).??The?32-bit?FCS?was?added?via?the?Federal?Register?????*|
|*?1?June?1982?p.23798.??I?presume?but?don‘t?know?for?certain?that???*|
|*?this?polynomial?is?or?will?be?included?in?CCITT?V.41?which????????*|
|*?defines?the?16-bit?CRC?(often?called?CRC-CCITT)?polynomial.??FIPS??*|
|*?PUB?78?says?that?the?32-bit?FCS?reduces?otherwise?undetected???????*|
|*?errors?by?a?factor?of?10^-5?over?16-bit?FCS.???????????????????????*|
|*????????????????????????????????????????????????????????????????????*|
\**********************************************************************/
/*?Need?an?unsigned?type?capable?of?holding?32?bits;?*/
typedef?unsigned?long?int?UNS_32_BITS;
/*
?*?Copyright?(C)?1986?Gary?S.?Brown.??You?may?use?this?program?or
?*?code?or?tables?extracted?from?it?as?desired?without?restriction.
?*/
/*?First?the?polynomial?itself?and?its?table?of?feedback?terms.??The??*/
/*?polynomial?is???????????????????????????????????????????????????????*/
/*?X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0?*/
/*?Note?that?we?take?it?“backwards“?and?put?the?highest-order?term?in??*/
/*?the?lowest-order?bit.??The?X^32?term?is?“implied“;?the?LSB?is?the???*/
/*?X^31?term?etc.??The?X^0?term?(usually?shown?as?“+1“)?results?in????*/
/*?the?MSB?being?1.????????????????????????????????????????????????????*/
/*?Note?that?the?usual?hardware?shift?register?implementation?which???*/
/*?is?what?we‘re?using?(we‘re?merely?optimizing?it?by?doing?eight-bit??*/
/*?chunks?at?a?time)?shifts?bits?into?the?lowest-order?term.??In?our???*/
/*?implementation?that?means?shifting?towards?the?right.??Why?do?we???*/
/*?do?it?this?way???Because?the?calculated?CRC?must?be?transmitted?in??*/
/*?order?from?highest-order?term?to?lowest-order?term.??UARTs?transmit?*/
/*?characters?in?order?from?LSB?to?MSB.??By?storing?the?CRC?this?way??*/
/*?we?hand?it?to?the?UART?in?the?order?low-byte?to?high-byte;?the?UART?*/
/*?sends?each?low-bit?to?hight-bit;?and?the?result?is?transmission?bit?*/
/*?by?bit?from?highest-?to?lowest-order?term?without?requiring?any?bit?*/
/*?shuffling?on?our?part.??Reception?works?similarly.??????????????????*/
/*?The?feedback?terms?table?consists?of?256?32-bit?entries.??Notes:???*/
/*?????????????????????????????????????????????????????????????????????*/
/*??1.?The?table?can?be?generated?at?runtime?if?desired;?code?to?do?so?*/
/*?????is?shown?later.??It?might?not?be?obvious?but?the?feedback??????*/
/*?????terms?simply?re
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????8824??2002-11-30?03:19??Zmodem協議Linux下的源代碼(比較完整)\crc.c
?????文件???????1492??1994-01-20?10:51??Zmodem協議Linux下的源代碼(比較完整)\crc.doc
?????文件???????8764??1994-10-18?14:55??Zmodem協議Linux下的源代碼(比較完整)\crctab.c
?????文件?????????22??1991-09-14?16:16??Zmodem協議Linux下的源代碼(比較完整)\gz
?????文件???????3657??2002-10-15?14:28??Zmodem協議Linux下的源代碼(比較完整)\mailer.rz
?????文件???????8650??2002-07-19?08:54??Zmodem協議Linux下的源代碼(比較完整)\makefile
?????文件???????2868??1995-01-14?09:58??Zmodem協議Linux下的源代碼(比較完整)\minirb.c
?????文件???????2727??1995-04-21?14:48??Zmodem協議Linux下的源代碼(比較完整)\minirb.doc
?????文件??????10014??2003-01-30?15:51??Zmodem協議Linux下的源代碼(比較完整)\rbsb.c
?????文件???????4769??2000-11-27?12:02??Zmodem協議Linux下的源代碼(比較完整)\readme
?????文件??????30340??2003-01-30?15:52??Zmodem協議Linux下的源代碼(比較完整)\rz.c
?????文件??????19632??1999-10-04?09:51??Zmodem協議Linux下的源代碼(比較完整)\rz.doc
?????文件??????38424??2003-01-30?15:53??Zmodem協議Linux下的源代碼(比較完整)\sz.c
?????文件??????26418??2000-06-13?01:52??Zmodem協議Linux下的源代碼(比較完整)\sz.doc
?????文件???????7626??2002-08-31?07:44??Zmodem協議Linux下的源代碼(比較完整)\undos.c
?????文件???????4282??1997-07-04?23:04??Zmodem協議Linux下的源代碼(比較完整)\undos.doc
?????文件??????17715??2002-12-08?16:17??Zmodem協議Linux下的源代碼(比較完整)\zm.c
?????文件???????6513??2002-12-08?16:15??Zmodem協議Linux下的源代碼(比較完整)\zmodem.h
?????文件???????4351??2002-07-02?08:14??Zmodem協議Linux下的源代碼(比較完整)\zmr.c
?????文件????????738??1991-09-15?18:19??Zmodem協議Linux下的源代碼(比較完整)\zupl.t
?????文件????????784??2010-04-08?17:56??Zmodem協議Linux下的源代碼(比較完整)\使用說明請參看右側注釋====〉〉.txt
?????目錄??????????0??2011-11-30?20:26??Zmodem協議Linux下的源代碼(比較完整)
-----------?---------??----------?-----??----
???????????????208610????????????????????22
評論
共有 條評論