--- title: "XLATE" id: 72260 type: "computer_media" slug: "xlate" url: "http://localhost/computer_media/xlate/" markdown_url: "http://localhost/computer_media/xlate.md" published_at: "2026-10-23T07:47:24+00:00" modified_at: "2026-10-23T07:47:24+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/xlate-1.png" excerpt: "Four machine code routines that convert BASIC programs between the TSXmodem and SPECTERM-64 upload formats, so either terminal's downloads can be loaded and run." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - 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: "Kurt A. Casby" slug: "kurt-a-casby" taxonomy: "indiv" url: "http://localhost/indiv/kurt-a-casby/" genre: - name: "Terminal" slug: "terminal" taxonomy: "genre" url: "http://localhost/type/terminal/" media_type: "Program" programmers: - name: "Kurt A. Casby" slug: "kurt-a-casby" taxonomy: "indiv" url: "http://localhost/indiv/kurt-a-casby/" download_url: "https://archive.org/download/timex-sinclair-software-archive/XLATE%20%28198x%29%28Casby%2C%20Kurt%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "XLATE (198x)(Casby, Kurt)(TS2068)(US)(Program)/XLATE (198x)(Casby, Kurt)(TS2068)(US)(Program).tap" mediadate: "1988" images: - url: "http://localhost/wp-content/uploads/2026/10/xlate-1.png" related_products: - id: 37122 title: "XLATE" type: "product" url: "http://localhost/product/xlate/" media_type_tags: "Terminal" license: false --- # XLATE Converts BASIC programs between the two upload formats used by TS2068 modem owners, so a program uploaded with either terminal package can be used by the other. TSXmodem (an MTERM II utility) sends a BASIC program as a CODE file with no header, while SPECTERM-64 sends it with a header attached. XLATE is 535 bytes of machine code loaded with `CLEAR 64999: LOAD "XLATE"CODE 65000,535`. Once it is in memory its four routines can be used as often as needed without reloading. XLATE was written by Kurt Casby and released into the public domain. The documentation, included in the download as a text file, was written by Ed Grey. It says the code will not run on a Spectrum or on a TS2068 in Spectrum mode, though Spectrum files moved by either terminal program can be converted with XLATE on the TS2068. ## Program Analysis ### The four routines All four are called with `RANDOMIZE USR` and work through a buffer at address 30000. - `USR 65000`: SPECTERM-64 to BASIC. Load the downloaded program, saved as CODE with its header, at 30000 (`LOAD "name"CODE 30000`), then call the routine. The header is removed and the program appears in the BASIC area, ready to RUN, LIST or SAVE. - `USR 65100`: BASIC to SPECTERM-64. With a BASIC program in memory, the routine builds a header and turns the program into a CODE block starting at 30000, and the BASIC program disappears. The header names the file “program!”. The docs give `PRINT (PEEK 30011+256*PEEK 30012)+32` for the block length to use with `SAVE "name"CODE 30000,length`. Carl Forst’s public domain RENAMER program can change the name in the header. - `USR 65200` and `USR 65300`: TSXmodem to BASIC. Call `USR 65200`, load the headerless TSXmodem file with `LOAD "name"CODE 30000`, then call `USR 65300` and the BASIC program appears. After a conversion to BASIC a flashing cursor is left in the first program line. The docs say it has no effect, and pressing ENTER clears it. ### This release The tape holds a short BASIC loader followed by the XLATE code. The loader was written for this release. It clears RAMTOP to 64999, loads the code at 65000, and lists the four routine addresses. The listing shown on this page is that loader, not part of Casby’s original. The zip also holds the two original transfer files, `XLATE.TSX` (TSXmodem format) and `XLATE.SPX` (SPECTERM-64 format, the same 535 bytes behind a 32-byte header), and Ed Grey’s documentation. ## Notable Techniques - The code was distributed in both transfer formats, so users of either terminal could download it and save it to tape. - Placing the code at the top of memory, above `CLEAR 64999`, leaves it in place through `NEW` and lets the conversion routines replace the BASIC program freely. ## Potential Issues - The conversion buffer starts at 30000, so it appears that a program has to fit between 30000 and 64999 to be converted. - `USR 65100` replaces the BASIC program in memory, so save a copy first if you need it. XLATE came from the CATUG_PDL_A Oliger (JLO SAFE) disk, where it existed only as the two transfer files and a documentation file. For tape, the code was taken from the transfer files and saved after the new loader, and the documentation was converted to text with the author’s home address removed. It was tested in ZEsarUX: `USR 65100` converted a test program into a “program!” header and BASIC block at 30000. ## Source Code ``` 10 REM XLATE by Kurt Casby (public domain); docs by Ed Grey 20 BORDER 7: PAPER 7: INK 0: CLS 30 PRINT AT 1,13;"XLATE": PRINT AT 2,4;"TSXmodem <-> SPECTERM-64" 40 PRINT AT 4,0;"Loading XLATE CODE 65000,535..." 50 CLEAR 64999: LOAD "XLATE"CODE 65000,535 60 CLS: PRINT AT 1,13;"XLATE": PRINT AT 3,0;"Code is at 65000. Routines:" 70 PRINT '"USR 65000 SPECTERM-64 CODE file"'" (header, at 30000) to"'" BASIC" 80 PRINT '"USR 65100 BASIC to SPECTERM-64"'" CODE file at 30000" 90 PRINT '"USR 65200 then LOAD a TSXmodem"'" BASIC CODE file" 100 PRINT '"USR 65300 TSXmodem to BASIC" 110 PRINT '"See the docs in the zip for"'"details. Use RANDOMIZE USR n." 120 STOP ```