[img] Tape catalog
 MDFS::Info.Comp.Spectrum.Code.Tape.tapecat/htm Search  
\ Tape catalog routine
\ ====================

TapeBuffer=&5BEF

.TapeCat
LD BC,3
.TapeCatLp
LD IX,TapeBuffer
LD DE,17:PUSH BC
XOR A:SCF:CALL &0556  :\ LD_BYTES
POP BC                :\ BC=column number
BIT 5,(IY+1):RET NZ   :\ Key pressed
JR NC,TapeCatLp       :\ Loop for another header
LD HL,TapeBuffer+1
LD B,10
.TapeName
LD A,(HL):RST &10     :\ Print filename
INC HL:DJNZ TapeName
DEC C:JR Z,TapeCat
LD A,32:RST &10       :\ Pad between columns
JR TapeCatLp

\ This can be used from Basic as follows
\
\  310 REM Create the machine code:
\  320 FOR a=23300 TO 23341:READ b:POKE a,b:NEXT a
\  330 DATA 1,3,0,221,33,239,91,17,17,0,197,175,55,205,86,5,193
\  340 DATA 6,10,253,203,1,110,192,48,233,33,240,91,126,215,35
\  350 DATA 16,251,13,40,219,62,32,215,24,217
\
\ 1100 REM Display tape catalog
\ 1110 IF USR 23300<3 THEN PRINT
\ 1120 IF INKEY$<>"" THEN GOTO 1120
\ 1130 PAUSE 1:PRINT#0;"Press SPACE to continue":PAUSE 0:INPUT;:RETURN

Demo of tape catalog

Best viewed with Any Browser Valid HTML 4.0! Authored by J.G.Harston
Last update: 19-Nov-2019