Dec 072017
 
CRC Check for Microsoft 'C' with source.
File CRC4MSC.ZIP from The Programmer’s Corner in
Category C Source Code
CRC Check for Microsoft ‘C’ with source.
File Name File Size Zip Size Zip Type
CRC.ASM 3081 936 deflated
CRC.DOC 1808 912 deflated
CRCCMPCT.OBJ 161 152 deflated
CRCLARG.OBJ 164 155 deflated
CRCMED.OBJ 158 149 deflated
CRCSMAL.OBJ 155 146 deflated

Download File CRC4MSC.ZIP Here

Contents of the CRC.DOC file



FAST CRC ROUTINES FOR MICROSOFT C

Mike Dumdei, 6 Holly Lane, Texarkana TX 75503

Included in this ARC file are some fast CRC routines for use with MSC.
These routines are 2 to 3 times faster than their C counterparts even
with the C functions using register variables. The routines support
SMALL, MEDIUM, COMPACT, LARGE, and HUGE memory models, however, the
block CRC calculator can not handle blocks that overlap segments. Unless
you have some exotic application that shouldn't be a problem.

To assemble for:
SMALL model -- masm crc /mx;
COMPACT model -- masm crc /dcompact /mx;
MEDIUM model -- masm crc /dmedium /mx;
LARGE model -- masm crc /dlarge /mx;
HUGE model -- masm crc /dhuge /mx;

The large and huge object code generated will be identical.

Two types of functions are provided. The first is a CRC routine for use
on blocks of data:
int calc_crc(char *, int); /* function declaration */
BLOCK MODE USE:
for (x = 0; x < 128; x++)
async_tx(COM1, block[x]); /* get block to tx buf ASAP */
crc = calc_crc(block, 128); /* calc CRC while block is tx'ing */

The other type of CRC calculator is one that works on character at a
time data:
int update_crc(int, char); /* function declaration */
CHAR AT A TIME USE:
for (x = crc = 0; x < 128; x++) {
char_in = async_rx(COM1);
store(char_in);
crc = update_crc(crc, char_in); /* keep CRC curnt so will be rdy */
} /* when entire block has been rx'd */
To use this version you initially set 'crc' to zero and then after each
call to the function the CRC is updated.

I can be reached at:
SPLIT UP THE MIDDLE BBS 214 838-6713




 December 7, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)