--- title: "T/S 2068 BASIC Toolkit" id: 72765 type: "computer_media" slug: "t-s-2068-basic-toolkit" url: "http://localhost/computer_media/t-s-2068-basic-toolkit/" markdown_url: "http://localhost/computer_media/t-s-2068-basic-toolkit.md" published_at: "2026-10-27T12:29:14+00:00" modified_at: "2026-10-27T12:29:14+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/tk-c.png" excerpt: "A machine code toolkit for BASIC programmers that renumbers lines and their references, finds and replaces strings, dumps all variables and strips REM lines." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "J. C. Kilday Associates" slug: "j-c-kilday-associates" taxonomy: "post_tag" url: "http://localhost/tag/j-c-kilday-associates/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "John C. Kilday" slug: "john-c-kilday" taxonomy: "indiv" url: "http://localhost/indiv/john-c-kilday/" genre: - name: "Programming" slug: "programming" taxonomy: "genre" url: "http://localhost/type/programming/" media_type: "Program" programmers: - name: "John C. Kilday" slug: "john-c-kilday" taxonomy: "indiv" url: "http://localhost/indiv/john-c-kilday/" download_url: "https://archive.org/download/timex-sinclair-software-archive/T-S%202068%20BASIC%20Toolkit%20%281984%29%28J.%20C.%20Kilday%20Associates%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "T-S 2068 BASIC Toolkit (1984)(J. C. Kilday Associates)(TS2068)(US)(Program)/T-S 2068 BASIC Toolkit (1984)(J. C. Kilday Associates)(TS2068)(US)(Program).tap" mediadate: "1984" producer_company: - id: 10966 title: "J. C. Kilday Associates" type: "company" url: "http://localhost/company/j-c-kilday-associates/" images: - url: "http://localhost/wp-content/uploads/2026/10/tk-c.png" - url: "http://localhost/wp-content/uploads/2026/10/tk-h.png" - url: "http://localhost/wp-content/uploads/2026/10/tk-d.png" related_products: - id: 37142 title: "TS2068 BASIC Toolkit" type: "product" url: "http://localhost/product/ts2068-basic-toolkit/" related_content: - id: 55034 title: "Zeal Disassembler" type: "computer_media" url: "http://localhost/computer_media/zeal-disassembler/" media_type_tags: "Programming" license: false --- # T/S 2068 BASIC Toolkit 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 TO`s. 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 `CLEAR` followed by `NEW` leaves 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 a `PRINT` string 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 NEW ```