VERIFY

Developer(s): Chris Taylor
Date: 1986
Type: Program
Platform(s): TS 2068

A seven-line printout verifier for typing in listings. MERGE it with a program and GO TO 9993: it walks through the program in memory and prints each line number with a check code for that line, skipping the hidden five-byte number forms. Compare the codes with those printed beside a listing and the mistyped line shows up at once. The author meant the newsletter to print VERIFY codes with its listings; it works on the TS2068 and the Spectrum.

As printed, the comparison sign in line 9995 (IF ln 9992 THEN STOP) did not print, so the program stops before anything is printed. The code is a count of the characters in each line rather than a sum of their codes, and E-mode colour and INVERSE VIDEO/TRUE VIDEO control codes count too, as the article warns.

Published in Sinc-Link August-September 1986 (Verify).

Related Articles

Routine to generate a checksum for every line in a program, aimed at assisting correct communication of program listings in newsletters.

Image Gallery

Source Code

9993 REM VERIFY by Chris Taylor
9994 LET a=PEEK 23635+256*PEEK 23636
9995 LET ln=PEEK (a+1)+256*PEEK a: LET a=a+2: LET co=0: IF ln 9992 THEN  STOP
9996 LET a=a+1: LET i=PEEK a: IF i=13 THEN  GO TO 9999
9997 IF i=14 THEN  LET a=a+5: GO TO 9996
9998 LET co=co+1: GO TO 9996
9999 PRINT ln;"-";co: LET a=a+1: GO TO 9995

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.