www.jupiter-ace.co.uk
Previous Page > Index > ACE review from Hobby Electronics May 1983
Hobby Electronics, May 1983 page 47
Popular Computing █

HIGH
FLYING
ACE
Jupiter ACE
HE's micro-mater reviews the first personal computer to used FORTH. a fast and efficient high-level language, as its 'mother tongue'.
IN INTRODUCING THE ACE, Steven Vickers and Richard Altwasser have broken away from the tradition of offering more hardware (RAM, sound, colour etc.) for your money. Instead, they have decided to innovate in terms of software by choosing FORTH for the ACE's 'natural' language rather than the various extended BASICS used by their competitors.
Because of this, any review of the ACE must begin by looking at FORTH itself, and considering its advantages and disadvantages as a programming language.
FORTH
FORTH is not a new language. It was originally developed over ten years ago.
Since then it has attracted a steadily growing band of enthusiastic supporters, most of whom use it for
'real' applications such as controlling machinery or - recently - for writing fast action moving games.
FORTH was originally developed as an alternative to machine code for use on small microcomputers with a limited amount of memory and where BASIC-like languages were often too slow for the job. The result therefore lies between machine code and BASIC in terms of both speed and ease of use.
Unlike BASIC programs, which are essentially a numbered list of commands, FORTH programs are built up by defining new commands, starting with the elementary low level operations, then using these in more complex commands, and so on until you end up with a single command that defines the whole program.
In FORTH terminology, a 'command' is known as a 'word', and consists of a descriptive name followed by a definition of what the word is to do.
The definition is usually in terms of other FORTH words, although you can use a machine language routine where speed is really critical. As each word definition is entered, it is added to a 'dictionary', and that word can then be used in the definition of new words. This probably sounds confusing to someone who hasn't encountered FORTH before, but the basic principle is quite simple. If you were to enter:
: HI 125 100 BEEP ;
then the colon at the start of the line tells the computer that you are defining a new word -- called HI — and the semicolon at the end signals the end of the definition. The definition of this word is therefore:
125 100 BEEP
BEEP is a pre-defined word, one of about 140 FORTH words held permanently in the ACE's ROM, and it makes a sound using the ACE's internal loudspeaker. The two numbers define the frequency and duration of the note. Having entered the new word definition, it will be placed in the ACE's dictionary, and now the ACE will understand the word HI as an instruction to produce a short, sharp, tone. In fact, just typing in the word HI will now produce the tone, since if you enter any line that doesn't start with a colon, then FORTH assumes that you want it acted upon immediately. This is an extremely important feature that lets you test out new words as you develop them.
We could now enter a second word definition:
: LO 250 100 BEEP ;
to produce a lower note, and then play the two notes one after the other by entering:
HI LO
Having added the two words to the dictionary, we can use them in a further definition:
: TUNE HI HI LO LO HI ;
so that the new word TUNE will play a sequence of 5 notes.
In this way, a FORTH program is gradually built up by defining new words to perform ever more complex tasks, hut by taking it one step at a time, you can construct your program in a logical and ordered manner.
Looping and Choosing
To let you program for alternative courses of action. FORTH has an IF THEN-ELSE construct similar to that found in advanced versions of BASIC. BEGIN-UNTIL and BEGIN-WHILE REPEAT allow you to repeat actions until (or while) a particular condition is met, in much the same manner as BBC BASIC's REPEAT-UNTIL. And if you want to repeat an action a defined number of times. FORTH provides a DO-LOOP construct which behaves like BASIC'S ►

Hobby Electronics, May 1983 page 48
█ Popular Computing

