Classic Computer Magazine Archive COMPUTE! ISSUE 48 / MAY 1984 / PAGE 10

Atari Tape Verify

Here is a one-line program which verifies that an Atari tape file is recorded properly. The utility works whether you CSAVE, LIST, or PRINT (data) to the tape. It performs essentially the same as Michael J. Barkan's "Atari Verify" (COMPUTE!, August 1983), but is much shorter. This utility can be LISTed to tape and ENTERed from tape, but since it is so short, it is easy to enter it from the keyboard in direct mode (without the line number). Just use this line:

0 CLOSE #1 : OPEN #l, 4, 0, "C : " : FOR A = 1 TO
400 : GET #1, A : NEXT A

After recording a file on tape and while the program or data is still in memory, enter and run this utility. Rewind the tape to the beginning of the file and push PLAY. The utility will read the entire file, one character at a time, to insure that the file is recorded properly. Operation will end with an error code. If you get this code, the file was read successfully, showing that it is good:

136 END OF FILE

If you get one of the following error codes, save the file again, since it could not be read by the computer:

138 DEVICE TIMEOUT
140 SERIAL BUS ERROR
143 DATA FRAME CHECKSUM ERROR

The same variable is used for loop control and to hold each character as it is read from tape. This way, the loop never ends and will check any length of file. This variable can be changed to one of those in your program, if desired, to avoid adding to the Variable Name Table of your program.

Douglas J. Wilder