CRCFIX.324 CRC fixer for CDOS 3.24+ If a file will not load and the problem is due to a CRC error, ("?CC Error-etc" displayed) the machine language program created by listing two (CRCFIX.CO) can be used to bypass CRC errors in CDOS rev 3.24 most of the time, as most CRC errors are not due to actual physical damage to the disk medium. The data may have been altered; but better to be able to retrieve a file with bad data that you can attempt to restore than not to be able to retrieve it at all. First, find out which track and sector have the CRC error. Use the ML finder program, FINDCC.CO, created by listing one, or your own method. FINDCC.CO reads all tracks sequentially and announces CRC errors with a multiple beep while displaying the track and sector where they occur. Other errors are announced with a single beep. It's desirable to know which files contain the CRC errors so you'll recognize the sector contents when CRCFIX prints them on the screen. You may want to use DISKPP.CHP to find out where these files are on the disk. Use the display directory and display allocation table options to trace which clusters the file occupies, and then use the display cluster option to verify the track and sector where the CRC error occurs. Or you can verify by exiting to Basic and executing in immediate mode: ? DSKI$(0,T,S,0) -- where T=track # and S = sector #. Of course, if only one file has a CRC error, it's pretty obvious. Then run the CRCFIX.CO program created by listing two. Answer the prompts with the track and sector number. If there's not a valid CRC error, then you'll get a message and be re-prompted. The data contained in that track and sector will be displayed on the screen. If that looks like the right sector, then press the Y key and that sector will be rewritten to the disk, eliminating the CRC error in the process. Then you'll be able to load the file and correct any data that may have been altered. It's easy to spot bad data in a DO file. BA files are harder, but not impossible. Of course, if the file was a CO file, you're just trusting to luck that it'll still run, as this whole exercise is rather pointless when you're unable to recognize and fix CO program bytes. Listing one: 0 ' Loader program to create FINDCC.CO 1 ' By Tim Ekdom 72575,1473 2 ' July, 1985 10 CLS:PRINT 20 IFHIMEM<>MAXRAMANDHIMEM<>57248THEN500 30 IFMAXRAM<57967THEN600 40 IFFRE(0)<1000THEN700 50 CLEAR256,57248 60 PRINT"Creating FINDCC.CO ..." 70 FORAD=57248TO57957 80 READ BY:POKEAD,BY 90 CK=CK+BY 100 NEXTAD 110 IFCK<>50614THENPRINT"Incorrect checksum...not loaded":END 120 CLS:PRINT:PRINT"Finished. Load/Run address is 57248" 130 SAVEM"FINDCC.CO",57248,57957,57248 140 END 500 PRINT"HIMEM <> MAXRAM. Is there a ML program" 510 PRINT "loaded (other than CDOS) that you want":PRINT"saved? (Y/N)" 520 A$=INKEY$:IFA$=""THEN520 530 IFA$="Y"ORA$="y"THENEND 540 IFA$="N"ORA$="n"THENCLS:PRINT:GOTO30 550 GOTO520 600 PRINT"Cannot load over MAXRAM":END 700 PRINT"Inadequate free RAM to save SDCOPY.":PRINT"Kill some files":END 1000 DATA205,49,66,205,34,66,33,207,224,205,88,90,205,34,66,33,224,224,205,88 1010 DATA90,205,34,66,205,34,66,33,239,224,205,88,90,205,203,18,254,13,202,214 1020 DATA223,254,27,202,72,224,254,3,194,193,223,195,72,224,62,18,33,100,225,119 1030 DATA62,255,35,119,43,43,119,205,34,66,33,83,225,205,88,90,33,100,225,52 1040 DATA62,19,190,194,24,224,62,1,119,35,52,62,80,190,202,39,224,58,58,246 1050 DATA254,37,244,34,66,62,32,231,58,101,225,111,38,0,205,212,57,62,32,231 1060 DATA205,190,224,218,73,224,205,179,224,218,88,224,195,236,223,205,34,66,33,10 1070 DATA225,205,88,90,205,34,66,33,20,225,205,88,90,205,203,18,230,31,254,25 1080 DATA202,184,223,254,14,194,57,224,201,205,34,66,33,37,225,205,88,90,205,34 1090 DATA66,195,51,224,205,41,66,33,101,225,58,99,225,190,202,104,224,205,34,66 1100 DATA62,67,187,202,125,224,33,46,225,205,88,90,38,0,107,205,212,57,195,137 1110 DATA224,205,41,66,205,41,66,33,54,225,205,88,90,33,66,225,205,88,90,58 1120 DATA101,225,111,38,0,205,212,57,33,74,225,205,88,90,58,100,225,111,38,0 1130 DATA205,212,57,205,34,66,58,101,225,50,99,225,195,236,223,33,100,225,94,35 1140 DATA86,35,255,66,2,201,205,66,114,167,200,254,27,202,205,224,254,3,194,190 1150 DATA224,55,201,32,67,68,79,83,32,67,82,67,32,70,105,110,100,101,114,0 1160 DATA32,40,69,83,67,32,61,32,65,98,111,114,116,41,0,32,73,110,115,101 1170 DATA114,116,32,100,105,115,107,44,32,112,114,101,115,115,32,69,110,116,101,114 1180 DATA32,0,32,70,105,110,105,115,104,101,100,0,32,65,110,111,116,104,101,114 1190 DATA63,32,40,89,47,78,41,32,0,32,65,98,111,114,116,101,100,0,32,69 1200 DATA114,114,111,114,32,0,32,67,82,67,32,101,114,114,111,114,58,0,32,84 1210 DATA114,97,99,107,32,0,32,83,101,99,116,111,114,32,0,32,82,101,97,100 1220 DATA105,110,103,32,116,114,97,99,107,58,0,255,0,0,0,0,0,0,0,0 1230 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1240 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1250 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1260 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1270 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1280 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1290 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1300 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1310 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1320 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1330 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1340 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1350 DATA0,0,0,0,0,0,0,0,0,0 Listing two: 0 ' Loader program to create CRCFIX.CO 1 ' By Tim Ekdom 72575,1473 2 ' July, 1985 10 CLS:PRINT 20 IFHIMEM<>MAXRAMANDHIMEM<>57296THEN500 30 IFMAXRAM<57967THEN600 40 IFFRE(0)<1000THEN700 50 CLEAR256,57296 60 PRINT"Creating CRCFIX.CO ..." 70 FORAD=57296TO57965 80 READ BY:POKEAD,BY 90 CK=CK+BY 100 NEXTAD 110 IFCK<>46886THENPRINT"Incorrect checksum...not loaded":END 120 CLS:PRINT:PRINT"Finished. Load/Run address is 57296." 130 SAVEM"CRCFIX.CO",57296,57965,57296 140 END 500 PRINT"HIMEM <> MAXRAM. Is there a ML program" 510 PRINT "loaded (other than CDOS) that you want":PRINT"saved? (Y/N)" 520 A$=INKEY$:IFA$=""THEN520 530 IFA$="Y"ORA$="y"THENEND 540 IFA$="N"ORA$="n"THENCLS:PRINT:GOTO30 550 GOTO520 600 PRINT"Cannot load over MAXRAM":END 700 PRINT"Inadequate free RAM to save SDCOPY.":PRINT"Kill some files":END 1000 DATA205,49,66,205,34,66,33,212,224,205,88,90,205,34,66,33,233,224,205,88 1010 DATA90,205,34,66,205,34,66,33,249,224,205,88,90,205,184,224,202,172,224,218 1020 DATA235,223,33,79,0,223,218,235,223,123,50,108,225,33,3,225,205,88,90,205 1030 DATA184,224,202,172,224,218,5,224,33,18,0,223,218,5,224,123,50,109,225,62 1040 DATA2,50,182,224,205,173,224,210,142,224,123,254,67,194,154,224,33,13,225,205 1050 DATA88,90,205,34,66,62,0,50,107,225,33,107,225,78,6,0,33,110,225,9 1060 DATA126,231,33,107,225,52,62,0,190,194,62,224,205,34,66,33,31,225,205,88 1070 DATA90,205,203,18,230,31,254,25,202,119,224,254,13,202,172,224,254,14,194,93 1080 DATA224,205,34,66,195,232,223,205,34,66,62,4,50,182,224,205,173,224,33,48 1090 DATA225,205,88,90,205,34,66,195,232,223,33,58,225,205,88,90,205,34,66,195 1100 DATA232,223,33,84,225,205,88,90,107,38,0,205,212,57,205,34,66,195,232,223 1110 DATA201,33,108,225,86,35,94,35,255,66,0,201,205,68,70,35,223,200,35,35 1120 DATA223,216,33,133,246,205,235,8,194,207,224,186,202,209,224,62,255,198,2,201 1130 DATA32,67,68,79,83,32,51,46,50,52,32,67,82,67,32,70,105,120,101,114 1140 DATA0,32,40,69,110,116,101,114,32,61,32,69,120,105,116,41,0,32,84,114 1150 DATA97,99,107,63,32,32,0,32,83,101,99,116,111,114,63,32,0,32,83,101 1160 DATA99,116,111,114,32,99,111,110,116,101,110,116,115,58,0,32,80,114,111,99 1170 DATA101,101,100,63,32,40,89,47,78,41,32,0,32,70,105,110,105,115,104,101 1180 DATA100,0,32,78,111,32,67,82,67,32,101,114,114,111,114,32,116,104,105,115 1190 DATA32,115,101,99,116,111,114,0,32,78,111,116,32,67,82,67,32,101,114,114 1200 DATA111,114,46,32,69,114,114,111,114,32,0,0,0,0,0,0,0,0,0,0 1210 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1220 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1230 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1240 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1250 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1260 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1270 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1280 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1290 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1300 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1310 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1320 DATA0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1330 DATA0,0,0,0,0,0,0,0,0,0 Tim Ekdom 72575,1473 July, 1985