Retail pack
Ace comes with a power pack, cassette leads, programming manual and demonstration tape.
FOR-NEXT. There is, however, no equivalent to the BASIC GOTO command. This seems at first like a serious omission to anyone used to programming in BASIC, but once you get used to FORTH you find you can always use IF-THEN-ELSE, BEGIN-UNTIL or BEGIN-WHILE-REPEAT to achieve the same result but in a much more elegant fashion.
Stack It
One area where FORTH differs considerably from most other computer languages is in its use of a 'stack' to hold the values being worked on. Most languages use named 'variables' to hold values, so that the BASIC statement:
LET A = 27 + 33
tells the computer to add 27 to 33, then store the result in an area of memory reserved for the variable named 'A'. You can also use named variables in FORTH, but the values actually being worked on at any time will usually be held in a special area of memory known as the 'Stack'. This is best thought of as a pile of values; a new value can be added to the top of the pile — making the pile higher — or a value can be taken off the top of the pile — making it shorter. All of FORTH's fundamental operations, like addition, multiplication etc., work on the values present on the top of the stack. The '+' operator, for example, takes the top two values off the stack, adds them together, then puts the result back onto the top of the stack.
When the computer sees a number in the line you have entered, it puts that value onto the top of the stack. For example, if you look back at our definition of the word HI, what it was really telling the computer to do was to first put the value 125 onto the stack, then put the value 100 on top of that, then execute the pre-defined word BEEP, which takes the top two numbers from the stack to give the frequency and length of the note to be produced.
Similarly, the line:
27 33 +
will place the values 27 and 33 onto the stack, then replace them by the single value 60. This way of writing may seem backwards at first (and -
indeed - it is known as 'reverse Polish') but you soon get used to it.
There are two main reasons why FORTH was designed around the use of a stack. The first is that it saves memory space because values are kept in RAM only as long as they are needed, and more importantly — because the program doesn't need to contain the names of the variables (at least as long as the values are being kept on the stack). The second advantage is that your programs run more quickly because the computer doesn't have to search through a 'variables storage area' to find the one you want.
DIY FORTH
FORTH is really a 'Do It Yourself' language. Although it has about 140 pre-defined words compared to the 90 or so keywords in most versions of BASIC, they nearly all correspond to very elementary operations, and you have to add your own definitions to do anything that is even slightly complex.
Take arrays for example. In BASIC, a simple DIM statement will set up an array so that you can then refer to an element of it by just using a subscripted variable such as A(27). But FORTH has no equivalent to the DIM statement or the subscripted variable; you have to write special words that will let you handle data in array form, or — more precisely — you have to define a routine that can be used to set up arrays, and another to let you refer to an individual element of an array. At the end of the day you will be able to handle arrays of data at least as well as you could in BASIC, but you will have taken longer to get there.
Similarly, if you want to handle strings, you must first define some string handling words.
Fast FORTH
Where FORTH really scores is in doing fairly simple tasks very quickly. And, because it is much nearer to machine code than BASIC, you have much more control over what the computer is actually doing. Indeed, to program successfully in FORTH you need to be much more aware of how the computer works than you do with most other languages, and pay much more attention to the possible side effects of what you are doing.
For example, FORTH arithmetic is usually done using 16-bit words that can take integer values from -32768 to 32767. But there is no check to see if a result has overflowed, so that it will quite happily add 30000 to 30000 and say that the result is -5536! FORTH enthusiasts will say, of course, that if you really want the + operator to .check for overflow then you can easily define a new version of the word that does just that.
ACE FORTH
There is a standard for the FORTH language, known as FORTH-79, and the version provided on the ACE sticks very close to it. The main differences are the addition of words to handle floating point numbers, plotting, the sound generator, and ports. There are also some differences in the way programs are entered and edited.
The Hardware
The ACE comes in a white vacuum-formed plastic box about the same width as the Spectrum but deeper, held together with plastic rivets along the sides and back. A label on the underside of the box warns that there are no 'user serviceable' parts inside, and indeed the case is fixed together in such a way that you can't take it apart without splitting the plastic. This is a pity, because I am sure that many people who would be attracted to the ACE would be enthusiastic (and knowledgeable) enough to want to get at the hardware to make minor 'improvements'.
On the model received for review, the quality of the case was poor. The edges where it had been cut from the mould were rough, there were a couple of noticeable dimples on the top surface, and the holes in the case for the TV, Ear, Mic and Power sockets did not line up properly. Worse, the bottom part of the case was bowed so that it flexed whenever you pressed on a key, and the keytops sometimes caught underneath the case top. Hopefully these were just teething problems with the first models.
Two PC board edge connectors are provided at the back for add-ons. One of these is to take memory extension and/or I/O ports. It is believed that the other is for a possible colour display add-on.
The keyboard has the same layout as on the Spectrum, even having the same awkwardly positioned Symbol Shift key, and also lacks a proper space bar. But, because FORTH doesn't use keywords in the same way that Spectrum BASIC does, there is a blessed simplicity about the key legends. Generally, each key is only used to give upper or lower case characters — governed by using the SHIFT key, or a special symbol such as '<', which is obtained with the Symbol Shift key. The keys are black with easily read white markings.
As on the Spectrum, the keytops are all formed from a single rubber moulding which collapses as you press on a key, but the ACE's keys feel much

Hobby Electronics, May 1983 page 49
Popular Computing █

