Multi-Tape

Author(s): Bob Malloy
Publication: LISTing Newsletter
Date: January 1986
Pages: 4

Here’s Bob Malloy‘s “multi-tape” program. With it, you can get a full catalog of all the programs on a tape. Instructions are in the program. You can enter and use the routine now or wait for Library tape #5.

   1 PRINT "If you have numerous
programs on a tape,e.g.LIST li
brary tapes, this program may h
elp. It uses the header reade
r from SYNTAX and saves the d
ata in arrays c, n$, t$. (Up t
o 300 programs)"
2 PRINT '"The first time use
option 5 from menu. Thereafter
use option 4 BUT you must CLEA
R 63999 before loading the tape
to use option 4! You can stop
reading headers anytime by pre
ssing BREAK."
3 PRINT '"Program will read b
oth 2068 and Spectrum headers b
ut will only run on a 2068": P
RINT '"To get hard copy from op
tions 1,2,3,7 & 8 turn printer
on beforemaking selection"
4 PRINT '"If program stops wi
th an error enter GOTO 55 (Do
not use RUN) DELETE lines 1 to
4 when you arefamiliar with th
ese instructions"
5 ON ERR RESET
6 PRINT ''''''"multi tape by
RWM": PRINT '''"Press any key f
or menu": PAUSE 0
9 GO TO 55
10 CLS : FOR l=1 TO n
20 PRINT l;TAB 3;t$(l,16 TO 27
),n$(l)
21 LPRINT l;TAB 3;t$(l,16 TO 2
7),n$(l)
30 NEXT l
40 STOP
50 SAVE "multi tape" LINE 55
55 ON ERR GO TO 5
56 LET dir=0
60 CLS : PRINT '"Choose your o
ption by number"
65 PRINT '"1. List all program
s "
68 PRINT '"2. Find a specific
program"
72 PRINT '"3. List all program
s on'a specific tape"
75 PRINT '"4. Continue catalog
ing tapes"
78 PRINT '"5. Start cataloging
tapes"
80 PRINT '"6. SAVE"
81 PRINT '"7. See header readi
ngs"
82 PRINT '"8. Show names of ta
pes"
83 PRINT '"0. STOP"
85 IF INKEY$="1" THEN GO TO 1
0
88 IF INKEY$="2" THEN GO TO 1
00
90 IF INKEY$="3" THEN GO TO 2
00
92 IF INKEY$="4" THEN GO TO 9
850
93 IF INKEY$="5" THEN GO TO 9
970
94 IF INKEY$="6" THEN SAVE "m
ulti tape" LINE 1
95 IF INKEY$="7" THEN GO TO 4
00
96 IF INKEY$="8" THEN GO TO 5
00
97 IF INKEY$="0" THEN PRINT "
Enter GOTO 55 to Restart":
ON ERR RESET : STOP
  98 GO TO 85
