|★ APPLICATIONS ★ PROGRAMMATION ★ TURBO COMPILER ★|
|Hisoft - Turbo Compiler|Amstrad Action)||Applications Programmation|
There are two ways of compiling a program using Turbo. Either way, the first thing you do is to load the compiler into memory. This is straightforward, and when you run the compiler, it asks where you want it located in memory. You'll only need to change from the default if the program you want to compile is particularly long. If it's under 8K, you can type it in or load it from disc as normal, with the compiler in memory. You can edit or run the program just as if the compiler wasn't there, but typing |COMPILE will call in the compiler and produce a machine-code version of the program. You can then run this by typing RUN, and note the difference in speed.
If your program is longer than 8K, you can still compile it by loading the original from disc and saving the compiled version back to disc as another file. This method allows programs up to 12K to be compiled.
You can combine compiled programs with interpreted ones, calling the compiled sub-routines as you might any other section of machine-code. You can even pass values to and from compiled sub-routines. This is important, since Turbo has no facilities for file handling. This makes it difficult to use in programs such as databases or spreadsheets.
The documentation supplied was in draft form, but seemed fairly comprehensive. I would have liked a few more facts and figures, and a list of keywords not supported, (the extra commands available from BASIC 1.1 are unsupported, for instance).
In comparison with Ocean's Laser Compiler, Turbo has three main advantages and one disadvantage. It compiles considerably faster than Laser, taking only a few seconds even when compiling from and to disc files. The compiled program is a good deal shorter than the Laser version, meaning you can cope with longer 'originals'. Finally, it's ten quid cheaper than the Ocean offering, which may well make the difference. What it doesn't have is all the tie-ins with Laser BASICs sprite routines, so for compiling games you may be better off with Laser. It's really a question of tailoring what you buy to what you need.
The Turbo compiler has many appealing features/especially its speed of compilation, and compactness erf the programs It producer. Turbo is better suited to compiling program? written with compilation In mind, than to converting existing BASIC software. It can speed your BASIC programs up considerable, but as you would expect, is better at speeding up calculation and program logic than graphic-intensive programs such as games. Even with games, though, the difference can be quite marked. Well worth the asking