Classic Computer Magazine Archive COMPUTE! ISSUE 26 / JULY 1982 / PAGE 12

VIC Fast-Find

I need your help with a small problem. I entered the BASIC code for the cassette tape to locate programs on fast-forward as shown on Page 14 of the April, 1982, COMPUTE!, and, although you claim that it "can be adapted to any Commodore machine," I can't get it to run on the VIC-20.

I suspect that the memory addresses in the PEEK and POKE statements for the Commodore PET are different than the VIC-20, but since I don't own the PET, I don't know how to convert these few memory addresses to the VIC-20.

Since there are only three BASIC statements that refer to memory addresses, could you inform me what the VIC-20 equivalent addresses would be.

I believe that COMPUTE! has a wide following among VIC-20 owners and that this data would be of interest to many readers.

William E. Bender

You're right, POKEs, PEEKs, and SYSs are the least "portable" aspect of BASIC. When you try to translate a program written for one computer model or brand, these words are sure to give you problems. The following version of tape Fast Find for VIC, by Associate Editor Harvey Herman, was originally published last fall. It makes for an efficient tape management system, but must be the first program on each tape.

100 REM VIC FAST FIND
110 REM
120 REM HARVEY B. HERMAN
130 REM
140 N = 5 : DIM A$ (N): REM N IS # OF PROGRAMS ~ ON TAPE
150 FOR I = 1 TO N : READ A$(I) : NEXT I
160 PRINT CHR$(147); CHR$(144); " PROGRAM" : : PRINT : PRINT "NUMBER NAME" : PRINT
170 FOR I = 1 TO N : PRINT I;"    " ;A$(I) : NEXT I : PRINT
180 INPUT "FIND NUMBER" ;J : PRINT
190 IF J<1 OR J>N THEN 160
200 IF J = l THEN 330
210 REM START OF ROUTINE TO FAST FORWARD
220 REM WAIT FOR RELEASE IF NECESSARY
230 IF(PEEK(37151) AND 64) = 0 THEN PRINT " PRESS STOP ON CASSETTE"
240 IF(PEEK(37151) AND 64) = 0 THEN 240
250 PRINT "PRESS FAST FORWARD" : PRINT
260 IF(PEEK(37151) AND 64) = 64 THEN 260 : REM CHECK FOR PRESS
270 PRINT "OK" : PRINT : A = TI
280 IF ABS(TI - A) < (J - 1) * 360 THEN 280 : REM FAST FORWARD 6 SEC PER PROGRAM
290 POKE 37148, PEEK(37148) AND 247 : REM STOP MOTOR
300 PRINT "RELEASE FAST FORWARD"
310 IF(PEEK(37151) AND 64)= 0 THEN 310 : REM WAIT FOR RELEASE
320 REM DYNAMIC KEYBOARD LOAD
330 PRINT CHR$(147); CHR$(17); CHR$(17); CHR $(17); "LOAD" ;CHR$(34); A$(J); CHR $(34) ;CHR$(19)
340 POKE 198, 1 : POKE 631, 13 : END
350 DATA PROGRAM 1, PROGRAM 2, PROGRAM 3, PROGRAM 4, PROGRAM 5