Classic Computer Magazine Archive A.N.A.L.O.G. ISSUE 64 / SEPTEMBER 1988 / PAGE 6

Reader
Comment


The Whoops department
    While I greatly enjoyed Charles E Johnson's "Binary Load Pictures" in issue 60 (May '88), I had considerable trouble with Charles Bachand's "The MAC/65 Detokenizer" I've discovered several bugs for which I am enclosing fixes. After carefully typing and rechecking the MAC/65 Detokenizer, I found that:
    1) If an error was made in the filename of the MAC/65 file to be read (like leaving off the device D:, for instance), and then the directory was checked for the correct filename, every filename entered after that continued to return errors, and the program had to be restarted, and the filename reentered correctly on the first try!
    2) All two-byte hexadecimal literals (like $0342 or $E456, for instance) were mangled in the conversion to hex digits (like $0303 or $E404)!
    3) After the file had been detokenized, the output file was never closed, making yet another error every time the program came to Line 1090, where it tried to open the still already open IOCB channel!
    The following lines appear to fix these problems when they replace the lines of the same numbers in the original program.

1090 CLOSE #1:OPEN #1,4,0,A$
1100 GET #1,A:GET #1,BTRAP 40000
1400 IF A=5 THEN GET #1,B:GET #1,
A:L=L-2:GOSUB 1680:A=D:GOSUB
1680:GOTO 1340

1440 A=PEEK(195):IF A=136 THEN
CLOSE #2:GOTO 1070

1755 CLOSE #3:TRAP 40000:RETURN

-Bob Hardy
Chico, CA

    I read and typed in all of your programs (even the ones in Base 16). I also typed in the little harmless four-liner on page 37 of the April '88 issue and found the good of "ERROR 3 AT LINE 20." I found out that the fifth data number in Line 10 is greater than 255 (298 to be exact). I experimented and found out that the following will do the job:

10 DATA 238,198,2,238,198,2,76

-Jason Locke
Levittown, NY