Tape Transfer Utility helps move software from cassette to the Rotronics Wafadrive, a stringy-floppy drive for the ZX Spectrum. It has three options. READ HEADER loads the next header from tape and shows the file’s type, name, length, and either its auto-run line or its start address. RECLAIM RAM de-initialises the Wafadrive operating system and gives its memory back to BASIC. STOP loads a BASIC program from tape without letting it auto-run, even if it is protected against MERGE, and shows the line it would have started from.
The program was printed in Time Designs, July/August 1988, page 27, “supplied to TIME DESIGNS by Dave Maccarone, a former authorized distributor of the Rotronics Wafadrive”. The magazine notes that it is for the Spectrum or the Spectrum-emulated Timex Sinclair 2068: its machine code calls Spectrum ROM routines.
Program Analysis
Line 1000 pokes 86 bytes of machine code from DATA into the printer buffer at 23320. The header reader (called at 23320) loads a 17-byte header into 23296 with the ROM’s LD-BYTES at 1366; the BASIC then decodes it (lines 120–180). The RAM routine (23340) appears to switch off the Wafadrive system, restore the system variables and reclaim its workspace through the ROM, and the STOP routine (23369) loads a program with its auto-run line suppressed. As the article says, the routines are relocatable, and the BASIC saves memory with VAL "...", SGN PI and NOT PI in place of numbers.
Potential Issues
- It runs only on a Spectrum, or a TS2068 in Spectrum emulation; on a TS2068 in its own mode the ROM calls go to the wrong places.
The copy on the Larken disk had lost lines 130–180, the part of READ HEADER that displays what it has read, so option 1 fell straight through into RECLAIM RAM. They were typed back in from the listing in the magazine. Tested in ZEsarUX as a 48K Spectrum: headers of a program and a CODE file were read and shown.
Source Code
10 PAPER VAL "5": INK NOT PI: BORDER VAL "5": GO SUB VAL "1E3"
20 CLS : PRINT "Enter number:"''''
30 PRINT " 1 READ HEADER"'" - loads header from cassette & displays file attributes."
40 PRINT ''" 2 RECLAIM RAM"'" - de-initializes WOS & reclaims RAM."
50 PRINT ''" 3 STOP "'" - loads BASIC program from cassette, preventing auto- run."
60 LET a$=INKEY$: IF a$<"1" OR a$>"3" THEN GO TO VAL "60"
70 CLS : GO TO VAL "100"*VAL a$
100 REM HEADER READ
110 PRINT " HEADER READ "''"Play tape...": RANDOMIZE USR VAL "23320": CLS : LET a=VAL "23296"
120 LET t=PEEK a: LET a=a+SGN PI
130 PRINT "TYPE:","Program" AND (NOT t);"Number array" AND (t=SGN PI);"String array" AND (t=VAL "2");"Bytes" AND (t=INT PI)
140 PRINT '"NAME:",: FOR n=SGN PI TO VAL "10": PRINT CHR$ (PEEK a);: LET a=a+SGN PI: NEXT n
150 PRINT ''"LENGTH:",PEEK a+256*PEEK (a+1): LET a=a+VAL "2"
160 LET b=PEEK a+256*PEEK (a+1): IF NOT t THEN PRINT '"AUTO-RUN:",: IF b<VAL "1e4" THEN PRINT b
170 IF t=INT PI THEN PRINT '"START:",b
180 PRINT #NOT PI;"Press a key to return to menu": PAUSE NOT PI: GO TO VAL "20"
200 REM RECLAIM
210 PRINT " RECLAIM RAM "
220 GO SUB VAL "2E3": CLEAR : RANDOMIZE USR VAL "23340": GO TO VAL "20"
300 REM STOP
310 PRINT " STOP "''"WARNING! - this program is lost when selected.": GO SUB VAL "2e3"
320 PRINT "The number shown on the screen is the line from which the program would normally auto-run."''"Play tape..."''';USR VAL "23369": STOP
991 CLEAR
1000 RESTORE
1010 DATA 221,33,0,91,221,229,17,17,0,175,55,205,86,5,221,225,48,242,251,201
1020 DATA 219,12,205,46,10,205,159,0,42,99,92,34,101,92,42,146,92,34,104,92,33,182,92,1,244,8,195,232,25
1030 DATA 1,34,0,247,213,221,225,221,54,1,235,221,54,15,128,62,1,50,116,92,205,58,7,62,255,50,68,92,237,75,66,92,205,27,26,207,255
1040 FOR a=VAL "23320" TO VAL "23405": READ B: POKE a,B: NEXT a: RETURN
2000 REM CONTINUE ?
2010 PRINT ''"Press Y to proceed or any other key to return to menu"
2020 PAUSE NOT PI: LET a=PEEK VAL "23560": IF a<>CODE "Y" AND a<>CODE "y" THEN RUN
2030 CLS : RETURN
9989 STOP
9999 SAVE "TPTRNS" LINE 10Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

