ArticleslgStudy

science

ToBoS-FP

ToBoS-FP is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ToBoS-FP rather than just read about it. In short: 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.

ToBoS-FP — main illustration
ToBoS-FP — illustration

Key takeaways

  • ToBoS-FP belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ToBoS-FP to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ToBoS-FP from memory before moving on to harder problems.

Reference excerpt

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 (20+) 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 (e.g.: HiSoft Basic [1], HiSoft Colt [2], Softek IS/FP [3], MCoder [4], ZIP Compiler [5], Boriel ZX Basic [6], Blast [7]). Unfortunately, the Sinclair BASIC enables programming constructs that are hard or even impossible to be compiled (e.g.: GO TO line number which is an expression calculated at runtime). 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 [repeatedly] 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 In order to achieve a substantial speed up, a shorter floating point number format has been applied, one that is close to single precision IEEE 754-1985, consisting of 1-byte exponent and 3-byte fraction (effectively 7 decimal digits precision). The original Sinclair BASIC utilizes 1-byte exponent and 4-byte fraction. All floating point arithmetic routines have been rewritten, including basic operations like addition, multiplication, division and functions like square root, logarithm, exponent. A unique algorithm has been developed for the calculation of trigonometric functions. Line drawing, circle drawing and other graphics functions have also been written.

Releases

The most popular version of ToBoS-FP (ver. 2.0) 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 (Tadeusz Golonka co-authored) 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.

Reception Though some 2000 copies of ToBoS-FP have been sold in Poland, it spread worldwide mostly free of charge. As being released when general interest in ZX Spectrum started to decline, it came too late for the market. ToBoS-FP gained most of its popularity in Poland and other East European countries, where ZX Spectrum and its clones were in common use until the mid 1990s. Its ability to expedite games written in Sinclar BASIC was especially appreciated.

References

External links ToBoS-FP on World of Spectrum ToBoS-FP on Speccy Modern AI and Deep Learning on ZX Spectrum TOBOS-FP Manual in English - transcript TOBOS-FP Manual in Polish - transcript TOBOS-FP scan of the original instruction in Polish

Illustrations

ToBoS-FP: ToBoS-FP on compact cassette
ToBoS-FP on compact cassette
ToBoS-FP: Successful compilation
Successful compilation

Worked examples

Example 1 — a first encounter with ToBoS-FP

Start with the simplest possible case. Write down what ToBoS-FP claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ToBoS-FP before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ToBoS-FP ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ToBoS-FP

In research
ToBoS-FP appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ToBoS-FP in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ToBoS-FP is common in secondary-school and first-year university syllabi. It links to neighbouring topics BASIC compilers, ZX Spectrum, so understanding it makes those chapters shorter.
In everyday life
Look for ToBoS-FP outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ToBoS-FP” →

How to study ToBoS-FP in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ToBoS-FP means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ToBoS-FP out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ToBoS-FP in simple terms?

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.

Why does ToBoS-FP matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ToBoS-FP?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ToBoS-FP.

Tags

  • BASIC compilers
  • ZX Spectrum

Keep exploring