Anche la rivista "The Transactor" aveva creato un software per la verifica delle linee immesse durante la digitazione.
"The Transactor" era una rivista dedicata al mondo Commodore.
Il programma si chiamava "VERIFIZER" ed i checksum di controllo erano di tipo letterale al contrario di altri che erano numerici.
Dalle ricerche che ho effettuato sembra che la prima versione sia sul numero 5 di giugno 1985.
Di seguito un esempio di come venivano visualizzati i dati di checksum:
E' presente anche un altro listato denominato "VERIGEN" che serviva per catalogare i chcksum del programmi su disco in modo da renderli "sicuri".
L'articolo scriveva così:
"The greatest source of calls and letters we get at the Transactor are from people who are having difficulty getting a long program from the magazine to work right. Occasionally it’s due to a goof-up on our part, but other times it’s simply because the chances of making a typing error in a very long program are quite large, and finding that error (probably more than one) after the entire program has been entered is quite difficult. This is especially true for machine language programs in BASIC loader form, where the hundreds of numbers in the DATA statements can make the most competent reader go cross-eyed.
To save you from endless program de-glitching sessions, we’ve come up with two solutions. The first is the best, but it’ll cost you: All programs printed in the magazine are also available on disk, includ ing those from past issues (see the center insert in this issue for more details).
The second solution doesn’t save you any typing, but it can help you find errors as soon as you make them. The solution comes in the form of a short machine language program called “VERIFIZER” — so named, of course, because it verifies! (OK, so we indulged in a cute name — no nasty letters from English teachers, please.) VERIFIZER should be run before typing in any long program from the pages of The Transactor. From this issue onwards, all long programs will have two uppercase letters printed before each line. The programs should be entered normally (i.e. don’t enter the letters in front of the line), but every time you enter a line, VERIFIZER will print two characters at the top left of the screen. If these letters match those in print, you entered the line properly.
Besides catching omissions and other blatant errors in each program line, VERIFIZER will also catch transpositions; probably the most commonly made error with numbers in PEEK, POKE, or DATA statements. For example, if you’re typing quickly and enter 52381 instead of 53281, VERIFIZER will catch the error and report a code different from the one printed with the program listing. To make your life easier though, there are some variances that VERIFIZER will NOT catch. One is that it ignores spaces — you can put as many spaces as you want between keywords, or leave them out altogether without changing the reported code. Spaces are accepted anywhere as long as they don’t split up keywords. Keep in mind, though, that there may be occasions where the number of spaces is important (eg. in a string definition), so take notice of messages such as [9 spaces] in a listing - which means, naturally, enter 9 spaces, not the number 9 followed by the word 'spaces’. Another thing you can get away with is the abbreviation of keywords. Since VERIFIZER looks at token values, you will get the same result if you type ‘nE’ or ‘next’.
How to use VERIFIZER Listing 1 contains two versions of the VERIFIZER program: one for the PET, and one for the C64 or VIC. These listings will appear in all issues from now on. You’ll notice that the verifizer listings are themselves printed in “verifized” format (with the report codes along the left side), which seems pretty silly, since you won’t have verifizer while you’re typing the program in. The codes are there just as a check, so that once verifizer is up and running you can press RETURN over some program lines and see if the reported codes match up with those printed with the listing.
Enter the applicable program and RUN it. If you get the message, data error *****'', re-check the program and keep trying until all goes well. You should SAVE the program, since you’ll want to use it every time you enter one of our programs. Once you’ve RUN the loader, enter NEW, then turn VERIFIZER on with: SYS 828 to enable the C64/VIC version (turn it off with SYS 831 ) or SYS 634 to enable the PET version (turn it off with SYS 637) Once VERIFIZER is on, every time you press RETURN the two-letter report code will appear in. the first two screen locations in reverse field. Note that these letters are in uppercase and will appear as graphics characters unless you are in upper/lowercase mode (press shift/Commodore on C64/VIC). If you press RETURN on a screen line that doesn’t contain a BASIC program line (i.e. no line number at the beginning), the code you’ll get is unpredictable — VERIFIZER is only used to report on BASIC program lines.
With VERIFIZER on, just enter the program from the magazine normally, checking each report code after you press RETURN on a line. If the code doesn’t match up, you can re-check and correct the line, then try again. If you wish, you can LIST a range of lines, then type RETURN over each in succession while checking the report codes as they appear. If you’re in the habit of re-numbering segments of a program as you type it in, be prepared for unmatched codes, since VERIFIZER uses the line number as part of its checksum calculation. Once the program has been properly entered, be sure to turn VERIFI- ZER off with the sys indicated above before you do anything else.
VERIFIZER resides in the cassette buffer, so if you’re using a datasene be aware that tape operations can be dangerous to its health. As far as compatibility with other utilities goes, VERIFIZER shouldn’t cause any problems since it works through the BASIC warm-start link and jumps to the original destination of the link after it’s finished. When disabled, it restores the link to its original contents.
How VERIFIZER Verifies VERIFIZER generates the report code on a checksum principal, but assigns “weights” to each byte to catch transposition errors. The weights 1,2,3,4 are assigned to the tokenised BASIC line, and the low byte of the line number is added in. In other words, a checksum is obtained by taking the line number low byte, adding 1 times the first byte in the BASIC line (from the BASIC input buffer at $0200), 2 times the second, 3 times the third, 4 times the fourth, then 1 times the fifth, etc. The final checksum is a two byte unsigned integer. The high byte is discarded, and the low and high nybbles of the low byte are used to form the two report code characters, which are put directly into screen memory in the PET version, and PRINTed to the screen with the VIC/ C64 version.
Since only the low byte is used, checksum variances of exact multiples of 256 will not be detected, but the probability of that occurring as a legitimate error was judged to be reasonably small. For example, if you "accidentally” entered the line number 1256 instead of 1000, there would be no discrepancy in the report codes. However, if you’re that uncoordinated, don’t even try to type in programs — get the disk.
VERIGEN: VERIFIZER program generator Listing lb: PET/CBM VERIFIZER (BASIC 2.0 or 4.0) On the other side of the VERIFIZER story, there is VERIGEN to create a verifized sequential file from a program. The version we use includes special control characters in the output file for the typesetter, but the version shown here (listing 2) just creates a sequential file giving the program listing with line numbers separated from the verifizer codes by a single space.
What good is VERIGEN to you? Well, if you have a printer and like storing program listings as a final backup, you may want to have them in verifized form should the day ever come when every one of your disks instantly turns to electro-dust. Or if you have a 64 with a 1541 drive and want to give a program to a PET owner who has an 8050, you can give him a verifized listing (assuming, of course, that he has a copy of VERIFIZER).
How to use VERIGEN VERIGEN runs on a C64 and works with two disk files, “infil” and “outfil". Before executing Verigen, the program to be verifized must be in memory, AND a listing of that program must be on disk as a sequential file named “infil". To create infil, just enter the following after the input program for Verigen is in memory: open8,8,8, * @0:infil,s,w ’ : cmd8: list print#8: close1 After "infil" has been set up in this way, just sys49152 to execute Verigen. It will create “outfil” for you, which will be a sequential disk file containing the program listing with verifizer codes before the line numbers. Outfil can be sent to a printer or manipulated like any sequential text file (i.e. loaded into a word processor).
VERIFIZER will make pretty sure that the program you type in mimics that in the listing, but it can’t guarantee that the listed program is bug- free. So if VERIFIZER says a program is OK and it still doesn’t work, you can drop us a line without worrying that the problem may be with your typing."
Tradotto:
"La maggior parte di chiamate e lettere che riceviamo al Transactor provengono da persone che hanno difficoltà a far funzionare correttamente un programma copiato dalla rivista.
Occasionalmente è dovuto a un errore da parte nostra, ma altre volte è semplicemente perché le possibilità di commettere un errore di battitura in un programma molto lungo è piuttosto facile mentre trovare l'errore (probabilmente più di uno) dopo che l'intero programma è stato inserito è abbastanza difficile.
Ciò è particolarmente vero per i programmi in linguaggio macchina sotto forma di BASIC LOADER, dove le centinaia di numeri nelle istruzioni DATA possono far confondere il lettore più competente.
Per salvarti da infinite sessioni di controllo del programma, abbiamo escogitato due soluzioni.
Il primo è il migliore, ma ti costerà: tutti i programmi stampati sulla rivista sono disponibili anche su disco, compresi quelli dei numeri passati (vedi l'inserto centrale di questo numero per maggiori dettagli).
La seconda soluzione non ti fa risparmiare alcuna digitazione, ma può aiutarti a trovare gli errori non appena li fai.
La soluzione si presenta sotto forma di un breve programma in linguaggio macchina chiamato "VERIFIZER", così chiamato, ovviamente, perché verifica! (OK, quindi ci siamo concessi un nome carino - niente brutte lettere da insegnanti di inglese, per favore.)
VERIFIZER dovrebbe essere eseguito prima di digitare qualsiasi programma preso dalle pagine di The Transactor. Da questo numero in poi, tutti i programmi lunghi avranno due lettere maiuscole stampate prima di ogni riga. I programmi devono essere inseriti normalmente (cioè non inserire le lettere davanti alla riga), ma ogni volta che si inserisce una riga, VERIFIZER stamperà due caratteri in alto a sinistra dello schermo. Se queste lettere corrispondono a quelle stampate, hai inserito correttamente la riga.
Oltre a rilevare le omissioni e altri errori evidenti in ciascuna linea di programma, VERIFIZER catturerà anche le trasposizioni; probabilmente l'errore più comune con i numeri nelle istruzioni PEEK, POKE o DATA.
Ad esempio, se stai digitando velocemente e inserisci 52381 invece di 53281, VERIFIZER rileverà l'errore e segnalerà un codice diverso da quello stampato sulla riga della rivista. Per semplificarti la vita, tuttavia, ci sono alcune variazioni che VERIFIZER non catturerà.
Il programma ignora gli spazi: puoi inserire tutti gli spazi che desideri tra le parole chiave o lasciarli fuori del tutto senza che il codice venga modificato. Gli spazi sono accettati ovunque purché non dividano le parole chiave. Tieni presente, tuttavia, che potrebbero esserci occasioni in cui il numero di spazi è importante (ad es. in una definizione di stringa), quindi prendi nota di messaggi come [9 spazi] in un elenco, il che significa, naturalmente, inserire 9 spazi , non il numero 9 seguito dalla parola 'spazi'. Un'altra cosa con cui puoi farla franca è l'abbreviazione delle parole chiave. Poiché VERIFIZER esamina i valori dei token, otterrai lo stesso risultato se digiti "nE" o "next".
Come usare VERIFIZER Il Listato 1 contiene due versioni del programma VERIFIZER: una per PET e una per C64/VIC. Questi elenchi appariranno in tutti i numeri d'ora in poi. Noterai che il listato del VERIFIZER ha anch'esso stampato in formato "verificato" (con i codici del rapporto lungo il lato sinistro), il che sembra piuttosto sciocco, dal momento che non avrai il VERIFIZER mentre stai digitando il programma. I codici ci sono solo come controllo, in modo che una volta che il VERIFIZER è attivo e funzionante puoi premere INVIO su alcune righe di programma e vedere se i codici riportati corrispondono a quelli stampati con l'elenco.
Digitare il programma ed eseguirlo. Se ricevi il messaggio, “*****data error *****'', ricontrolla il programma e continua a provare finché tutto non va bene. Dovresti SALVARE il programma, poiché vorrai usarlo ogni volta che accedi a uno dei nostri programmi. Dopo aver ESEGUITO il loader, inserisci NEW, quindi attiva VERIFIZER con: SYS 828 per abilitare la versione C64/VIC (disattivarlo con SYS 831 ) o SYS 634 per abilitare la versione PET (disattivarlo con SYS 637) Una volta che VERIFIZER è in funzione, ogni volta che si preme INVIO il codice di rapporto di due lettere apparirà nelle prime due posizioni dello schermo nel campo inverso. Nota che queste lettere sono in maiuscolo e appariranno come caratteri grafici a meno che tu non sia in modalità maiuscolo/minuscolo (premi MAIUSC/Commodoro su C64/VIC). Se premi INVIO su una riga dello schermo che non contiene una riga di programma BASIC (cioè nessun numero di riga all'inizio), il codice che otterrai è imprevedibile: VERIFIZER viene utilizzato solo per segnalare sulle righe di programma BASIC.
Con VERIFIZER in funzione, è sufficiente digitare il listato, controllando ogni codice di rapporto dopo aver premuto INVIO su una riga. Se il codice non corrisponde, puoi ricontrollare e correggere la riga, quindi riprovare. Se lo desideri, puoi ELENCARE un intervallo di righe, quindi digitare INVIO su ciascuna in successione controllando i codici di rapporto man mano che appaiono. Se hai l'abitudine di rinumerare segmenti di un programma mentre lo digiti, preparati a codici non corrispondenti, poiché VERIFIZER utilizza il numero di riga come parte del calcolo del checksum. Una volta che il programma è stato inserito correttamente, assicurarsi di spegnere VERIFIZER con il sistema sopra indicato prima di fare qualsiasi altra cosa.
VERIFIZER risiede nel buffer della cassetta, quindi se stai usando un datassette tieni presente che le operazioni su nastro possono danneggiare il nastro. Per quanto riguarda la compatibilità con altre utilità, VERIFIZER non dovrebbe causare alcun problema poiché funziona tramite il collegamento di avvio a caldo BASIC e salta alla destinazione originale del collegamento dopo che è terminato. Quando disabilitato, ripristina il collegamento al suo contenuto originale.
Come usare VERIFIZER VERIFIZER genera il codice di report su un'entità di checksum, ma assegna "pesi" a ciascun byte per rilevare gli errori di trasposizione. Alla riga BASIC tokenizzata vengono assegnati i pesi 1,2,3,4 e viene aggiunto il byte basso del numero di riga. In altre parole, si ottiene un checksum prendendo il byte basso del numero di riga, sommando 1 volta il primo byte nella riga BASIC (dal buffer di input BASIC a $ 0200), 2 volte il secondo, 3 volte il terzo, 4 volte il quarto, quindi 1 volte il quinto, ecc. Il checksum finale è un intero senza segno di due byte. Il byte alto viene scartato e i nybble basso e alto del byte basso vengono utilizzati per formare i due caratteri del codice di rapporto, che vengono inseriti direttamente nella memoria dello schermo nella versione PET e stampati sullo schermo con la versione VIC/C64.
Poiché viene utilizzato solo il byte basso, le varianze del checksum di multipli esatti di 256 non verranno rilevate, ma la probabilità che si verifichi come errore legittimo è stata giudicata ragionevolmente piccola. Ad esempio, se hai inserito "accidentalmente" il numero di riga 1256 anziché 1000, non ci sarebbero discrepanze nei codici del rapporto. Tuttavia, se sei così scoordinato, non provare nemmeno a digitare i programmi: prendi il disco.
VERIGEN: generatore di programmi VERIFIZER Dall'altra parte della storia di VERIFIZER, c'è VERIGEN per creare un file sequenziale verificato da un programma. La versione che utilizziamo include caratteri di controllo speciali nel file di output per il tipografo, ma la versione mostrata qui (elenco 2) crea semplicemente un file sequenziale che fornisce l'elenco del programma con numeri di riga separati dai codici del verificatore da un singolo spazio.
A che serve VERIGEN per te? Bene, se hai una stampante e ti piace archiviare gli elenchi dei programmi come backup finale, potresti averli in forma verificata se dovesse arrivare il giorno in cui tutti i tuoi dischi si trasformano istantaneamente in polvere elettrica. Oppure, se hai un 64 con un drive 1541 e vuoi dare un programma a un proprietario di PET che ha un 8050, puoi dargli un elenco verificato (supponendo, ovviamente, che abbia una copia di VERIFIZER).
Come usare VERIGEN VERIGEN gira su un C64 e funziona con due file su disco, "infil" e "outfil". Prima di eseguire VERIGEN, il programma da verificare deve essere in memoria e un elenco di quel programma deve essere su disco come file sequenziale denominato " infil ". Per creare infil, inserisci quanto segue dopo che il programma di input per Verigen è in memoria: open8,8,8, * @0:infil,s,w ’ : cmd8: list print#8: close1 Dopo che "infil" è stato impostato in questo modo, basta digitare sys49152 per eseguire VERIGEN. Verrà creato il file "outfil", che sarà un file di disco sequenziale contenente l'elenco del programma con i codici di verifica prima dei numeri di riga. "Outfil" può essere inviato a una stampante o modificato come qualsiasi file di testo sequenziale (cioè caricato in un word processor).
VERIFIZER farà in modo che il programma che digiti imiti quello nell'elenco, ma non può garantire che il programma elencato sia privo di bug. Quindi, se VERIFIZER dice che un programma è OK e continua a non funzionare, puoi inviarci una riga senza preoccuparti che il problema possa essere con la tua digitazione."
VERIFIZER
VERIGEN
0 REM THE TRANSACTOR VOLUME 5 ISSUE 06 PAGE 12 10 REM* DATA LOADER FOR "VERIGEN" * 15 REM RUNS ON C64 20 CS=0 30 FOR I=49152 TO 49410:READ A:POKE I,A 40 CS=CS+A:NEXT I 50 : 60 IF CS<>36235 THEN PRINT"***** DATA ERROR *****": END 70 REM SYS 49152 80 END 100 : 1000 DATA 169, 1, 162, 8, 160, 12, 32, 186, 255 1010 DATA 169, 11, 162, 235, 160, 192, 32, 189, 255 1020 DATA 32, 192, 255, 32, 183, 255, 240, 1, 96 1030 DATA 169, 2, 162, 8, 160, 13, 32, 186, 255 1040 DATA 169, 13, 162, 246, 160, 192, 32, 189, 255 1050 DATA 32, 192, 255, 32, 183, 255, 240, 1, 96 1060 DATA 165, 43, 133, 254, 165, 44, 133, 255, 160 1070 DATA 0, 162, 1, 32, 198, 255, 32, 228, 255 1080 DATA 32, 228, 255, 177, 254, 208, 12, 200, 208 1090 DATA 2, 230, 255, 177, 254, 208, 8, 76, 214 1100 DATA 192, 200, 208, 2, 230, 255, 200, 208, 2 1110 DATA 230, 255, 177, 254, 133, 251, 200, 208, 2 1120 DATA 230, 255, 200, 208, 2, 230, 255, 169, 0 1130 DATA 133, 252, 177, 254, 170, 201, 32, 240, 15 1140 DATA 230, 252, 165, 252, 41, 3, 133, 253, 32 1150 DATA 228, 192, 198, 253, 16, 249, 200, 208, 2 1160 DATA 230, 255, 138, 208, 226, 162, 2, 32, 201 1170 DATA 255, 165, 251, 41, 15, 24, 105, 193, 32 1180 DATA 210, 255, 165, 251, 74, 74, 74, 74, 24 1190 DATA 105, 193, 32, 210, 255, 169, 32, 32, 210 1200 DATA 255, 162, 1, 32, 198, 255, 32, 228, 255 1210 DATA 72, 32, 183, 255, 201, 0, 208, 16, 162 1220 DATA 2, 32, 201, 255, 104, 32, 210, 255, 201 1230 DATA 13, 208, 227, 76, 75, 192, 104, 32, 204 1240 DATA 255, 169, 1, 32, 195, 255, 169, 2, 32 1250 DATA 195, 255, 96, 138, 24, 101, 251, 133, 251 1260 DATA 96, 48, 58, 73, 78, 70, 73, 76, 44 1270 DATA 83, 44, 82, 64, 48, 58, 79, 85, 84 1280 DATA 70, 73, 76, 44, 83, 44, 87