T/S 2068 BASIC Toolkit is a machine code utility for people writing BASIC programs. It sits at the top of memory, out of the way of the program being worked on, and is called up with RANDOMIZE USR 62000. A lettered menu offers five functions: L renumbers the program, F finds a string and lists every line that contains it, R replaces one string with another throughout the program, D lists all the variables with their current values, and K deletes every REM line.
The renumber asks for a specification of up to three numbers: the first new line number, the step between lines, and the existing line to start from. ENTER takes the defaults. It also corrects the line numbers in GO TO, GO SUB, RESTORE, LIST, RUN and SAVE … LINE statements, and afterwards lists any lines whose targets it could not resolve, such as computed GO TOs. It refuses a specification that would push a line number past 9999. The variable dump shows numbers, strings and every element of an array, and for a FOR loop variable also its limit, step and loop line and statement.
The title screen reads “T/S 2068 BASIC TOOLKIT © 1984 J.C. Kilday Associates”, with the company’s Peaks Island, Maine address. The same company published the Zeal Disassembler. The toolkit was sold for $19.95 in 1985 (see the product listing). This copy comes from Don Lambert’s Oliger disk “testdisk”, where it is the two files Tools (the loader) and tools code.
Program Analysis
Loader
Tools is seven lines long. Line 10 does CLEAR 61572 and loads tools code (3,789 bytes) at 61573, just above the new RAMTOP. The next lines print the instructions, then the loader waits for a key and executes NEW. Because NEW keeps everything above RAMTOP, the toolkit survives in memory while you type in or load the program you want to work on, and RANDOMIZE USR 62000 brings up the menu at any time.
The functions
- L, line renumber: the specification is typed as
ffff ssss bbbb(first new number, step, current line to start from). Leading zeros may be left off. - F, find string: lists every line containing the text. To search inside quoted strings, the search text must start with
"". - R, replace string: asks for the search text and then the replacement, and changes every occurrence.
- D, dump variables: lists simple variables, strings, arrays element by element, and FOR loop variables with their current value, limit, step and loop position.
- K, kill REM lines: removes every line that starts with REM, to save memory and loading time in a finished program.
Notable Techniques
- The loader’s
CLEARfollowed byNEWleaves the machine code protected above RAMTOP while a fresh program is entered below it. - The renumber rewrites the line number references inside statements as well as the line numbers themselves, and reports the references it cannot fix.
- The menu and every prompt are printed by the machine code itself, so the toolkit uses no BASIC of its own once it is loaded.
Potential Issues
- The copyright sign in the title screen is character 127, which the TS2068 ROM displays as the keyword
RESET, so the title reads “RESET 1984” on a 2068. - Find did not match text inside REM lines in testing. It appears to skip REM text.
- Text in quotes is only found when the search starts with
"", as the prompt says, so a plain search for a word that only appears in aPRINTstring finds nothing.
The two files come from an Oliger (JLO SAFE) disk. For tape, the only change was removing the Oliger slash from the loader’s LOAD /"tools code"CODE. It was tested in ZEsarUX on a stock TS2068 with a small test program: the menu, renumbering (with GO TO and GO SUB targets updated), find, replace, the variable dump and REM removal all worked.
Source Code
10 CLEAR 61572: LOAD "tools code"CODE
15 PRINT AT PI,5;"T/S 2068 BASIC Toolkit"
20 PRINT ''"A ""NEW"" command will be executedautomatically upon pressing any key. Then you may key in or"," LOAD your BASIC program."
50 PRINT ''" To run Toolkit, use:",,," RANDOMIZE USR 62000"
60 IF INKEY$="" THEN GO TO 60
70 NEWNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


