★ APPLICATIONS ★ PROGRAMMATION ★ POWER BASIC ★ |
POWER BASIC (New Computer Express)![]() | POWER BASIC (Amstrad Action)![]() |
The big problem with BASIC is that it can be so blinkin' slow! Could Power Basic give your programs the boost they need? AA finds out... BASIC was only ever intended as a beginners' language anyway. It stands for Beginners' All-purpose Symbolic Instruction Code, and is designed to be relatively straightforward for the newcomer to computing to use. But as practically everyone learns to program in BASIC, it has become the standard for home computers.
The price paid for BASIC's flexibility is a dramatic reduction in speed when compared to more structured languages. One of the main reasons is that BASIC is an ‘interpreted', rather than a ‘compiled', language. Interpreted languages have to translate the program into machine code (which is all the computer understands) as they go along, whereas compiled languages convert the program all in one go, before it is run. Power Basic is a compiler that will translate normal BASIC programs into machine code before they are run. Programs are developed in BASIC as normal, and then, when you're happy with the program, it's run through the compiler and converted into a much faster version. The compilation process is fairly fast, and easy to use. You simply run the compiler, bung in your work disk, tap in the filename you wish to convert, and leave the computer to it. If there are any problems, a results file is created which can be examined and errors pinpointed. Assuming there are no problems, a machine code file is produced. To use it, a small (provided) BASIC loader has to be run, which clears memory space and loads the binary file. Power Basic only works on 6128 machines as it needs the extra memory and a disk drive in order to function. The code it creates will run on any of the computers in Amstrad's CPC/Plus range. The amount that any program is speeded up depends very much on the type of operations being processed. Programs that make heavy use of screen access show little increase, while number crunching operations are handled rather more quickly. It's unlikely that you'd be able to take any old BASIC program that you've written previously and compile it without a certain amount of re-working. Power Basic works only on a subset of commands - a large subset, but still, it doesn't cover all the instructions available. In addition, the syntax of those instructions it does permit is often restricted. Floating point numbers are not supported. Integer numbers can be in the range -32768 to +32767, and the majority of mathematical functions are not available. Arrays can be one or two-dimensional. This severely reduces the suitability of Power Basic for compiling a large category of programs! Power Basic does have its limitations. It doesn't by any means have the same flexibility as BASIC. It's not noticeably faster when producing screen output, an area which virtually all programs rely on in some form. However, in certain areas Power Basic is very quick indeed. By allowing the user to link machine code and RSXs, faster sprite routines can be added for instance. It's also compatible with packages such as Sprites Alive, speeding up the BASIC parts of the program. Whether Power Basic is a worthwhile purchase depends very much on the kind of program you're writing.
Adam Waring, AA
FAR FROM BASIC... If you're a games programmer who finds BASIC just too slow and machine code too tricky, you might be interested in the latest offering from SPM Software. Power BASIC runs on the 6128 but produces machine code that will run on the 464 and 664 too. Hook it up to a commercial sprite-maker, and you should be able to turn out some decent-looking and fast-running games. The price is £29.95, but if you bought SPM's previous release, the Blitz BASIC Compiler, you can upgrade for just £9.95 and the return of your master disk. Blitz, incidentally, didn't have a review on these pages because of persistent bug-trouble, but hopefully Power BASIC will put all that right. SPM's address is 32a Albert St, Seaham, County Durham SK7 7U, or you can call 091-581 ****.
|
| ![]() |