100 CLS : INPUT "Name of progra
m? ";s$
110 FOR q=1 TO n
120 IF t$(q,18 TO (LEN s$+17))=
s$ THEN PRINT q;TAB 5;t$(q,18
TO );n$(q): PRINT
121 IF t$(q,18 TO (LEN s$+17))=
s$ THEN LPRINT q;TAB 5;t$(q,18
TO );n$(q)
130 NEXT q
140 STOP
200 CLS : LET dir=1: GO SUB 500
: INPUT "Name/side of tape? ";s
$
210 FOR q=1 TO n
220 IF n$(q, TO LEN s$)=s$ THEN
PRINT q;TAB 4;t$(q,18 TO );n$
(q);t$(q, TO 3)
221 IF n$(q, TO LEN s$)=s$ THEN
LPRINT q;TAB 4;t$(q,18 TO );n
$(q)
230 NEXT q
240 STOP
300 CLS : FOR l=1 TO n
310 PRINT l;TAB 3;t$(l)
311 LPRINT l;TAB 3;t$(l)
320 NEXT l
330 STOP
340 STOP
400 INPUT "Number Please? ";b
410 CLS : FOR l=1 TO n
420 IF l=b THEN PRINT 'l;TAB 4
;t$(l): PRINT '"Start Address "
;c(l,2): PRINT '"Data Length ";
c(l,1): PRINT '"Auto Start at "
;c(l,3): PRINT '"Prog/Vars Leng
th ";c(l,4)
421 IF l=b THEN LPRINT 'l;TAB
4;t$(l): LPRINT '"Start Address
";c(l,2): LPRINT '"Data Length
";c(l,1): LPRINT '"Auto Start
at ";c(l,3): LPRINT '"Prog/Vars
Length ";c(l,4)
430 NEXT l
440 STOP
500 CLS : PRINT n$(1)
501 LPRINT n$(1)
510 FOR l=2 TO n
520 IF n$(l)<>n$(l-1) THEN PRI
NT n$(l)
521 IF n$(l)<>n$(l-1) THEN LPR
INT n$(l)
530 NEXT l
535 IF dir=1 THEN LET dir=0: R
ETURN
540 STOP
9850 CLS : INPUT "Did you rememb
er to CLEAR 63999 before loadin
g this tape? Y/N ";c$
9855 IF c$="Y" OR c$="y" THEN G
O TO 9870
9860 IF c$="N" OR c$="n" THEN P
RINT AT 10,1;"Please CLEAR 6399
9 and reload this tape": ON ERR
RESET : STOP
9865 GO TO 9850
9870 RESTORE : FOR a=64000 TO 64
052: READ b: POKE a,b: NEXT a
9873 INPUT "Name/Side of tape ";
p$: GO TO 9975
9970 CLS : CLEAR 63999: FOR a=64
000 TO 64052: READ b: POKE a,b:
NEXT a
9971 REM c(n,1)=DataLength, c(n,
2)=Start Address, c(n,3)=Auto S
tart, c(n,4)=Prog/vars length
9972 DIM c(300,4): DIM n$(300,13
): DIM t$(300,28)
9973 INPUT "Name/Side of tape ";
p$
9974 FOR n=1 TO 300
9975 CLS : PRINT ''''"LOAD A TAP
E AND PRESS""PLAY"""''''
9977 LET n$(n)=p$
9980 DATA 55,62,0,221,33,60,250,
17,17,0,205,14,250,201,33,252,0
,205,34,250,58,33,250,211,244,2
19,255
9981 DATA 203,191,211,255,251,20
1,0,243,245,219,255,203,255,211
,255,219,244,50,33,250,62,1,211
,244,241,233
9982 RANDOMIZE USR 64000
9983 LET a=64060: LET b=PEEK a:
LET s=b
9984 IF b=0 THEN PRINT "PROGRAM
: ";: LET t$(n, TO 17)="PROGRAM
"
9985 IF b=1 THEN PRINT "NUMERIC
ARRAY: ";: LET t$(n, TO 17)="N
UMERIC ARRAY"
9986 IF b=2 THEN PRINT "CHARACT
ER ARRAY: ";: LET t$(n, TO 17)=
"CHARACTER ARRAY"
9987 IF b=3 THEN PRINT "BYTES:
";: LET t$(n, TO 17)="BYTES"
9988 FOR a=64061 TO 64070: LET b
=PEEK a: PRINT CHR$ b;: LET t$(
n,a-64043)=CHR$ b: NEXT a: PRIN
T
9989 LET b=PEEK a+256*PEEK (a+1)
: PRINT "DATA LENGTH: ";b: LET
c(N,1)=b
9990 LET a=a+2: LET b=PEEK a+256
*PEEK (a+1): IF s=3 THEN PRINT
"START ADDRESS: ";b: LET c(n,2
)=b
9991 IF s<>0 THEN GO TO 9995
9992 IF b<1 OR b>9999 THEN GO T
O 9994
9993 PRINT "AUTO START AT: ";b:
LET c(n,3)=b
9994 LET a=a+2: LET b=PEEK a+256
*PEEK (a+1): PRINT "PROG/VARS L
ENGTH: ";b: LET c(n,4)=b
9995 PAUSE 200: NEXT n: GO TO 99
75

Transcription note: The last 8 of 2068 in line 3 is broken and looks like a 3. It is the same broken 8 as in the line numbers, and is typed 2068.

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