Apple Disk Verify
Here's a short but useful verification utility for checking BASIC programs saved on disk. It works with all Apple II-family computers.
The VERIFY command in Apple DOS 3.3 indicates only whether a saved program is legible. Sometimes this isn't enough. If you need to be absolutely sure that the program you just saved is safely stored on the disk, "Verify + " is the answer. It's a utility written in machine language which insures that the BASIC program saved on disk is exactly the same as the program in memory. Verify + is only about 400 bytes long and uses two 256-byte buffers.
The program following this article is a BASIC loader which creates Verify + by encoding the machine language (ML) in DATA statements. Type in the program and run it. If any errors are detected in the data, the program stops. When you see the message ML LOADED, save the ML by typing:
BSAVE VERIFY +, A$8E00, L$175
Now that you have saved the machine language for Verify +, you can reload it whenever it's needed by typing:
BLOAD VERIFY +
To run it, you can type this command:
If you plan to run Verify + frequently, there's an even easier way. First, load the utility by typing BLOAD VERIFY + as before. Then enter these two statements:
POKE 1014, 0 : POKE 1015, 142
Then all you'll have to type to perform the verification is the ampersand symbol, &.
A Simple Test
After typing in Verify+ and saving it as described above, try this easy test. First, create a one-line BASIC program:
10 PRINT "HELLO"
and save it on disk with the filename TRIAL. Then, run Verify + by typing:
CALL 36352 "TRIAL"
(or, if you entered the appropriate POKEs, run Verifyby typing & "TRIAL"). If the program was properly verified, you'll see the message FILE OK.
Now, slightly modify the BASIC test program:
10 PRINT "JELLO"
and try verifying it again: CALL 36352 "TRIAL" or & "TRIAL". You should get the message VERIFY ERROR.
Unfortunately, Verify + works only with BASIC programs. This is because of the different ways that BASIC, binary, and text files are stored on the disk. But if Verify + ever keeps you from losing even one important BASIC program because of a faulty disk or other problem, you'll be glad you kept it handy.