Converting to Timex Sinclair Basic / by Stuart Bird / Wayne Green Books, Peterborough, NH 03485

This book is a guide to “Translating” BASIC programs written for other microcomputers to Sinclair BASIC. The format of “Converting” is said to be “dictionary” style. Hundreds of BASIC commands are cataloged in various chapters, e.g. String Functions, Numeric Fuctions, Loops, Direct Memory Address, Graphics, Matrix Statements, etc… Each contains a dozen or so entries. Thus for each BASIC word in the program you wish to convert, the word is located in the index and the reader if refered to the page where the entry is found.
Each entry is formatted as follows:
1. A heading, which contains the BASIC word plus any synonyms.
2. A brief description of the use and operation of the word in its own version of BASIC.
3. The TS 1000 replacement, i.e., an expression, program line, or more often, a short subroutine, in a generalized form, which exactly or nearly duplicates the action of the non-Sinclair word.
4. Discussion of application. The discussion is generally quite thorough and considers various cases where the replacement may (or may not) work, where modifications are required and other factors. This section includes a specific example of the use of the replacement.
Reading through the bewildering array of functions and commands from the various BASIC dialects makes one appreciate the Sinclair system of a strictly limited number of keywords, easily found on the Sinclair keyboard. Its relatively small vocabulary is not necessarily a drawback, as Mr. Bird points out, given the power and versatility of Sinclair BASIC. In the STRING FUNCTION chapter, he states:
“(The) Sinclair BASIC string slicer is easily the most powerful and convenient string manipulation scheme available…While the Timex/Sinclair 1000 string slicer gobbles up expression such as X*2+3+sinX-VAL Q$ like PAC-MAN… most BASICS only spit these string function arguments back with error codes…
While the book does cover a large number of common BASIC commands, it isnot exhaustive. For instance, some common commands, like HOME (from Applesoft, Commodore, and others) are not included.
My favorite replacement is for DEF-FN in which the function is entered into the program as a string and the VAL command extracts the function value, by a short subroutine.
The book’s cover promotes “Converting” as the “answer to your software shortage,” which puts “an almost endless supply of programs… at your fingertips”. However, if you’re expecting to use the book to churn out hundreds of programs by mechanical substitution of BASIC instructions into programs from back issues of COMPUTE! and BYTE, I think you’ll be disappointed. There are some inherent difficulties in translating programs.
1. Extensive use of PEEK and POKE.
2. CALL and USR. Such programs require memory maps and thorough knowledge of both computers. In some cases, conversion may be impractical in terms of time and energy.
3. Graphics – The low resolution of the Timex display is an inherent limitation of program conversion in some cases. However, Mr. Bird does provide good replacements for cases where high resolution is not critical and also a program to perform Logo-like functions.
Even when these considerations are not problems, word-for-word translating generally does not produce efficient programs. Every computer and every BASIC dialect have their particular strengths and weaknesses. In every case, the original program needs to be broken down and carefully studied before the actual “translation” begins.
At that point, “Converting to Timex/Sinclair BASIC” becomes quite useful. The discussions of the commands helps the programmer to understand what the original programis intended to do.
All in all, “Converting to Timex/Sinclair BASIC” is a valuable reference book, and an extensive, though not exhaustive, guide to program conversion.