ToBoS-FP
ToBoS-FP is a floating point compiler for the Sinclair BASIC on ZX Spectrum. The name stands for Toruń, Jerzy Borkowski, Wojciech Skaba, Floating Point. The compiler was released in Poland in 1986.
Source code compilation enables substantial speed up of execution of programs that are normally interpreted. The acceleration results mostly from the utilization of compiler's own floating point arithmetic library and graphics library that replace the ZX Spectrum built-in routines. In a 1992 independent survey, ToBoS-FP was named the most popular of all known BASIC compilers for the ZX Spectrum. It is still referred to as one of the best BASIC compiler for ZX Spectrum.
Background
ZX Spectrum is factory equipped with a Sinclair BASIC editor and interpreter that enables immediate program execution without a compilation pass and not consuming memory for the compiled code. This comes, however, at the price of execution speed. A number of integer and floating point compilers have been released since. Unfortunately, the Sinclair BASIC enables programming constructs that are hard or even impossible to be compiled. Thus compatibility between the interpreter and a compiler is an issue.Development
The compiler was written in Z80 assembler. There are two main sources of compiled code execution acceleration:- Conversion of the source code into direct threaded code that frees the processor from translating the BASIC instructions into program calls
- Application of compiler's own time critical subroutine calls, especially those dealing with floating point arithmetic and graphics functions
Releases
The most popular version of ToBoS-FP was released on a compact cassette in May 1986 in Poland. After loading to the memory, the compiler could be invoked with USR 53100. Earlier non-stable versions, assigned 1.0, 1.1, 1.2, and invoked with USR 53500, were available in limited extent.In June 1987 an improved version named ToBoS-DYD was released. It was distributed on a 5 1⁄4-inch floppy disk and adapted for the Elwro 800 Junior clone of ZX Spectrum. Compared to ver. 2.0, some functions were further optimized and Elwro 800 Junior extensions added.