APPLICATIONSPROGRAMMATION ★ POWER BASIC ★

POWER BASIC (New Computer Express)POWER BASIC (Amstrad Action)
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

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.


A four-pass compiler quickly turns sluggish BASIC listings into speedy machine code. But just how fast are the compiled programs...?

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.

TESTING, TESTING...

To test the effects of Power Basic we created a couple of small BASIC listings, and timed the compiled and uncompiled versions against each other.

The first repeats some simple calculations a large number of times. Here Power Basic shows up impressively:

10 FOR n%=1 TO 10000
20 y%=n%*3
30 x%=-n%/11
40 NEXT n%

BASIC: 55 seconds
Power Basic: 8 seconds
Speed increase: 587%

For the second example, the program continuously updates a number on screen. When printing, Power Basic is much less impressive, only managing a relatively minor increase over 10,000 operations.

10 FOR n%=1 TO 10000
20 LOCATE 10,10
30 PRINT n%
40 NEXT n%

BASIC: 249 seconds
Power Basic: 216 seconds
Speed increase: 15%

Adam Waring, AA

★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

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 ****.

★ PUBLISHER: SPM Software
★ YEAR: 1991
★ CONFIG: ???
★ LANGUAGE:
★ LiCENCE: COMMERCIALE
★ AUTHOR(S): ???
★ PRICE: £25.95

★ AMSTRAD CPC ★ DOWNLOAD ★

Adverts/Publicités:
» SPM  Software-Power  Basic-General  Military  Simulator    ENGLISHDATE: 2023-03-30
DL: 43
TYPE: image
SiZE: 66Ko
NOTE: w567*h400

» SPM  Software-Power  Basic-General  Military  Simulator      ENGLISHDATE: 2023-03-30
DL: 36
TYPE: image
SiZE: 80Ko
NOTE: w575*h412

» SPM  Software-Power  Basic-Special  Offer-General  Military  Simulator    ENGLISHDATE: 2023-03-30
DL: 54
TYPE: image
SiZE: 89Ko
NOTE: w572*h408

File:
» Power  Basic  v1.0    ENGLISHDATE: 2023-03-30
DL: 99
TYPE: ZIP
SiZE: 40Ko
NOTE: Dumped/uploaded by Nicholas CAMPBELL ; Extended DSK/Basic 1.1/40 Cyls
.HFE: Χ

Media/Support:
» Power  Basic  v1.0    (Release  DISC)    ENGLISHDATE: 2023-03-30
DL: 33
TYPE: image
SiZE: 596Ko
NOTE: Upload/scan by Nicholas CAMPBELL ; w2136*h1302
 

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Split Modes for CPC (Amstrad Action)
» Applications » Sprite System (CPC Computing)
» Applications » Rsx - Nova Basic
» Applications » TRACE-Funktion
» Applications » Animateur Basic (Amstrad Magazine)
» Applications » BizBasic
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 495 millisecondes et consultée 867 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.