ACE PCB image
The view inside the ACE; the chip count totals around 30 ICs!
firmer and need to be pressed much more deliberately. You can't type quickly on the ACE - the keyboard just won't let you - so the auto-repeat feature is useful.
On Screen
The TV display is crisp and stable but is in black and white only. There are 24 lines of 32 characters each, and in typical fashion the bottom line is reserved for use as an input buffer. Characters are normally displayed in white on a black background, although you can make any character appear in black on white. Both upper and lower case letters are available, as well as 16 'chunky' graphics characters. The character codes used are basically ASCII with a few additions such as the copyright symbol and 'f' as well as 'S' and '#' .
As is common practice for most low cost computers, the characters are formed from an 8 x 8 array of pixels. The dot patterns for the whole character set are held in a special area of RAM (they are copied from ROM into the RAM when power is applied), which means that you can re-define any or all of them to make your own shapes in much the same way as you can on the Spectrum or the BBC computer. A PLOT command uses the chunky graphics characters to give a low resolution (64 x 46) plotting capability similar to that on the ZX81. Because you can define your own characters, each as an 8 x 8 pixel array, you can theoretically draw shapes with an overall resolution of 256 x 192 pixels, but in practice you wouldn't use this facility for drawing shapes larger than the space of a few characters on the screen. There is no equivalent to the high resolution plotting modes available on the Spectrum, Dragon or BBC machines.
    The ACE has an internal loudspeaker
and a BEEP command to drive it, but you are limited to one note at a time and can only vary the pitch and duration.
The cassette tape interface works at a respectable 1500 baud (about 6 seconds for 1K bytes). You can save to tape either the dictionary of new word definitions that you have entered, which is effectively your program, or a defined area of memory. A VERIFY command lets you see if what is on tape is the same as what is in memory. On the model under test, a very high level was needed from the recorder when loading; reminiscent of the old ZX81, but otherwise the system worked reliably.
Internal Matters
Inside the case is a bit of a shock to anyone used to Sinclair's 'The fewer parts the better' philosophy; almost 30 ICs have been packed in. Obviously in starting up a new company from scratch Vickers and Altwasser could not afford the time or cost of developing a custom integrated circuit like the ULA used to replace handfuls of TTL chips in the Spectrum, just as they didn't invest in the tooling for an injection moulded case.
The central processor is, of course, the one we can't seem to get away from: the Z80A. The Operating System software, FORTH, and the standard character set dot patterns have all been squeezed into an 8K byte ROM. 3K bytes of RAM have been fitted, which may seem a lot compared to the 1K of the ZX81, but 1K is used to hold the dot patterns when the machine is running, and almost the whole of another 1K is used for the TV display file, and yet more for working space, stacks, and System Variables, so you are left with well under 1K bytes to hold your program and data.
ACE BOUNCER
This program was written as an exercise in using FORTH and to get some idea of how fast a FORTH program will run. It moves a star around the screen, bouncing it off the four edges.
Similar programs written in BASIC will make a complete circuit of the screen in about one or two seconds. This FORTH version runs at about the same speed, but only because it has been deliberately slowed down by the 100 5 BEEP command in the word GO. Without this restraint, the star moves so fast that you can only see momentary glimpses of it as it flashes around the screen!
10 VARIABLE HPOS
10 VARIABLE VPOS
1 VARIABLE HVEL
-1 VARIABLE VVEL
: NEWPOS HPOS @ DUP 0= IF 1
HVEL ! THEN DUP 31 = IF -1 HVEL !
THEN HVEL @ + HPOS ! VPOS
DUP 0= IF 1 VVEL ! THEN DUP 22 =
IF -1 VVEL ! THEN VVEL @ + VPOS !
;
WIPE VPOS @ HPOS @ AT
SPACE :
: PRINTNEW VPOS @ HPOS AT
42 EMIT ;
: GO CLS BEGIN 100 5 BEEP WIPE
NEWPOS PRINTNEW 0 UNTIL ;
Some form of memory expansion is essential for any but the simplest application.
The 181 page manual provided with the ACE is excellent, both as an introduction to FORTH and as a guide to using the ACE. It was written by Steven Vickers, and is in the same light but very informative style as his previous Sinclair manuals. One interesting chapter, Extending the ACE, gives much more information on how to add I/O ports or memory than is usual in a computer manual, including the circuit for a simple I/O port and examples of software to drive it.
In Conclusion
The ACE represents a brave attempt to get away from the cliche of colour BASIC - games machine personal computers, but in the long term will probably suffer from the lack of investment in a professional looking case and the absence of colour or true high resolution graphics. Now that FORTH is becoming available as an optional language for other computers such as the Spectrum and ORIC, many people may prefer to spend the extra to get the more powerful and flexible machines. The ACE will probably appeal most to those who have a limited budget and are interested in programming simple control type applications. But even these potential buyers might prefer the combination of a ZX81 with a cheap 16K RAM pack and FORTH on cassette, which adds up to about the same as an ACE.
mag cover   HE page 47

Hobby Electronics page 0048    Hobby Electronics 0049

Download link to PDF pages