CKCRC Version 1.1 CKCRC will read any CP/M file and display a cyclic redundancy check value based on the CCITT standard polynomial: X^16 + X^15 + X^13 + X^7 + X^4 + X^2 + X + 1 and the value based on the standard polynomial for asynchronous use: X^16 + X^12 + X^5 + 1 This utility is useful for checking accuracy of file transfers. It is more accurate than a simple checksum. The program will optionally write an output file to the default drive, listing both the "CCITT" and the "CHEK" CRC values of all files requested. The program may update the last 2 bytes of a file to force the CCITT calculation to zero. This immediately indicates that the file has been modified and avoids requiring the CRC list. The "CHEK" value is displayed to allow comparison of CRC values calculated by other programs, such as CHEK15, LU, and NULU. If the "CHEK" value is supplied on the command line, the program will verify that the calculated value is equal to the value supplied. If the two values are not equal, the program will pause, allowing the operator to continue or to abort the program (using Control-C) with a warm boot. This is useful, as part of a submit file when the system is turned on, to assure that a program has not been corrupted (be it malicious or inadvertent). Usage: CKCRC [du:]ambigfn [/option] Only one option parameter may be entered: "F" causes the output to be written to CRCLIST.CRC "V" causes checksum installation in safe files only "U" installs unconditionally, may foul the file "R" removes CRC values installed by the V option "xxxx" compares the calculated CRC to this input Examples: CKCRC A1:*.* /V This command will install CCITT CRC values in all safe files, (files where that last sector has been filled with EOF or NULL characters). The output value under the heading "Patch" will be patched into the last 2 bytes of the file, and will cause a zero CRC. CKCRC MYFILE.ASM This command will display the CRC values for MYFILE.ASM. CKCRC *.ASM CRC-ASM.CRC /F This command will display the CRC values for all ASM files and also write the values to CRC-ASM.CRC. CKCRC SAP.COM /1D68 This command will calculate and display the CRC values for SAP.COM (a program that has the potential of destroying the directory of a disk if inadvertently modified), and compare the calculated value to that specified on the command line. If the results are equal the program will terminate normally, otherwise it will display an error message and pause, waiting for operator response. If the command is part of an "EX" batch stream, a Control-C will abort the "EX" command, any other character will continue the batch. This program is based on work done by Keith Petersen, Irv Hoff, C.B. Falconer, and others. Bill Duerr March 10, 1988