This program is a loader utility for the Turboloader machine code routine, a variable-rate tape transfer system supporting baud rates from 1500 to 3500 in steps of 200. The BASIC stub prompts the user for a base address (up to 63380), loads the machine code block called “turbo” from tape at that address, and reports the entry point as base+220. After loading, it clears the screen, lists the embedded documentation held in REM statements (lines 10–80), pauses for a keypress, then issues CLEAR to set the top of BASIC memory just below the loaded code. The REM lines serve as an in-program manual, detailing Turboloader’s LIST, RUN, INPUT, and PRINT sub-commands, which control header display, baud rate selection, start-tape messaging, and load/verify output respectively.
Program Structure
The program is divided into two clear regions. Lines 10–80 are pure REM statements that function as an embedded user manual, documenting the Turboloader machine code’s sub-commands, valid baud rate range, and default settings. Lines 90–140 are the executable BASIC stub that performs the actual load and setup sequence.
- Line 90: Clears the screen and prompts for the load address.
- Line 100: Loads the machine code block named
"turbo"from tape to the specified address. - Line 110: Clears the screen and executes
LIST, which here renders the REM documentation on screen as a built-in help system. - Line 120: Prints the calculated entry point (
start+220). - Line 130:
PAUSE 0holds the display until a key is pressed. - Line 140:
CLEAR start-1protects the loaded machine code by lowering the top of BASIC memory to just below it.
Memory Management Technique
The sequence of LOAD … CODE start followed by CLEAR start-1 is a deliberate and correct ordering. The code is loaded first while BASIC memory is still intact, then CLEAR repositions the RAMTOP pointer to start-1, preventing any subsequent BASIC operations (such as NEW or dynamic variable allocation) from overwriting the machine code block. The entry point arithmetic (start+220) is fixed, meaning the machine code is position-independent only in the sense that the loader routine always begins at a fixed offset of 220 bytes into the block.
REM as Documentation
Lines 10–80 use REM statements extensively to embed a formatted help page directly in the program. Executing LIST at line 110 causes these remarks to scroll on screen, giving the user immediate reference material without any separate PRINT logic. The padding characters at the start of several REM lines (rendered from \\{8} escapes, character code 8) are backspace control codes embedded in the listing, likely an artifact of how the original text was entered rather than intentional formatting.
Turboloader Sub-Command Summary
The REM documentation describes four sub-commands passed to RANDOMIZE USR base+220:
| Command | Parameter | Effect |
|---|---|---|
LIST | — | Reads a tape header and prints it on screen |
RUN | 1500–3500 (step 200) | Sets the baud rate for transfers |
INPUT | 0, 1, or 2 | Controls “start tape” message and keypress wait on saves |
PRINT | 0 or 2 | Controls display of names during load/verify; default is 2 |
Notable Observations
- The address constraint “up to 63380” leaves enough room above the machine code block before the UDG/system area at the top of RAM.
- The
INPUTprompt on line 90 does not validate the entered address, so values above 63380 or overlapping system RAM could corrupt memory. - The
LISTcall at line 110 is an elegant dual-use of a built-in command: it both displays the help text and avoids the need for many individualPRINTstatements. - The copyright symbol in line 10 (
\\*) renders as © in the TS2068 character set, crediting the original author inline in the REM.
Source Code
10 REM \{20}\{1} 2060 TURBOLOADER \{20}\{0} \* 1986 Esben Krag Hansen Adapted to TS2068 by Floyd Chrysler, Toronto
20 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}Turboloader allows programs or code to be saved, loaded, etc. to tape at variable baud rates.
30 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}To use Turboloader, first invokeit with;RANDOMIZE USR base+220 followed by a colon and;
40 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}ONE OR MORE TURBOLOADER COMMANDS LIST - Reads a header and prints it on screen RUN - Changes the baud rate. Must be in range of 1500 to 3500 in step of 200 (eg-1500, 1700, 1900, etc.)
50 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}*** Some tape recorders can't handle the higher rates. INPUT - This deals with message 'start tape' on saves. INPUT 2 prints the turboloader message and 'start tape' mess. and waits for key.
60 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}INPUT 1 prints the turboloader message only and waits for keINPUT 0 prints nothing and does not wait for a keypress.
70 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}PRINT - This deals with load/ verify commands. PRINT 2 prints turboloader mess. and names as they are found PRINT 0 prints nothing. PRINT 2 andINPUT 2 are the default values.
80 REM \{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}\{8}Followed by another colon and a tape command; LOAD, SAVE, MERGE,or VERIFY .
90 CLS :INPUT "Start address (up to 63380) ";start
100 LOAD "turbo"CODE start
110 CLS :LIST
120 PRINT "TURBOLOAD ENTRY IS: ";start+220''"(base+220)"
130 PAUSE 0
140 CLEAR start-1
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.